Bug 771121 - xm pci-list-assignable-devices outputs nothing even after device unbound
Summary: xm pci-list-assignable-devices outputs nothing even after device unbound
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: xen
Version: 16
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Xen Maintainance List
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-01-01 17:54 UTC by Robin Green
Modified: 2012-01-04 08:32 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-01-04 07:03:50 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Robin Green 2012-01-01 17:54:53 UTC
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):
xen-4.1.2-2.fc16.x86_64

How reproducible:
Always

Steps to Reproduce:
1. echo -n 0000\:00\:1a.0  >/sys/bus/pci/drivers/ehci_hcd/unbind
2. xm pci-list-assignable-devices
  
Actual results:
No output

Expected results:
00:1a.0

Comment 1 Konrad Rzeszutek Wilk 2012-01-03 17:58:22 UTC
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.

Comment 2 Konrad Rzeszutek Wilk 2012-01-03 18:00:15 UTC
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:
http://blogs.oracle.com/wim/entry/playing_with_sr_iov_in_oracle

Comment 3 Robin Green 2012-01-03 21:24:48 UTC
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?

Comment 4 Konrad Rzeszutek Wilk 2012-01-03 22:50:59 UTC
Robin,

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.

Thanks!

Comment 5 Robin Green 2012-01-04 07:03:50 UTC
(In reply to comment #4)
> Right, b/c the pciback driver is not built in. And probably not loaded
> initially from initrd.

Right.

> 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:

http://wiki.xen.org/wiki/Assign_Hardware_to_DomU_with_PCIBack_as_module

but it seems that page is wrong. The final command gives an error "no such device".

However:

[root@pavilion log]# cat /sys/bus/pci/drivers/pciback/slots 
0000:00:1a.0
0000:00:1a.0

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
> http://wiki.xen.org/xenwiki/VTdHowTo

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.


Note You need to log in before you can comment on or make changes to this bug.