[PATCH 2/6] conf: permit auto-assignment of *non-hotpluggable* PCI devices to pcie-root

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

 



Although the slots in pcie-root (aka pcie.0 aka "the PCIe Root
Complex") are PCIe slots, and the PCIe spec usually doesn't like
putting legacy PCI devices in PCIe slots, these are an exception -
"according to my sources" (i.e. I haven't read the spec myself, but
know people who have), the PCIe spec expressly permits legacy PCI
devices plugged directly into the root complex.

This patch changes the connection-type flags for pcie-root to allow
legacy PCI endpoint devices. For now this has no effect in practice,
since qemuDomainAssignDevicePCISlots() sets the HOTPLUGGABLE flag for
all devices except PCI controllers, and pcie-root doesn't allow
devices that have HOTPLUGGABLE set - that will be remedied in later
patches.
---
 src/conf/domain_addr.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/conf/domain_addr.c b/src/conf/domain_addr.c
index 8956295..5533b11 100644
--- a/src/conf/domain_addr.c
+++ b/src/conf/domain_addr.c
@@ -285,12 +285,12 @@ virDomainPCIAddressBusSetModel(virDomainPCIAddressBusPtr bus,
         break;
 
     case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_ROOT:
-        /* slots 1 - 31, no hotplug, PCIe endpoint device or
-         * pcie-root-port only, unless the address was specified in
-         * user config *and* the particular device being attached also
-         * allows it.
+        /* slots 1 - 31, *no hotplug*
+         * both PCIe and legacy PCI devices are allowed, as well as
+         * pcie-root-port, dmi-to-pci-bridge, and pcie-expander-bus.
          */
         bus->flags = (VIR_PCI_CONNECT_TYPE_PCIE_DEVICE |
+                      VIR_PCI_CONNECT_TYPE_PCI_DEVICE |
                       VIR_PCI_CONNECT_TYPE_PCIE_ROOT_PORT |
                       VIR_PCI_CONNECT_TYPE_DMI_TO_PCI_BRIDGE |
                       VIR_PCI_CONNECT_TYPE_PCIE_EXPANDER_BUS);
-- 
2.7.4

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]