[PATCH 4/4] qemu: domain: Don't infer vcpu state

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

 



Use the state information (online, hotpluggable) provided by the monitor
code rather than trying to infer it. This fixes a issue where on
architectures that require hotplug of multiple threads at once the
sub-cores would get updated as offline on daemon restart thus creating
an invalid configuration.
---
 src/qemu/qemu_domain.c | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)

diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index fb766d0..3f16dbe 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -5941,15 +5941,11 @@ qemuDomainRefreshVcpuInfo(virQEMUDriverPtr driver,
         vcpupriv->enable_id = info[i].id;

         if (hotplug && state) {
-            vcpu->online = !!info[i].qom_path;
-
-            /* mark cpus that don't have an alias as non-hotpluggable */
-            if (vcpu->online) {
-                if (vcpupriv->alias)
-                    vcpu->hotpluggable = VIR_TRISTATE_BOOL_YES;
-                else
-                    vcpu->hotpluggable = VIR_TRISTATE_BOOL_NO;
-            }
+            vcpu->online = info[i].online;
+            if (info[i].hotpluggable)
+                vcpu->hotpluggable = VIR_TRISTATE_BOOL_YES;
+            else
+                vcpu->hotpluggable = VIR_TRISTATE_BOOL_NO;
         }
     }

-- 
2.10.0

--
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]