From: "Marek Marczykowski-Górecki" <marmarek@invisiblethingslab.com>
To: xen-devel <xen-devel@lists.xen.org>
Cc: HW42 <hw42@ipsumj.de>
Subject: PCI passthrough of USB controllers on Xen 4.8.1, Linux 4.9.29, stubdomain
Date: Fri, 2 Jun 2017 12:57:19 +0200 [thread overview]
Message-ID: <20170602105719.GK10404@mail-itl> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 4965 bytes --]
Hi,
I'm trying to passthrough USB controllers (details below) to a HVM domain
with qemu running in stubdomain. There are two of them (EHCI and xHCI),
neither of them works. The stubdomain is non-standard Linux
based with Qemu 2.8.0. Both dom0 and guest are running Linux 4.9.29 very
close to vanilla. I've started debugging with EHCI. On modprobe
ehci-pci I get:
[52453.633768] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[52453.634496] ehci-pci: EHCI PCI platform driver
[52453.640088] ehci-pci 0000:00:06.0: EHCI Host Controller
[52453.640466] ehci-pci 0000:00:06.0: new USB bus registered, assigned bus number 5
[52462.453251] ehci-pci 0000:00:06.0: can't setup: -110
[52462.453315] ehci-pci 0000:00:06.0: USB bus 5 deregistered
[52462.458375] ehci-pci 0000:00:06.0: init 0000:00:06.0 fail, -110
[52462.458421] ehci-pci: probe of 0000:00:06.0 failed with error -110
And at this time, stubdomain print this:
[00:06.0] xen_pt_bar_read: Error: Should not read BAR through QEMU. @0x0000000000000004
[00:06.0] xen_pt_bar_read: Error: Should not read BAR through QEMU. @0x0000000000000004
[00:06.0] xen_pt_bar_read: Error: Should not read BAR through QEMU. @0x0000000000000004
[00:06.0] xen_pt_bar_read: Error: Should not read BAR through QEMU. @0x0000000000000004
[00:06.0] xen_pt_bar_read: Error: Should not read BAR through QEMU. @0x0000000000000004
[00:06.0] xen_pt_bar_read: Error: Should not read BAR through QEMU. @0x0000000000000004
[00:06.0] xen_pt_bar_read: Error: Should not read BAR through QEMU. @0x0000000000000004
[00:06.0] xen_pt_bar_read: Error: Should not read BAR through QEMU. @0x0000000000000004
[00:06.0] xen_pt_bar_read: Error: Should not read BAR through QEMU. @0x0000000000000004
[00:06.0] xen_pt_bar_read: Error: Should not read BAR through QEMU. @0x0000000000000004
repeated a lot more times, sometimes with slightly different addresses
and/or for write.
Just to be sure, I've checked with mini-os based stubdomain, but there I
don't even see the EHCI one (only xHCI, which doesn't work the same way
as on updated stubdomain).
Regarding xHCI, the domU messages are (this one is from older kernel,
but the same happens on 4.9 too):
[ 347.822393] xhci_hcd 0000:00:05.0: xHCI Host Controller
[ 347.822764] xhci_hcd 0000:00:05.0: new USB bus registered, assigned bus number 2
[ 347.825391] xhci_hcd 0000:00:05.0: hcc params 0x200077c1 hci version 0x100 quirks 0x0004b810
[ 347.832346] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002
[ 347.832482] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 347.832643] usb usb2: Product: xHCI Host Controller
[ 347.832779] usb usb2: Manufacturer: Linux 4.8.13-100.fc23.x86_64 xhci-hcd
[ 347.832970] usb usb2: SerialNumber: 0000:00:05.0
[ 347.833867] hub 2-0:1.0: USB hub found
[ 347.834089] hub 2-0:1.0: 11 ports detected
[ 347.835127] xhci_hcd 0000:00:05.0: xHCI Host Controller
[ 347.836927] xhci_hcd 0000:00:05.0: new USB bus registered, assigned bus number 3
[ 347.837382] usb usb3: New USB device found, idVendor=1d6b, idProduct=0003
[ 347.837582] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 347.837784] usb usb3: Product: xHCI Host Controller
[ 347.837921] usb usb3: Manufacturer: Linux 4.8.13-100.fc23.x86_64 xhci-hcd
[ 347.838159] usb usb3: SerialNumber: 0000:00:05.0
[ 347.838942] hub 3-0:1.0: USB hub found
[ 347.839158] hub 3-0:1.0: 4 ports detected
[ 363.487226] xhci_hcd 0000:00:05.0: Error while assigning device slot ID
[ 363.487368] xhci_hcd 0000:00:05.0: Max number of devices this xHCI host supports is 32.
[ 363.487508] usb usb2-port1: couldn't allocate usb_device
[ 383.967268] xhci_hcd 0000:00:05.0: Error while assigning device slot ID
[ 383.967495] xhci_hcd 0000:00:05.0: Max number of devices this xHCI host supports is 32.
[ 383.967715] usb usb2-port2: couldn't allocate usb_device
And in this case, dom0 also prints:
[ 49.155606] pciback 0000:00:14.0: Driver tried to write to a read-only configuration space field at offset 0x82, size 2. This may be harmless, but if you have problems with your device:
1) see permissive attribute in sysfs
2) report problems to the xen-devel mailing list along with details of your device obtained from lspci.
[ 66.247644] pciback 0000:00:14.0: cache line size of 64 is not supported
[ 66.247646] xen_pciback: 0000:00:14.0: cannot enable memory-write-invalidate (-22)
Enabling permissive mode doesn't change anything.
Any idea what's wrong?
--
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
[-- Attachment #2: Type: text/plain, Size: 127 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next reply other threads:[~2017-06-02 10:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-02 10:57 Marek Marczykowski-Górecki [this message]
2017-06-06 8:37 ` PCI passthrough of USB controllers on Xen 4.8.1, Linux 4.9.29, stubdomain Jan Beulich
2017-06-06 10:41 ` Marek Marczykowski-Górecki
2017-06-06 10:55 ` Jan Beulich
2017-06-06 13:14 ` Marek Marczykowski-Górecki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170602105719.GK10404@mail-itl \
--to=marmarek@invisiblethingslab.com \
--cc=hw42@ipsumj.de \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).