
On Tue, 2016-09-20 at 15:14 -0400, Laine Stump wrote:
An upcoming commit will remove the "flag" argument from all the calls to reserve the next available address|slot, but I don't want to change the arguments in the hypervisor-agnostic virDomainPCIAddressReserveNext*() functions, so this patch places a simple qemu-specific wrapper around those functions - the new functions don't take a flags arg, but grab it from the device's info->pciConnectFlags. --- src/qemu/qemu_domain_address.c | 92 ++++++++++++++++++++++++++---------------- 1 file changed, 57 insertions(+), 35 deletions(-) [...] @@ -940,7 +961,7 @@ qemuDomainValidateDevicePCISlotsPIIX3(virDomainDefPtr def, if (virDomainPCIAddressSlotInUse(addrs, &tmp_addr)) { if (qemuDeviceVideoUsable) { - if (virDomainPCIAddressReserveNextSlot(addrs, + if (qemuDomainPCIAddressReserveNextSlot(addrs, &primaryVideo->info, flags) < 0) goto cleanup; @@ -1133,7 +1154,7 @@ qemuDomainValidateDevicePCISlotsQ35(virDomainDefPtr def, if (virDomainPCIAddressSlotInUse(addrs, &tmp_addr)) { if (qemuDeviceVideoUsable) { - if (virDomainPCIAddressReserveNextSlot(addrs, + if (qemuDomainPCIAddressReserveNextSlot(addrs, &primaryVideo->info, flags) < 0)
Alignment is off after the change. [...]
@@ -1399,14 +1421,15 @@ qemuDomainAssignDevicePCISlots(virDomainDefPtr def, } else { /* This is the first part of the controller, so need * to find a free slot & then reserve this function */ - if (virDomainPCIAddressReserveNextAddr(addrs, &cont->info, flags, - addr.function, false) < 0) + if (qemuDomainPCIAddressReserveNextAddr(addrs, &cont->info, flags, + addr.function, false) < 0)
Please reformat this call to make all lines <80 columns while you're at it. ACK -- Andrea Bolognani / Red Hat / Virtualization