c1c534
From bda9cc7585816a5233beba2661510ecc4d69c4e2 Mon Sep 17 00:00:00 2001
c1c534
Message-Id: <bda9cc7585816a5233beba2661510ecc4d69c4e2@dist-git>
c1c534
From: Viktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
c1c534
Date: Wed, 7 Feb 2018 14:16:02 +0100
c1c534
Subject: [PATCH] qemu: Limit refresh of CPU halted state to s390
c1c534
c1c534
Refreshing the halted state can cause VM performance issues. Since
c1c534
s390 is currently the only architecture with a known interest in
c1c534
the halted state, we're avoiding to call QEMU on other platforms.
c1c534
c1c534
Signed-off-by: Viktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
c1c534
(cherry picked from commit 818a29e0c7d6840e87e9ca6019b9f0bc1983566e)
c1c534
c1c534
https://bugzilla.redhat.com/show_bug.cgi?id=1534585
c1c534
---
c1c534
 src/qemu/qemu_domain.c | 5 +++++
c1c534
 1 file changed, 5 insertions(+)
c1c534
c1c534
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
c1c534
index e87c7d030c..0f7f3b7f50 100644
c1c534
--- a/src/qemu/qemu_domain.c
c1c534
+++ b/src/qemu/qemu_domain.c
c1c534
@@ -7989,6 +7989,11 @@ qemuDomainRefreshVcpuHalted(virQEMUDriverPtr driver,
c1c534
     if (vm->def->virtType == VIR_DOMAIN_VIRT_QEMU)
c1c534
         return 0;
c1c534
 
c1c534
+    /* The halted state is interresting only on s390(x). On other platforms
c1c534
+     * the data would be stale at the time when it would be used. */
c1c534
+    if (!ARCH_IS_S390(vm->def->os.arch))
c1c534
+        return 0;
c1c534
+
c1c534
     if (qemuDomainObjEnterMonitorAsync(driver, vm, asyncJob) < 0)
c1c534
         return -1;
c1c534
 
c1c534
-- 
c1c534
2.16.1
c1c534