qemu: Rename qemuDomainSupportsNewVcpuHotplug to qemuDomainSupportsVcpuHotplug

Support for legacy cpu hotplug was removed a long time ago. At this
point this function only checks whether the current machine type
supports cpu hotplug.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Peter Krempa 2023-07-20 17:55:33 +02:00
parent 1612aa4d4a
commit c7a0a0fe11
3 changed files with 5 additions and 5 deletions

View File

@ -9981,7 +9981,7 @@ qemuDomainValidateVcpuInfo(virDomainObj *vm)
bool
qemuDomainSupportsNewVcpuHotplug(virDomainObj *vm)
qemuDomainSupportsVcpuHotplug(virDomainObj *vm)
{
qemuDomainObjPrivate *priv = vm->privateData;
@ -10018,7 +10018,7 @@ qemuDomainRefreshVcpuInfo(virDomainObj *vm,
int rc;
int ret = -1;
hotplug = qemuDomainSupportsNewVcpuHotplug(vm);
hotplug = qemuDomainSupportsVcpuHotplug(vm);
VIR_DEBUG("Maxvcpus %zu hotplug %d", maxvcpus, hotplug);
if (qemuDomainObjEnterMonitorAsync(vm, asyncJob) < 0)

View File

@ -860,7 +860,7 @@ int qemuDomainSetMaxMemLock(virDomainObj *vm,
int qemuDomainDefValidateMemoryHotplug(const virDomainDef *def,
const virDomainMemoryDef *mem);
bool qemuDomainSupportsNewVcpuHotplug(virDomainObj *vm);
bool qemuDomainSupportsVcpuHotplug(virDomainObj *vm);
bool qemuDomainHasVcpuPids(virDomainObj *vm);
pid_t qemuDomainGetVcpuPid(virDomainObj *vm, unsigned int vcpuid);
int qemuDomainValidateVcpuInfo(virDomainObj *vm);

View File

@ -6399,7 +6399,7 @@ qemuDomainHotplugAddVcpu(virQEMUDriver *driver,
size_t i;
bool vcpuTidMissing = false;
if (!qemuDomainSupportsNewVcpuHotplug(vm)) {
if (!qemuDomainSupportsVcpuHotplug(vm)) {
virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
_("cpu hotplug is not supported"));
return -1;
@ -6842,7 +6842,7 @@ qemuDomainSetVcpuInternal(virQEMUDriver *driver,
g_autoptr(virBitmap) livevcpus = NULL;
if (def) {
if (!qemuDomainSupportsNewVcpuHotplug(vm)) {
if (!qemuDomainSupportsVcpuHotplug(vm)) {
virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
_("this qemu version does not support specific vCPU hotplug"));
return -1;