and addresses aren't saved in device infos */
/* If true, the guest can have multiple pci-root controllers */
bool areMultipleRootsSupported;
+ /* If true, the guest can use the pcie-to-pci-bridge controller */
+ bool isPCIeToPCIBridgeSupported;
};
typedef struct _virDomainPCIAddressSet virDomainPCIAddressSet;
typedef virDomainPCIAddressSet *virDomainPCIAddressSetPtr;
static virDomainPCIAddressSetPtr
qemuDomainPCIAddressSetCreate(virDomainDefPtr def,
+ virQEMUCapsPtr qemuCaps,
unsigned int nbuses,
bool dryRun)
{
if (qemuDomainIsPSeries(def))
addrs->areMultipleRootsSupported = true;
+ if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_PCIE_PCI_BRIDGE))
+ addrs->isPCIeToPCIBridgeSupported = true;
+
for (i = 0; i < def->ncontrollers; i++) {
virDomainControllerDefPtr cont = def->controllers[i];
size_t idx = cont->idx;
if (nbuses > 0) {
/* 1st pass to figure out how many PCI bridges we need */
- if (!(addrs = qemuDomainPCIAddressSetCreate(def, nbuses, true)))
+ if (!(addrs = qemuDomainPCIAddressSetCreate(def, qemuCaps, nbuses, true)))
goto cleanup;
if (qemuDomainValidateDevicePCISlotsChipsets(def, qemuCaps,
addrs = NULL;
}
- if (!(addrs = qemuDomainPCIAddressSetCreate(def, nbuses, false)))
+ if (!(addrs = qemuDomainPCIAddressSetCreate(def, qemuCaps, nbuses, false)))
goto cleanup;
if (qemuDomainSupportsPCI(def, qemuCaps)) {