[PATCH 3/5] qemu: hotplug: Clear vcpu ordering for coldplug of vcpus

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Vcpu order is required to stay sequential. Clear the order on cpu
coldplug to avoid issues with removing vcpus out of sequence.
---
 src/qemu/qemu_hotplug.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index 48de6b815..5488b1dd4 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;
     }
 }

-- 
2.12.2

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux