render / rpms / libvirt

Forked from rpms/libvirt 9 months ago
Clone
3e5111
From 3c2e5075ef3be22f203177cc9a1a912546d37ffe Mon Sep 17 00:00:00 2001
3e5111
Message-Id: <3c2e5075ef3be22f203177cc9a1a912546d37ffe@dist-git>
3e5111
From: Peter Krempa <pkrempa@redhat.com>
3e5111
Date: Tue, 4 Apr 2017 09:31:22 +0200
3e5111
Subject: [PATCH] qemu: hotplug: Clear vcpu ordering for coldplug of vcpus
3e5111
3e5111
Vcpu order is required to stay sequential. Clear the order on cpu
3e5111
coldplug to avoid issues with removing vcpus out of sequence.
3e5111
3e5111
(cherry picked from commit b416a33a6f49b7755a65d0de4ee09c770b79cc8d)
3e5111
3e5111
https://bugzilla.redhat.com/show_bug.cgi?id=1437010
3e5111
---
3e5111
 src/qemu/qemu_hotplug.c | 4 +++-
3e5111
 1 file changed, 3 insertions(+), 1 deletion(-)
3e5111
3e5111
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
3e5111
index 48de6b815..5488b1dd4 100644
3e5111
--- a/src/qemu/qemu_hotplug.c
3e5111
+++ b/src/qemu/qemu_hotplug.c
3e5111
@@ -5784,13 +5784,15 @@ qemuDomainSetVcpuConfig(virDomainDefPtr def,
3e5111
 
3e5111
     def->individualvcpus = true;
3e5111
 
3e5111
+    /* ordering information may become invalid, thus clear it */
3e5111
+    virDomainDefVcpuOrderClear(def);
3e5111
+
3e5111
     while ((next = virBitmapNextSetBit(map, next)) >= 0) {
3e5111
         if (!(vcpu = virDomainDefGetVcpu(def, next)))
3e5111
             continue;
3e5111
 
3e5111
         vcpu->online = state;
3e5111
         vcpu->hotpluggable = VIR_TRISTATE_BOOL_YES;
3e5111
-        vcpu->order = 0;
3e5111
     }
3e5111
 }
3e5111
 
3e5111
-- 
3e5111
2.12.2
3e5111