« Previous | Next » 

Revision 96adc5c7

ID96adc5c7c2178d02f0db2db368ba3e4aacef931a

Added by Alex Williamson about 11 years ago

vfio-pci: Add PCIe capability mangling based on bus type

Windows seems to pay particular interest to the PCIe header type of
devices and will fail to load drivers if we attach Endpoint devices or
Legacy Endpoint devices to the Root Complex. We can use
pci_bus_is_express and pci_bus_is_root to determine the bus type and
mangle the type appropriately:

  • Legacy PCI * No change, capability is unmodified for compatibility.
  • PCI Express * Integrated Root Complex Endpoint -> Endpoint
  • PCI Express Root Complex * Endpoint -> Integrated Root Complex Endpoint * Legacy Endpoint -> none, capability hidden

We also take this opportunity to explicitly limit supported devices
to Endpoints, Legacy Endpoints, and Root Complex Integrated Endpoints.
We don't currently have support for other types and users often cause
themselves problems by assigning them.

Signed-off-by: Alex Williamson <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences