mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 04:25:18 +00:00
conf: rename virDomainPCIAddressReserveSlot() 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
640ce18679
commit
27b0f971c4
@ -53,8 +53,10 @@ bhyveCollectPCIAddress(virDomainDefPtr def ATTRIBUTE_UNUSED,
|
||||
}
|
||||
}
|
||||
|
||||
if (virDomainPCIAddressReserveSlot(addrs, addr, VIR_PCI_CONNECT_TYPE_PCI_DEVICE) < 0)
|
||||
if (virDomainPCIAddressReserveAddr(addrs, addr,
|
||||
VIR_PCI_CONNECT_TYPE_PCI_DEVICE) < 0) {
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
ret = 0;
|
||||
cleanup:
|
||||
@ -94,8 +96,10 @@ bhyveAssignDevicePCISlots(virDomainDefPtr def,
|
||||
memset(&lpc_addr, 0, sizeof(lpc_addr));
|
||||
lpc_addr.slot = 0x1;
|
||||
|
||||
if (virDomainPCIAddressReserveSlot(addrs, &lpc_addr, VIR_PCI_CONNECT_TYPE_PCI_DEVICE) < 0)
|
||||
if (virDomainPCIAddressReserveAddr(addrs, &lpc_addr,
|
||||
VIR_PCI_CONNECT_TYPE_PCI_DEVICE) < 0) {
|
||||
goto error;
|
||||
}
|
||||
|
||||
for (i = 0; i < def->nnets; i++) {
|
||||
if (!virDeviceInfoPCIAddressWanted(&def->nets[i]->info))
|
||||
|
@ -587,7 +587,7 @@ virDomainPCIAddressReserveAddrInternal(virDomainPCIAddressSetPtr addrs,
|
||||
|
||||
|
||||
int
|
||||
virDomainPCIAddressReserveSlot(virDomainPCIAddressSetPtr addrs,
|
||||
virDomainPCIAddressReserveAddr(virDomainPCIAddressSetPtr addrs,
|
||||
virPCIDeviceAddressPtr addr,
|
||||
virDomainPCIConnectFlags flags)
|
||||
{
|
||||
|
@ -150,7 +150,7 @@ int virDomainPCIAddressSetGrow(virDomainPCIAddressSetPtr addrs,
|
||||
virDomainPCIConnectFlags flags)
|
||||
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
|
||||
|
||||
int virDomainPCIAddressReserveSlot(virDomainPCIAddressSetPtr addrs,
|
||||
int virDomainPCIAddressReserveAddr(virDomainPCIAddressSetPtr addrs,
|
||||
virPCIDeviceAddressPtr addr,
|
||||
virDomainPCIConnectFlags flags)
|
||||
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
|
||||
|
@ -100,8 +100,8 @@ virDomainPCIAddressBusSetModel;
|
||||
virDomainPCIAddressEnsureAddr;
|
||||
virDomainPCIAddressFlagsCompatible;
|
||||
virDomainPCIAddressReleaseSlot;
|
||||
virDomainPCIAddressReserveAddr;
|
||||
virDomainPCIAddressReserveNextAddr;
|
||||
virDomainPCIAddressReserveSlot;
|
||||
virDomainPCIAddressSetAllMulti;
|
||||
virDomainPCIAddressSetAlloc;
|
||||
virDomainPCIAddressSetFree;
|
||||
|
@ -1034,7 +1034,7 @@ qemuDomainCollectPCIAddress(virDomainDefPtr def ATTRIBUTE_UNUSED,
|
||||
}
|
||||
}
|
||||
|
||||
if (virDomainPCIAddressReserveSlot(addrs, addr,
|
||||
if (virDomainPCIAddressReserveAddr(addrs, addr,
|
||||
info->pciConnectFlags) < 0) {
|
||||
goto cleanup;
|
||||
}
|
||||
@ -1188,7 +1188,7 @@ qemuDomainValidateDevicePCISlotsPIIX3(virDomainDefPtr def,
|
||||
if (addrs->nbuses) {
|
||||
memset(&tmp_addr, 0, sizeof(tmp_addr));
|
||||
tmp_addr.slot = 1;
|
||||
if (virDomainPCIAddressReserveSlot(addrs, &tmp_addr, flags) < 0)
|
||||
if (virDomainPCIAddressReserveAddr(addrs, &tmp_addr, flags) < 0)
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
@ -1223,7 +1223,7 @@ qemuDomainValidateDevicePCISlotsPIIX3(virDomainDefPtr def,
|
||||
goto cleanup;
|
||||
}
|
||||
} else {
|
||||
if (virDomainPCIAddressReserveSlot(addrs, &tmp_addr, flags) < 0)
|
||||
if (virDomainPCIAddressReserveAddr(addrs, &tmp_addr, flags) < 0)
|
||||
goto cleanup;
|
||||
primaryVideo->info.addr.pci = tmp_addr;
|
||||
primaryVideo->info.type = VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI;
|
||||
@ -1248,7 +1248,7 @@ qemuDomainValidateDevicePCISlotsPIIX3(virDomainDefPtr def,
|
||||
VIR_DEBUG("PCI address 0:0:2.0 in use, future addition of a video"
|
||||
" device will not be possible without manual"
|
||||
" intervention");
|
||||
} else if (virDomainPCIAddressReserveSlot(addrs, &tmp_addr, flags) < 0) {
|
||||
} else if (virDomainPCIAddressReserveAddr(addrs, &tmp_addr, flags) < 0) {
|
||||
goto cleanup;
|
||||
}
|
||||
}
|
||||
@ -1324,7 +1324,7 @@ qemuDomainValidateDevicePCISlotsQ35(virDomainDefPtr def,
|
||||
assign = true;
|
||||
}
|
||||
if (assign) {
|
||||
if (virDomainPCIAddressReserveSlot(addrs,
|
||||
if (virDomainPCIAddressReserveAddr(addrs,
|
||||
&tmp_addr, flags) < 0) {
|
||||
goto cleanup;
|
||||
}
|
||||
@ -1349,7 +1349,7 @@ qemuDomainValidateDevicePCISlotsQ35(virDomainDefPtr def,
|
||||
memset(&tmp_addr, 0, sizeof(tmp_addr));
|
||||
tmp_addr.slot = 0x1E;
|
||||
if (!virDomainPCIAddressSlotInUse(addrs, &tmp_addr)) {
|
||||
if (virDomainPCIAddressReserveSlot(addrs,
|
||||
if (virDomainPCIAddressReserveAddr(addrs,
|
||||
&tmp_addr, flags) < 0) {
|
||||
goto cleanup;
|
||||
}
|
||||
@ -1375,12 +1375,12 @@ qemuDomainValidateDevicePCISlotsQ35(virDomainDefPtr def,
|
||||
tmp_addr.slot = 0x1F;
|
||||
tmp_addr.function = 0;
|
||||
tmp_addr.multi = VIR_TRISTATE_SWITCH_ON;
|
||||
if (virDomainPCIAddressReserveSlot(addrs, &tmp_addr, flags) < 0)
|
||||
if (virDomainPCIAddressReserveAddr(addrs, &tmp_addr, flags) < 0)
|
||||
goto cleanup;
|
||||
|
||||
tmp_addr.function = 3;
|
||||
tmp_addr.multi = VIR_TRISTATE_SWITCH_ABSENT;
|
||||
if (virDomainPCIAddressReserveSlot(addrs, &tmp_addr, flags) < 0)
|
||||
if (virDomainPCIAddressReserveAddr(addrs, &tmp_addr, flags) < 0)
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
@ -1414,7 +1414,7 @@ qemuDomainValidateDevicePCISlotsQ35(virDomainDefPtr def,
|
||||
goto cleanup;
|
||||
}
|
||||
} else {
|
||||
if (virDomainPCIAddressReserveSlot(addrs, &tmp_addr, flags) < 0)
|
||||
if (virDomainPCIAddressReserveAddr(addrs, &tmp_addr, flags) < 0)
|
||||
goto cleanup;
|
||||
primaryVideo->info.type = VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI;
|
||||
primaryVideo->info.addr.pci = tmp_addr;
|
||||
@ -1440,7 +1440,7 @@ qemuDomainValidateDevicePCISlotsQ35(virDomainDefPtr def,
|
||||
" device will not be possible without manual"
|
||||
" intervention");
|
||||
virResetLastError();
|
||||
} else if (virDomainPCIAddressReserveSlot(addrs,
|
||||
} else if (virDomainPCIAddressReserveAddr(addrs,
|
||||
&tmp_addr, flags) < 0) {
|
||||
goto cleanup;
|
||||
}
|
||||
@ -1462,7 +1462,7 @@ qemuDomainValidateDevicePCISlotsQ35(virDomainDefPtr def,
|
||||
!virDeviceInfoPCIAddressWanted(&sound->info)) {
|
||||
continue;
|
||||
}
|
||||
if (virDomainPCIAddressReserveSlot(addrs, &tmp_addr, flags) < 0)
|
||||
if (virDomainPCIAddressReserveAddr(addrs, &tmp_addr, flags) < 0)
|
||||
goto cleanup;
|
||||
|
||||
sound->info.type = VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI;
|
||||
@ -1678,7 +1678,7 @@ qemuDomainAssignDevicePCISlots(virDomainDefPtr def,
|
||||
|
||||
if (foundAddr) {
|
||||
/* Reserve this function on the slot we found */
|
||||
if (virDomainPCIAddressReserveSlot(addrs, &addr,
|
||||
if (virDomainPCIAddressReserveAddr(addrs, &addr,
|
||||
cont->info.pciConnectFlags) < 0) {
|
||||
goto error;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user