This function doesn't actually reserve an entire slot any more, it reserves a single PCI address, so this name is more appropriate. --- src/qemu/qemu_domain_address.c | 45 +++++++++++++++++++++--------------------- 1 file changed, 23 insertions(+), 22 deletions(-) diff --git a/src/qemu/qemu_domain_address.c b/src/qemu/qemu_domain_address.c index a9ea266..e6bba8a 100644 --- a/src/qemu/qemu_domain_address.c +++ b/src/qemu/qemu_domain_address.c @@ -890,7 +890,7 @@ qemuDomainFillDevicePCIConnectFlags(virDomainDefPtr def, static int -qemuDomainPCIAddressReserveNextSlot(virDomainPCIAddressSetPtr addrs, +qemuDomainPCIAddressReserveNextAddr(virDomainPCIAddressSetPtr addrs, virDomainDeviceInfoPtr dev) { return virDomainPCIAddressReserveNextAddr(addrs, dev, @@ -1157,7 +1157,7 @@ qemuDomainValidateDevicePCISlotsPIIX3(virDomainDefPtr def, if (virDomainPCIAddressSlotInUse(addrs, &tmp_addr)) { if (qemuDeviceVideoUsable) { - if (qemuDomainPCIAddressReserveNextSlot(addrs, + if (qemuDomainPCIAddressReserveNextAddr(addrs, &primaryVideo->info) < 0) { goto cleanup; } @@ -1349,7 +1349,7 @@ qemuDomainValidateDevicePCISlotsQ35(virDomainDefPtr def, if (virDomainPCIAddressSlotInUse(addrs, &tmp_addr)) { if (qemuDeviceVideoUsable) { - if (qemuDomainPCIAddressReserveNextSlot(addrs, + if (qemuDomainPCIAddressReserveNextAddr(addrs, &primaryVideo->info) < 0) goto cleanup; } else { @@ -1510,7 +1510,7 @@ qemuDomainAssignDevicePCISlots(virDomainDefPtr def, !virDeviceInfoPCIAddressWanted(&cont->info)) continue; - if (qemuDomainPCIAddressReserveNextSlot(addrs, &cont->info) < 0) + if (qemuDomainPCIAddressReserveNextAddr(addrs, &cont->info) < 0) goto error; } } @@ -1521,7 +1521,7 @@ qemuDomainAssignDevicePCISlots(virDomainDefPtr def, /* Only support VirtIO-9p-pci so far. If that changes, * we might need to skip devices here */ - if (qemuDomainPCIAddressReserveNextSlot(addrs, &def->fss[i]->info) < 0) + if (qemuDomainPCIAddressReserveNextAddr(addrs, &def->fss[i]->info) < 0) goto error; } @@ -1538,7 +1538,7 @@ qemuDomainAssignDevicePCISlots(virDomainDefPtr def, continue; } - if (qemuDomainPCIAddressReserveNextSlot(addrs, &net->info) < 0) + if (qemuDomainPCIAddressReserveNextAddr(addrs, &net->info) < 0) goto error; } @@ -1556,7 +1556,7 @@ qemuDomainAssignDevicePCISlots(virDomainDefPtr def, continue; } - if (qemuDomainPCIAddressReserveNextSlot(addrs, &sound->info) < 0) + if (qemuDomainPCIAddressReserveNextAddr(addrs, &sound->info) < 0) goto error; } @@ -1642,7 +1642,7 @@ qemuDomainAssignDevicePCISlots(virDomainDefPtr def, cont->info.addr.pci.multi = addr.multi; } } else { - if (qemuDomainPCIAddressReserveNextSlot(addrs, &cont->info) < 0) + if (qemuDomainPCIAddressReserveNextAddr(addrs, &cont->info) < 0) goto error; } } @@ -1674,7 +1674,7 @@ qemuDomainAssignDevicePCISlots(virDomainDefPtr def, goto error; } - if (qemuDomainPCIAddressReserveNextSlot(addrs, &def->disks[i]->info) < 0) + if (qemuDomainPCIAddressReserveNextAddr(addrs, &def->disks[i]->info) < 0) goto error; } @@ -1688,7 +1688,7 @@ qemuDomainAssignDevicePCISlots(virDomainDefPtr def, def->hostdevs[i]->source.subsys.type != VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_SCSI_HOST) continue; - if (qemuDomainPCIAddressReserveNextSlot(addrs, + if (qemuDomainPCIAddressReserveNextAddr(addrs, def->hostdevs[i]->info) < 0) goto error; } @@ -1698,7 +1698,7 @@ qemuDomainAssignDevicePCISlots(virDomainDefPtr def, def->memballoon->model == VIR_DOMAIN_MEMBALLOON_MODEL_VIRTIO && virDeviceInfoPCIAddressWanted(&def->memballoon->info)) { - if (qemuDomainPCIAddressReserveNextSlot(addrs, + if (qemuDomainPCIAddressReserveNextAddr(addrs, &def->memballoon->info) < 0) goto error; } @@ -1709,7 +1709,7 @@ qemuDomainAssignDevicePCISlots(virDomainDefPtr def, !virDeviceInfoPCIAddressWanted(&def->rngs[i]->info)) continue; - if (qemuDomainPCIAddressReserveNextSlot(addrs, &def->rngs[i]->info) < 0) + if (qemuDomainPCIAddressReserveNextAddr(addrs, &def->rngs[i]->info) < 0) goto error; } @@ -1717,7 +1717,7 @@ qemuDomainAssignDevicePCISlots(virDomainDefPtr def, if (def->watchdog && def->watchdog->model == VIR_DOMAIN_WATCHDOG_MODEL_I6300ESB && virDeviceInfoPCIAddressWanted(&def->watchdog->info)) { - if (qemuDomainPCIAddressReserveNextSlot(addrs, &def->watchdog->info) < 0) + if (qemuDomainPCIAddressReserveNextAddr(addrs, &def->watchdog->info) < 0) goto error; } @@ -1725,7 +1725,7 @@ qemuDomainAssignDevicePCISlots(virDomainDefPtr def, * assigned address. */ if (def->nvideos > 0 && virDeviceInfoPCIAddressWanted(&def->videos[0]->info)) { - if (qemuDomainPCIAddressReserveNextSlot(addrs, &def->videos[0]->info) < 0) + if (qemuDomainPCIAddressReserveNextAddr(addrs, &def->videos[0]->info) < 0) goto error; } @@ -1733,7 +1733,7 @@ qemuDomainAssignDevicePCISlots(virDomainDefPtr def, if (!virDeviceInfoPCIAddressWanted(&def->videos[i]->info)) continue; - if (qemuDomainPCIAddressReserveNextSlot(addrs, &def->videos[i]->info) < 0) + if (qemuDomainPCIAddressReserveNextAddr(addrs, &def->videos[i]->info) < 0) goto error; } @@ -1742,7 +1742,7 @@ qemuDomainAssignDevicePCISlots(virDomainDefPtr def, if (!virDeviceInfoPCIAddressWanted(&def->shmems[i]->info)) continue; - if (qemuDomainPCIAddressReserveNextSlot(addrs, &def->shmems[i]->info) < 0) + if (qemuDomainPCIAddressReserveNextAddr(addrs, &def->shmems[i]->info) < 0) goto error; } for (i = 0; i < def->ninputs; i++) { @@ -1750,7 +1750,7 @@ qemuDomainAssignDevicePCISlots(virDomainDefPtr def, !virDeviceInfoPCIAddressWanted(&def->inputs[i]->info)) continue; - if (qemuDomainPCIAddressReserveNextSlot(addrs, &def->inputs[i]->info) < 0) + if (qemuDomainPCIAddressReserveNextAddr(addrs, &def->inputs[i]->info) < 0) goto error; } for (i = 0; i < def->nparallels; i++) { @@ -1763,7 +1763,7 @@ qemuDomainAssignDevicePCISlots(virDomainDefPtr def, !virDeviceInfoPCIAddressWanted(&chr->info)) continue; - if (qemuDomainPCIAddressReserveNextSlot(addrs, &chr->info) < 0) + if (qemuDomainPCIAddressReserveNextAddr(addrs, &chr->info) < 0) goto error; } for (i = 0; i < def->nchannels; i++) { @@ -1983,7 +1983,7 @@ qemuDomainAssignPCIAddresses(virDomainDefPtr def, } } if (!buses_reserved && - qemuDomainPCIAddressReserveNextSlot(addrs, &info) < 0) + qemuDomainPCIAddressReserveNextAddr(addrs, &info) < 0) goto cleanup; } @@ -2015,7 +2015,7 @@ qemuDomainAssignPCIAddresses(virDomainDefPtr def, /* if there isn't an empty pcie-root-port, this will * cause one to be added */ - if (qemuDomainPCIAddressReserveNextSlot(addrs, &info) < 0) + if (qemuDomainPCIAddressReserveNextAddr(addrs, &info) < 0) goto cleanup; } @@ -2055,9 +2055,10 @@ qemuDomainAssignPCIAddresses(virDomainDefPtr def, dev.data.controller = def->controllers[contIndex]; /* set connect flags so it will be properly addressed */ qemuDomainFillDevicePCIConnectFlags(def, &dev, qemuCaps, driver); - if (qemuDomainPCIAddressReserveNextSlot(addrs, - &dev.data.controller->info) < 0) + if (qemuDomainPCIAddressReserveNextAddr(addrs, + &dev.data.controller->info) < 0) { goto cleanup; + } } nbuses = addrs->nbuses; -- 2.7.4 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list