A couple of devices - virtio-pci and XHCI - can present themselves to the guest as either PCI or PCIe devices depending on how they're attached. However, the logic is a little different between the two devices. In addition the logic in virtio makes it difficult to put a PCIe virtio device into a "pseries" guest because of the unusual way the paravirtualized PCI bus works there.
This series makes the logic more consistent, and allows per-machine overrides to address that. Currently patch 3/3 shows a non-obvious side effect of this change. A PCIe virtio device is, by default, modern mode only, but the qtest logic doesn't handle modern-only virtio devices correctly. We work around this by explicitly adding disable-legacy=off to the testcases. It would probably be better to update libqos so that it can handle modern virtio devices. David Gibson (3): pci/pcie: Make a consistent helper for switching PCI/PCIe "hybrid" devices pci: Allow host bridges to override PCI/PCIe hybrid device behaviour pseries: Allow PCIe virtio and XHCI on pseries machine type hw/pci/pci.c | 14 ++++++++++++++ hw/ppc/spapr_pci.c | 9 +++++++++ hw/usb/hcd-xhci.c | 2 +- hw/virtio/virtio-pci.c | 3 +-- include/hw/pci/pci.h | 1 + include/hw/pci/pci_host.h | 1 + tests/virtio-9p-test.c | 2 +- tests/virtio-blk-test.c | 4 ++-- tests/virtio-net-test.c | 2 +- tests/virtio-scsi-test.c | 2 +- 10 files changed, 32 insertions(+), 8 deletions(-) -- 2.9.3