Red Hat Bugzilla – Bug 771121
xm pci-list-assignable-devices outputs nothing even after device unbound
Last modified: 2012-01-04 03:32:04 EST
Description of problem:
I have tried to make my first USB hub hidden so it can be passed through to a domU, but xm pci-list-assignable-devices doesn't show it.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. echo -n 0000\:00\:1a.0 >/sys/bus/pci/drivers/ehci_hcd/unbind
2. xm pci-list-assignable-devices
Well, you also need to bind it to the xen-pciback module.
If you google for Xen PCI passthrough or Xen VT-d it should give you the step by step instructions.
Ah, the wiki does need a bit of updating as it assumes you are using xen-pciback.hide parameter.
And you are not, so please follow this Oracle blog:
OK, firstly, my motherboard does not support VT-d.
Secondly, I have also tried with xen-pciback.hide - that doesn't work either.
Thirdly, why do I also need to bind it to the xen-pciback module? And why doesn't the wiki mention that? And why has this process never been properly documented for 6 years, as far as I can see?
You don't need VT-d if you are passing it to a PV guest. It of course has some security downfalls.
Right, b/c the pciback driver is not built in. And probably not loaded initially from initrd.
Well, the binding process is the normal SysFS way to attaching a driver to a module. You are in essence de-taching it from the ehci driver, then attaching it to the pciback one. You don't need to do this if xen-pciback is compiled in the kernel as it will automatically attach itself to the device.
Where do you not see it in the Wiki? I am looking at http://wiki.xen.org/xenwiki/VTdHowTo and there is a section called "Binding at Run-Time" and the next one is "Binding Devices to pci-stub". Could you explain the "6 years as far as I can see"? There might be some Wiki pages that are out of date and it would be quite helpful to know which ones you found that are incorrect.
(In reply to comment #4)
> Right, b/c the pciback driver is not built in. And probably not loaded
> initially from initrd.
> Well, the binding process is the normal SysFS way to attaching a driver to a
> module. You are in essence de-taching it from the ehci driver, then attaching
> it to the pciback one. You don't need to do this if xen-pciback is compiled in
> the kernel as it will automatically attach itself to the device.
I tried to followed the instructions just now in "option 1" of this page:
but it seems that page is wrong. The final command gives an error "no such device".
[root@pavilion log]# cat /sys/bus/pci/drivers/pciback/slots
And this has fixed the problem! Thank you!
I've updated the wiki to point to that page.
> Where do you not see it in the Wiki?
I only looked at http://wiki.xen.org/wiki/Xen_PCI_Passthrough because that was supposedly the relevant page for me.
> I am looking at
I did not look at this page at all because I don't have VT-d!
> Could you explain
> the "6 years as far as I can see"?
Sure, the feature was added in 2005 and it still wasn't correctly documented anywhere for the non-VT case (until I fixed it just now, but even that contains a hopefully harmless error, see above). Of course it's possible that the documented way worked at some point in the past.
Closing as NOTABUG because this was due to an error in the wiki documentation.