]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: Limit refresh of CPU halted state to s390
authorViktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
Tue, 6 Feb 2018 10:18:56 +0000 (11:18 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 7 Feb 2018 12:57:00 +0000 (13:57 +0100)
Refreshing the halted state can cause VM performance issues. Since
s390 is currently the only architecture with a known interest in
the halted state, we're avoiding to call QEMU on other platforms.

Signed-off-by: Viktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
src/qemu/qemu_domain.c

index 5395cd093c24c65b19a89a556350f1c8f9aa883e..aa652959ed4d44bae4df4dcb3a0a29f37891145c 100644 (file)
@@ -8726,6 +8726,11 @@ qemuDomainRefreshVcpuHalted(virQEMUDriverPtr driver,
     if (vm->def->virtType == VIR_DOMAIN_VIRT_QEMU)
         return 0;
 
+    /* The halted state is interresting only on s390(x). On other platforms
+     * the data would be stale at the time when it would be used. */
+    if (!ARCH_IS_S390(vm->def->os.arch))
+        return 0;
+
     if (qemuDomainObjEnterMonitorAsync(driver, vm, asyncJob) < 0)
         return -1;