Setting up a pci passthrough device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have been investigating pci pass-through for virtualized
guests and the documentation I have found seems to me to
lack a certain consistency in its example.  This may be
due to my not understanding what it is trying to inform
me.

What I wish to do is to configure a pci multi-port serial
i/o card for use by a single virtual host.

I start by running lspci -v on the host to identify the
serial card:

03:00.0 Serial controller: Oxford Semiconductor Ltd
OX16PCI954 (Quad 16950 UART) function 0 (Uart) (prog-if 06
[16950])
        Subsystem: Oxford Semiconductor Ltd Device 0000
        Flags: medium devsel, IRQ 17
        I/O ports at d040 [size=32]
        Memory at d0702000 (32-bit, non-prefetchable)
[size=4K]
        I/O ports at d020 [size=32]
        Memory at d0701000 (32-bit, non-prefetchable)
[size=4K]
        Capabilities: [40] Power Management version 2
        Kernel driver in use: serial

I then check for possible multiple IRQ assignment:

lspci -v | grep ' IRQ 17'
        Flags: medium devsel, IRQ 17

I next use lspci -n to identify the vendor codes:

 lspci -n  | grep '00:03.0'
00:03.0 0780: 8086:2e24 (rev 03)

So this is an Intel chipset and the device id is 2e24. 
Now this is the point in the example where the
documentation and I part company.  In the examples I have
found, although the pci device ids listed from virsh
nodedev-list are uniformly of the form pci_0000_00_03_0
those used in the examples then switch and use the form
pci_8086_3a6c for the subsequent steps.

This pattern appears to be the prefix pci followed by the
manufacturer's code followed by the device id. There is no
other mapping to the pci device ids previously reported by
virsh nodedev-list and lspci in the examples that I can
discern.

However, if I attempt to use the manufacturer and device
ids in the next step of the example, substituting those
used in the example with those reported on my own system,
then I get a device not found reported:

virsh nodedev-dumpxml pci_8086_2e24
error: Could not find matching device 'pci_8086_2e24'
error: Node device not found

If instead I use the pci device ids exactly as reported by
virsh nodedev-list then I get what I expect:

virsh nodedev-dumpxml pci_0000_00_03_0
<device>
  <name>pci_0000_00_03_0</name>
  <parent>computer</parent>
  <capability type='pci'>
    <domain>0</domain>
    <bus>0</bus>
    <slot>3</slot>
    <function>0</function>
    <product id='0x2e24'>4 Series Chipset HECI
Controller</product>
    <vendor id='0x8086'>Intel Corporation</vendor>
    <capability type='virt_functions'>
    </capability>
  </capability>
</device>

My question is: Why does the documentation change the form
of the pci identifiers used in the second half of the
example from those reported previously in the same
example?  Is this change significant?  What does it mean? 
Am I missing something important here?


-- 
***          E-Mail is NOT a SECURE channel          ***
James B. Byrne                mailto:ByrneJB@xxxxxxxxxxxxx
Harte & Lyne Limited          http://www.harte-lyne.ca
9 Brockley Drive              vox: +1 905 561 1241
Hamilton, Ontario             fax: +1 905 561 0757
Canada  L8E 3C3

_______________________________________________
CentOS-virt mailing list
CentOS-virt@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos-virt


[Index of Archives]     [CentOS Users]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [X.org]     [Xfree86]     [Linux USB]

  Powered by Linux