From: Peter Krempa Date: Fri, 31 Mar 2017 11:05:47 +0000 (+0200) Subject: qemu: hotplug: Clear vcpu ordering for coldplug of vcpus X-Git-Tag: v3.2.1~66 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0a1c9b63457c65c6d5e298add8b04026f0f92d94;p=thirdparty%2Flibvirt.git 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 b416a33a6f49b7755a65d0de4ee09c770b79cc8d) --- diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 48de6b8154..5488b1dd4d 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -5784,13 +5784,15 @@ qemuDomainSetVcpuConfig(virDomainDefPtr def, def->individualvcpus = true; + /* ordering information may become invalid, thus clear it */ + virDomainDefVcpuOrderClear(def); + while ((next = virBitmapNextSetBit(map, next)) >= 0) { if (!(vcpu = virDomainDefGetVcpu(def, next))) continue; vcpu->online = state; vcpu->hotpluggable = VIR_TRISTATE_BOOL_YES; - vcpu->order = 0; } }