cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
yair
Visitor
Visitor
654 Views
Registered: ‎06-03-2018

Xen - Hypervisor USB passthrough issue


hi all,
How to boot up DOMU with USB support ?
I'm using zynqmp with petalinux 2018.2 to boot Linux 4.14 (FS compiled with kernel) via XEN 4.9 (pre built).
once Linux is up I'm successfully booting up DOMU while using Xilinx's example-simple.cfg.
Note: other Xilinx's examples (example-passnet.cfg or example-pvnet.cfg) doesn't work for me.

*. I was following the instructions here https://wiki.xen.org/wiki/Xen_USB_Passthrough without success.


1. I set DT with
&dwc3_0 {
xen,passthrough = <0x1>;
status = "okay";
};

2. I was trying the following commands
xl cpupool-create 'name="Pool-1"' 'sched="credit"'
xl cpupool-cpu-remove Pool-0 1
xl cpupool-cpu-add Pool-1 1
xl create -c example-usb.cfg 'vcpus="1"' 'pool="Pool-1"' 'cpus="1"' 'name="Domain-1"'

example-usb.cfg content:
name = "usb0"
kernel = "/boot/Image" (FS compiled with kernel)
extra = "console=hvc0 rdinit=/sbin/init"
memory = 512
vcpus = 1
cpus = [1]
irqs = [97, 101, 107]
iomem = ["0xff9d0,1" , "0xfe200,1"]

DOMU is booting but the USB doesn't show up.

3. running this command 'xl usbctrl-attach Domain-1 version=1 ports=8' gives this error message:
libxl: error: libxl_dm.c:2573:libxl__dm_check_start: Domain 0:device model required but not running
libxl: error: libxl_device.c:1378:device_addrm_aocomplete: unable to add device
libxl_device_usbctrl_add failed.

can anyone advise how it should be done ?

0 Kudos
2 Replies
jovitac
Moderator
Moderator
574 Views
Registered: ‎05-10-2017

For peripherals you want to passthrough, status needs to be disabled. Could you please set this in your usb node?

status = "disabled";
xen,passthrough = <1>;

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
yair
Visitor
Visitor
554 Views
Registered: ‎06-03-2018

actually with status="disabled" it doesn't work at all.

as for now I'm able to add USB controller to DOMU, and then attach an USB device to it at any port (see output of 'xl usb-list Domain-1' command below).

The problem is that although USB bus is getting attached, DOMU doesn't detected it.

root@xilinx-zcu102-2018_2:/etc/xen# xl usb-list Domain-1
Devid Type BE state usb-ver ports
0 qusb 0 1 2 8
Port 1: Bus 001 Device 002
Port 2:
Port 3:
Port 4:
Port 5:
Port 6:
Port 7:
Port 8:

 

any idea ?

0 Kudos