mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-23 21:15:20 +00:00
qemu: domain: Don't infer vcpu state
Use the state information (online, hotpluggable) provided by the monitor code rather than trying to infer it. This fixes an issue where on architectures that require hotplug of multiple threads at once the sub-cores would get updated as offline on daemon restart thus creating an invalid configuration. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1375783
This commit is contained in:
parent
2a0e68be91
commit
64bc75f756
@ -5941,15 +5941,11 @@ qemuDomainRefreshVcpuInfo(virQEMUDriverPtr driver,
|
|||||||
vcpupriv->enable_id = info[i].id;
|
vcpupriv->enable_id = info[i].id;
|
||||||
|
|
||||||
if (hotplug && state) {
|
if (hotplug && state) {
|
||||||
vcpu->online = !!info[i].qom_path;
|
vcpu->online = info[i].online;
|
||||||
|
if (info[i].hotpluggable)
|
||||||
/* mark cpus that don't have an alias as non-hotpluggable */
|
vcpu->hotpluggable = VIR_TRISTATE_BOOL_YES;
|
||||||
if (vcpu->online) {
|
else
|
||||||
if (vcpupriv->alias)
|
vcpu->hotpluggable = VIR_TRISTATE_BOOL_NO;
|
||||||
vcpu->hotpluggable = VIR_TRISTATE_BOOL_YES;
|
|
||||||
else
|
|
||||||
vcpu->hotpluggable = VIR_TRISTATE_BOOL_NO;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user