UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Observer jesuslazaro
Observer
1,832 Views
Registered: ‎02-25-2013

xen device pass-through error

Hi,

 

I am trying to make a peripheral pass-through towards dom1. In my case I am trying to pass i2c1. I have followed the steps for network pass-through but I run into this problem:

 

(XEN) XEN_DOMCTL_assign_dt_device: assign "/amba/i2c@ff030000" to dom1 failed (-22)
libxl: error: libxl_create.c:1424:libxl__add_dtdevs: xc_assign_dtdevice failed: -1
libxl: error: libxl_create.c:1461:domcreate_attach_devices: unable to add dtdev devices

 

The config file I use is:

name = "Debian"
kernel = "/mnt/mmcblk0p1/Image"
disk = [ 'phy:/dev/mmcblk0,sda,w' ]
root = "earlycon clk_ignore_unused console=ttyPS0,115200 root=/dev/xvda2 rw earlyprintk rootfstype=ext4 rootwait"
extra = "console=hvc0 rdinit=/sbin/init"
dtdev = [ "/amba/i2c@ff030000" ]
device_tree = "/tmp/i2c_pass.dtb"
irqs = [ 50 ]
iomem = [ "0xff030,1" ]
memory = 256
vcpus = 2
vif = [ 'bridge=xenbr0' ]

The booting command for the host, after modifying for the I2C looks like:

 

tftpb 4000000 system.dtb; tftpb 0x80000 Image; tftpb 6000000 xen.ub; tftpb 0x1000000 rootfs.cpio.gz.u-boot;
fdt addr 4000000
fdt resize 128
fdt set /amba/i2c@ff030000 status "disabled"
fdt set /amba/i2c@ff030000 xen,passthrough "1"
bootm 6000000 0x1000000 4000000

Any clues?

 

Regards,

 

Jesús

0 Kudos
6 Replies
Moderator
Moderator
1,785 Views
Registered: ‎10-06-2016

Re: xen device pass-through error

Hi @jesuslazaro

 

I'm not familiar to XEN but I think that providing both your system.dtb and the partial dtb (i2c_pass.dtb) could be useful to identify typos/issues, as the rest of the steps seems so be OK.

 

There is a nice presentation from XEN Developer submit explaining how to do the passthrough.

 

BTW: According to that doc it seems that the property xen,passthrough does not require any value, so the command used to modify the DTB from u-boot should be 

fdt set /amba/i2c@ff030000 xen,passthrough

 

Regards,

Ibai 


Ibai
Don’t forget to reply, kudo, and accept as solution.
0 Kudos
Highlighted
Observer jesuslazaro
Observer
1,705 Views
Registered: ‎02-25-2013

Re: xen device pass-through error

Hi,

 

I am stilll working with this issue. What I have managed to solve is that. when passing non  DMA devices, you should not use the dtdev property.

 

Once this is done, the DomU wil launch but know I have issues because the I2C module does not load. In a "normal" linux, I2C is in the amba bus. In the DomU it is in the passthrough bus. It looks like this difference makes it difficult to load the module.

 

Regards,

 

Jesús

0 Kudos
Observer ariefgrand
Observer
1,515 Views
Registered: ‎03-03-2015

Re: xen device pass-through error

Hi @jesuslazaro,

 

Did you find the solution?

I'm doing almost the same, but to an IP in PL (so the bus should be amba_pl).

I couldn't make it work if I remove dtdev. But if I use dtdev, the DomU can't get started and i got this error

libxl: error: libxl_create.c:1424:libxl__add_dtdevs: xc_assign_dtdevice failed: -1
libxl: error: libxl_create.c:1461:domcreate_attach_devices: unable to add dtdev devices
libxl: error: libxl.c:1575:libxl__destroy_domid: non-existant domain 6
libxl: error: libxl.c:1534:domain_destroy_callback: unable to destroy guest with domid 6
libxl: error: libxl.c:1463:domain_destroy_cb: destruction of domain 6 failed

 

Any suggestion will be appreciated. Thanks.

 

Regards,

Arief

0 Kudos
Visitor wangyudi
Visitor
700 Views
Registered: ‎09-19-2018

Re: xen device pass-through error

Hi @ariefgrand

Did you solve the problem? I have the same issue with AXI DMA IP in PL.

I couldn't make AXI DMA sample Baremetal application run in Xen hypervisor. What's the proper way to passthrough AXI DMA and make it work?

Thanks!

0 Kudos
Observer jesuslazaro
Observer
680 Views
Registered: ‎02-25-2013

Re: xen device pass-through error

Hi,

 

I did not solve this issue. I have not tried in newer version so I do not have any update.

 

Regards,

Jesús

0 Kudos
Visitor wangyudi
Visitor
656 Views
Registered: ‎09-19-2018

Re: xen device pass-through error

I failed using the newest version (2018.3) of everything (Petalinux, Vivado, SDK). I tried to run the SDK provided AXI-DMA example as a DomU Baremetal application. Having attempted all the relevant resources I can find online, it still does not work. Did anyone succeed running AXI-DMA in xen? Any suggestion is appreciated!

Thanks!

0 Kudos