fromConfig should be true if the caller want virDomainPCIAddressValidate() to loosen restrictions on its interpretation of the pciConnectFlags. In particular, either PCI_DEVICE or PCIE_DEVICE will be counted as equivalent to both, and HOTPLUG will be ignored. In a few cases where libvirt was manually overriding automatic address assignment, it was setting fromConfig to false when validating the hardcoded manual override. This patch changes those to fromConfig=true as a preemptive strike against any future bugs that might otherwise surface. --- src/conf/domain_addr.c | 2 +- src/qemu/qemu_domain_address.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/conf/domain_addr.c b/src/conf/domain_addr.c index babe2ad..50151ae 100644 --- a/src/conf/domain_addr.c +++ b/src/conf/domain_addr.c @@ -661,7 +661,7 @@ virDomainPCIAddressReleaseSlot(virDomainPCIAddressSetPtr addrs, if (!(addrStr = virDomainPCIAddressAsString(addr))) goto cleanup; - if (!virDomainPCIAddressValidate(addrs, addr, addrStr, flags, false)) + if (!virDomainPCIAddressValidate(addrs, addr, addrStr, flags, true)) goto cleanup; addrs->buses[addr->bus].slot[addr->slot].functions = 0; diff --git a/src/qemu/qemu_domain_address.c b/src/qemu/qemu_domain_address.c index 442d3ad..59dbe22 100644 --- a/src/qemu/qemu_domain_address.c +++ b/src/qemu/qemu_domain_address.c @@ -1162,7 +1162,7 @@ qemuDomainValidateDevicePCISlotsPIIX3(virDomainDefPtr def, if (!(addrStr = virDomainPCIAddressAsString(&tmp_addr))) goto cleanup; if (!virDomainPCIAddressValidate(addrs, &tmp_addr, - addrStr, flags, false)) + addrStr, flags, true)) goto cleanup; if (virDomainPCIAddressSlotInUse(addrs, &tmp_addr)) { @@ -1351,7 +1351,7 @@ qemuDomainValidateDevicePCISlotsQ35(virDomainDefPtr def, if (!(addrStr = virDomainPCIAddressAsString(&tmp_addr))) goto cleanup; if (!virDomainPCIAddressValidate(addrs, &tmp_addr, - addrStr, flags, false)) + addrStr, flags, true)) goto cleanup; if (virDomainPCIAddressSlotInUse(addrs, &tmp_addr)) { -- 2.7.4 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list