Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
DomU I/O and Communication
#1
Hi,

I'm very interested in knowing how to assign specific HW to each one of the running OS-s if I'm working with Xen hypervisor. Is it possible? Where do I need to specify this?

On the other hand, I also would like to know, how would the different OS-s running under Xen hypervisor communicate between them. I.e.: an application running over Linux (i.e.: Docker) and FreeRTOS.

Finally, it would be interesting for me too, to know how to debug the behavior of an OS running under Xen (i.e.: FreeRTOS) in the real MPSoC board.

Any answer would be helpful,

Thanks,
Pello
Reply
#2
Hi Pello,

Not knowing the specifics behind which pieces of hardware you are considering, I would start by looking at the XZD manual in chapter 6, possibly section 6.4, and chapter 9. Communication between domains is typically done over a virtual network, xenbus/xenstore, libvchan, or a custom mechanism built on top of shared memory and/or event channels. See section 6.4 in our UM for an example using libvchan. http://dornerworks.com/wp-content/upload...Manual.pdf

You can also check out our blog for a virtual console http://dornerworks.com/blog/virtual-console-xen

For debugging, you can consider using gdb, xentrace, and/or xenalyze. Xilinx also provides some information regarding debugging at https://www.xilinx.com/html_docs/xilinx2...debug.html

Thanks for contributing to the XZD Forums. Don't forget to check us out at http://dornerworks.com/xen/xilinxxen for more information regarding XZD support.
Reply
#3
Hello guys,

I have a question related to this topic as well.
Does DomU have the access to the FPGA part by default, for example using AXI to send some data in Zynq MPSoC board?
If not, can I configure it in real-time? Or must I configure it when I create the kernel of DomU?

Thank you, guys.
Arief
Reply
#4
DomU does not have access to the PL by default.  To give DomU access to a PL device, the PL device and any supporting components must be passed through to the DomU.

If you need to share the device with other virtual machines then a paravirtual driver would be necessary.

     Nate
Reply
#5
(08-14-2017, 01:21 PM)Nathan.Studer Wrote: DomU does not have access to the PL by default.  To give DomU access to a PL device, the PL device and any supporting components must be passed through to the DomU.

If you need to share the device with other virtual machines then a paravirtual driver would be necessary.

     Nate

Hello Nate,

Thank you for your guidance. I would like to follow up this topic.
So I followed the manual and successfully performed a para virtualization for ethernet.
I ran a Dom0 and a DomU, both were petalinux, and they shared an Ethernet connection via xenbridge (xenbr0). Would you give me some direction on how I can do the same for an IP in PL?
Thank you so much.

Regards,
Arief
Reply
#6
(12-06-2017, 10:24 PM)ariefgrand Wrote: I ran a Dom0 and a DomU, both were petalinux, and they shared an Ethernet connection via xenbridge (xenbr0). Would you give me some direction on how I can do the same for an IP in PL?

Ethernet IP?

Here are some general steps:
  1. Create and Export PL Design.  (If the IP uses DMA use a wrapper to hardwire AxProt of the DMA interface to 0b010.)
  2. Update FSBL for custom PL design.
  3. Update Boot.bin.
  4. Update Device Tree.
  5. Add PL IP to domU partial device tree and domU config.
  6. Find SMMU ID and update device tree. (If the IP uses DMA.)
     Nate
Reply
#7
No, it's not an Ethernet IP.
It's an arithmetic/cryptography operation.
It receives input and sends output via custom AXI interface.
I will see through the link that you sent.

Thank you so much.

Arief
Reply
#8
HI Nathan,

So I've looked at the tutorial in the link you gave.
It's still does not work.
When I want to start the DomU, it gives error for the dtdev.

My objective is to allow opening and mmap /dev/mem to my devices in PL from the DomU.
Is it possible in the current version of Xen for Zynq? Thanks.

Best regards,
Arief
Reply
#9
Can you provide the error message, the partial device tree for the VM, and the VM config file?


     Nate
Reply
#10
My partial devicetree is
Code:
/dts-v1/;

/ {
   #address-cells = <0x2>;
   #size-cells = <0x2>;

   passthrough {
       compatible = "simple-bus";
       ranges;
       #address-cells = <0x2>;
       #size-cells = <0x2>;

    reset_axi1: reset_axi@a0000000 {
        compatible = "xlnx,generic-uio";
        reg = <0x0 0xa0000000 0x0 0x10000>;
        status = "okay";
    };

    mwmr_controller_test1: mwmr_controller_test@a0010000 {
        compatible = "xlnx,generic-uio";
        reg = <0x0 0xa0010000 0x0 0x10000>;
        status = "okay";
    };

    mwmr_controller_test2: mwmr_controller_test@a0020000 {
        compatible = "xlnx,generic-uio";
        reg = <0x0 0xa0020000 0x0 0x10000>;
        status = "okay";
    };

   };
};
And the file config is
Code:
name = "petalinux-guest"
kernel = "/boot/Guest0-Kernel"
extra = "console=hvc0 earlyprintk=xenboot root=/dev/xvda1 rw"
memory = 256
vcpus = 2
vif = [ 'bridge=xenbr0' ]
disk = [ 'phy:/dev/loop0, xvda, w' ]
device_tree = "/etc/xen/passthrough-new-part.dtb"
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)