From: Viktor Mihajlovski Date: Tue, 6 Feb 2018 10:18:56 +0000 (+0100) Subject: qemu: Limit refresh of CPU halted state to s390 X-Git-Tag: v4.1.0-rc1~157 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=818a29e0c7d6840e87e9ca6019b9f0bc1983566e;p=thirdparty%2Flibvirt.git qemu: Limit refresh of CPU halted state to s390 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 --- diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 5395cd093c..aa652959ed 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -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;