提交 b416a33a 编写于 作者: P Peter Krempa

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.
上级 86d69c30
...@@ -5784,13 +5784,15 @@ qemuDomainSetVcpuConfig(virDomainDefPtr def, ...@@ -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;
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册