mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 06:05:27 +00:00
qemu: hotplug: Clear vcpu ordering for coldplug of vcpus
Vcpu order is required to stay sequential. Clear the order on cpu
coldplug to avoid issues with removing vcpus out of sequence.
(cherry picked from commit b416a33a6f
)
This commit is contained in:
parent
64cf4128a7
commit
0a1c9b6345
@ -5784,13 +5784,15 @@ qemuDomainSetVcpuConfig(virDomainDefPtr def,
|
|||||||
|
|
||||||
def->individualvcpus = true;
|
def->individualvcpus = true;
|
||||||
|
|
||||||
|
/* ordering information may become invalid, thus clear it */
|
||||||
|
virDomainDefVcpuOrderClear(def);
|
||||||
|
|
||||||
while ((next = virBitmapNextSetBit(map, next)) >= 0) {
|
while ((next = virBitmapNextSetBit(map, next)) >= 0) {
|
||||||
if (!(vcpu = virDomainDefGetVcpu(def, next)))
|
if (!(vcpu = virDomainDefGetVcpu(def, next)))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
vcpu->online = state;
|
vcpu->online = state;
|
||||||
vcpu->hotpluggable = VIR_TRISTATE_BOOL_YES;
|
vcpu->hotpluggable = VIR_TRISTATE_BOOL_YES;
|
||||||
vcpu->order = 0;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user