mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-30 16:35:24 +00:00
qemu: rename qemuDomainPCIAddressReserveNextSlot() to ...Addr()
This function doesn't actually reserve an entire slot any more, it reserves a single PCI address, so this name is more appropriate.
This commit is contained in:
parent
c5aea19d56
commit
6cc2014202
@ -935,7 +935,7 @@ qemuDomainFillDevicePCIConnectFlags(virDomainDefPtr def,
|
||||
|
||||
|
||||
static int
|
||||
qemuDomainPCIAddressReserveNextSlot(virDomainPCIAddressSetPtr addrs,
|
||||
qemuDomainPCIAddressReserveNextAddr(virDomainPCIAddressSetPtr addrs,
|
||||
virDomainDeviceInfoPtr dev)
|
||||
{
|
||||
return virDomainPCIAddressReserveNextAddr(addrs, dev,
|
||||
@ -1202,7 +1202,7 @@ qemuDomainValidateDevicePCISlotsPIIX3(virDomainDefPtr def,
|
||||
|
||||
if (virDomainPCIAddressSlotInUse(addrs, &tmp_addr)) {
|
||||
if (qemuDeviceVideoUsable) {
|
||||
if (qemuDomainPCIAddressReserveNextSlot(addrs,
|
||||
if (qemuDomainPCIAddressReserveNextAddr(addrs,
|
||||
&primaryVideo->info) < 0) {
|
||||
goto cleanup;
|
||||
}
|
||||
@ -1394,7 +1394,7 @@ qemuDomainValidateDevicePCISlotsQ35(virDomainDefPtr def,
|
||||
|
||||
if (virDomainPCIAddressSlotInUse(addrs, &tmp_addr)) {
|
||||
if (qemuDeviceVideoUsable) {
|
||||
if (qemuDomainPCIAddressReserveNextSlot(addrs,
|
||||
if (qemuDomainPCIAddressReserveNextAddr(addrs,
|
||||
&primaryVideo->info) < 0)
|
||||
goto cleanup;
|
||||
} else {
|
||||
@ -1555,7 +1555,7 @@ qemuDomainAssignDevicePCISlots(virDomainDefPtr def,
|
||||
!virDeviceInfoPCIAddressWanted(&cont->info))
|
||||
continue;
|
||||
|
||||
if (qemuDomainPCIAddressReserveNextSlot(addrs, &cont->info) < 0)
|
||||
if (qemuDomainPCIAddressReserveNextAddr(addrs, &cont->info) < 0)
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
@ -1566,7 +1566,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;
|
||||
}
|
||||
|
||||
@ -1583,7 +1583,7 @@ qemuDomainAssignDevicePCISlots(virDomainDefPtr def,
|
||||
continue;
|
||||
}
|
||||
|
||||
if (qemuDomainPCIAddressReserveNextSlot(addrs, &net->info) < 0)
|
||||
if (qemuDomainPCIAddressReserveNextAddr(addrs, &net->info) < 0)
|
||||
goto error;
|
||||
}
|
||||
|
||||
@ -1601,7 +1601,7 @@ qemuDomainAssignDevicePCISlots(virDomainDefPtr def,
|
||||
continue;
|
||||
}
|
||||
|
||||
if (qemuDomainPCIAddressReserveNextSlot(addrs, &sound->info) < 0)
|
||||
if (qemuDomainPCIAddressReserveNextAddr(addrs, &sound->info) < 0)
|
||||
goto error;
|
||||
}
|
||||
|
||||
@ -1687,7 +1687,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;
|
||||
}
|
||||
}
|
||||
@ -1719,7 +1719,7 @@ qemuDomainAssignDevicePCISlots(virDomainDefPtr def,
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (qemuDomainPCIAddressReserveNextSlot(addrs, &def->disks[i]->info) < 0)
|
||||
if (qemuDomainPCIAddressReserveNextAddr(addrs, &def->disks[i]->info) < 0)
|
||||
goto error;
|
||||
}
|
||||
|
||||
@ -1733,7 +1733,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;
|
||||
}
|
||||
@ -1743,7 +1743,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;
|
||||
}
|
||||
@ -1754,7 +1754,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;
|
||||
}
|
||||
|
||||
@ -1762,7 +1762,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;
|
||||
}
|
||||
|
||||
@ -1770,7 +1770,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;
|
||||
}
|
||||
|
||||
@ -1778,7 +1778,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;
|
||||
}
|
||||
|
||||
@ -1787,7 +1787,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++) {
|
||||
@ -1795,7 +1795,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++) {
|
||||
@ -1808,7 +1808,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++) {
|
||||
@ -2028,7 +2028,7 @@ qemuDomainAssignPCIAddresses(virDomainDefPtr def,
|
||||
}
|
||||
}
|
||||
if (!buses_reserved &&
|
||||
qemuDomainPCIAddressReserveNextSlot(addrs, &info) < 0)
|
||||
qemuDomainPCIAddressReserveNextAddr(addrs, &info) < 0)
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
@ -2060,7 +2060,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;
|
||||
}
|
||||
|
||||
@ -2100,9 +2100,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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user