From nobody Fri May 3 07:54:06 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1517931122295447.7930420527997; Tue, 6 Feb 2018 07:32:02 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 24F933AD98; Tue, 6 Feb 2018 15:32:01 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BA16A2D35B; Tue, 6 Feb 2018 15:32:00 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 4D1BE4A46C; Tue, 6 Feb 2018 15:32:00 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w16FVq1Y022869 for ; Tue, 6 Feb 2018 10:31:52 -0500 Received: by smtp.corp.redhat.com (Postfix) id 5C1AC60C4D; Tue, 6 Feb 2018 15:31:52 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.136]) by smtp.corp.redhat.com (Postfix) with ESMTP id 33ABC51C3F; Tue, 6 Feb 2018 15:31:44 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Tue, 6 Feb 2018 16:30:52 +0100 Message-Id: <681d15f17395fdeaf9be461d2dd94d092d27ed97.1517930985.git.pkrempa@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Cc: Peter Krempa Subject: [libvirt] [PATCH 1/4] qemu: driver: Extract vcpu halted state directly X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Tue, 06 Feb 2018 15:32:01 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Don't extract the halted state into a separate array, but rater access the vcpu structures directly. We still need to call the vcpu helper to retrieve the performance statistics though. --- src/qemu/qemu_driver.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index bff49e7be6..172a8a3f73 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -19660,12 +19660,14 @@ qemuDomainGetStatsVcpu(virQEMUDriverPtr driver, int *maxparams, unsigned int privflags) { + virDomainVcpuDefPtr vcpu; + qemuDomainVcpuPrivatePtr vcpupriv; size_t i; int ret =3D -1; char param_name[VIR_TYPED_PARAM_FIELD_LENGTH]; virVcpuInfoPtr cpuinfo =3D NULL; unsigned long long *cpuwait =3D NULL; - bool *cpuhalted =3D NULL; + bool vcpuhalted =3D false; if (virTypedParamsAddUInt(&record->params, &record->nparams, @@ -19691,14 +19693,14 @@ qemuDomainGetStatsVcpu(virQEMUDriverPtr driver, /* it's ok to be silent and go ahead, because halted vcpu info * wasn't here from the beginning */ virResetLastError(); - } else if (VIR_ALLOC_N(cpuhalted, virDomainDefGetVcpus(dom->def)) = < 0) { - goto cleanup; + } else { + vcpuhalted =3D true; } } if (qemuDomainHelperGetVcpus(dom, cpuinfo, cpuwait, virDomainDefGetVcpus(dom->def), - NULL, 0, cpuhalted) < 0) { + NULL, 0, NULL) < 0) { virResetLastError(); ret =3D 0; /* it's ok to be silent and go ahead */ goto cleanup; @@ -19735,14 +19737,20 @@ qemuDomainGetStatsVcpu(virQEMUDriverPtr driver, cpuwait[i]) < 0) goto cleanup; - if (cpuhalted) { + /* state below is extracted from the individual vcpu structs */ + if (!(vcpu =3D virDomainDefGetVcpu(dom->def, cpuinfo[i].number))) + continue; + + vcpupriv =3D QEMU_DOMAIN_VCPU_PRIVATE(vcpu); + + if (vcpuhalted) { snprintf(param_name, VIR_TYPED_PARAM_FIELD_LENGTH, "vcpu.%u.halted", cpuinfo[i].number); if (virTypedParamsAddBoolean(&record->params, &record->nparams, maxparams, param_name, - cpuhalted[i]) < 0) + vcpupriv->halted) < 0) goto cleanup; } } @@ -19752,7 +19760,6 @@ qemuDomainGetStatsVcpu(virQEMUDriverPtr driver, cleanup: VIR_FREE(cpuinfo); VIR_FREE(cpuwait); - VIR_FREE(cpuhalted); return ret; } --=20 2.15.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Fri May 3 07:54:06 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1517931125134273.93913062435763; Tue, 6 Feb 2018 07:32:05 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 45F408762E; Tue, 6 Feb 2018 15:32:03 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0AA3F2D35B; Tue, 6 Feb 2018 15:32:03 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 9E9904A46E; Tue, 6 Feb 2018 15:32:02 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w16FW1x0022895 for ; Tue, 6 Feb 2018 10:32:01 -0500 Received: by smtp.corp.redhat.com (Postfix) id ADE165C2E5; Tue, 6 Feb 2018 15:32:00 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.136]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0FCD4609C0; Tue, 6 Feb 2018 15:31:52 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Tue, 6 Feb 2018 16:30:53 +0100 Message-Id: <4a718a204ad2d0b97f90b40e21006b7fcd7da9c3.1517930985.git.pkrempa@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Cc: Peter Krempa Subject: [libvirt] [PATCH 2/4] qemu: Remove unused 'cpuhalted' argument from qemuDomainHelperGetVcpus X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Tue, 06 Feb 2018 15:32:04 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" The halted state is no longer extracted using this helper so the argument can be removed. --- src/qemu/qemu_driver.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 172a8a3f73..eaa6049fee 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -1490,8 +1490,7 @@ qemuDomainHelperGetVcpus(virDomainObjPtr vm, unsigned long long *cpuwait, int maxinfo, unsigned char *cpumaps, - int maplen, - bool *cpuhalted) + int maplen) { size_t ncpuinfo =3D 0; size_t i; @@ -1511,9 +1510,6 @@ qemuDomainHelperGetVcpus(virDomainObjPtr vm, if (cpumaps) memset(cpumaps, 0, sizeof(*cpumaps) * maxinfo); - if (cpuhalted) - memset(cpuhalted, 0, sizeof(*cpuhalted) * maxinfo); - for (i =3D 0; i < virDomainDefGetVcpusMax(vm->def) && ncpuinfo < maxin= fo; i++) { virDomainVcpuDefPtr vcpu =3D virDomainDefGetVcpu(vm->def, i); pid_t vcpupid =3D qemuDomainGetVcpuPid(vm, i); @@ -1551,9 +1547,6 @@ qemuDomainHelperGetVcpus(virDomainObjPtr vm, return -1; } - if (cpuhalted) - cpuhalted[ncpuinfo] =3D qemuDomainGetVcpuHalted(vm, ncpuinfo); - ncpuinfo++; } @@ -5461,8 +5454,7 @@ qemuDomainGetVcpus(virDomainPtr dom, goto cleanup; } - ret =3D qemuDomainHelperGetVcpus(vm, info, NULL, maxinfo, cpumaps, map= len, - NULL); + ret =3D qemuDomainHelperGetVcpus(vm, info, NULL, maxinfo, cpumaps, map= len); cleanup: virDomainObjEndAPI(&vm); @@ -19700,7 +19692,7 @@ qemuDomainGetStatsVcpu(virQEMUDriverPtr driver, if (qemuDomainHelperGetVcpus(dom, cpuinfo, cpuwait, virDomainDefGetVcpus(dom->def), - NULL, 0, NULL) < 0) { + NULL, 0) < 0) { virResetLastError(); ret =3D 0; /* it's ok to be silent and go ahead */ goto cleanup; --=20 2.15.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Fri May 3 07:54:06 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1517931175018843.7732544035042; Tue, 6 Feb 2018 07:32:55 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id CE1925415E; Tue, 6 Feb 2018 15:32:53 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9E95F51DD7; Tue, 6 Feb 2018 15:32:52 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id CD1F54A477; Tue, 6 Feb 2018 15:32:49 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w16FWms0023320 for ; Tue, 6 Feb 2018 10:32:48 -0500 Received: by smtp.corp.redhat.com (Postfix) id CBDD951C5C; Tue, 6 Feb 2018 15:32:48 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.136]) by smtp.corp.redhat.com (Postfix) with ESMTP id 40F1F609C0; Tue, 6 Feb 2018 15:32:00 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Tue, 6 Feb 2018 16:30:54 +0100 Message-Id: In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Cc: Peter Krempa Subject: [libvirt] [PATCH 3/4] qemu: domain: Store vcpu halted state as a tristate X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Tue, 06 Feb 2018 15:32:54 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Since it may be possible that the state is unknown in some cases we should store it as a tristate so that other code using it can determine whether the state was updated. --- src/qemu/qemu_domain.c | 3 ++- src/qemu/qemu_domain.h | 2 +- src/qemu/qemu_driver.c | 13 ++++--------- 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 429660689b..5395cd093c 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -8737,7 +8737,8 @@ qemuDomainRefreshVcpuHalted(virQEMUDriverPtr driver, for (i =3D 0; i < maxvcpus; i++) { vcpu =3D virDomainDefGetVcpu(vm->def, i); vcpupriv =3D QEMU_DOMAIN_VCPU_PRIVATE(vcpu); - vcpupriv->halted =3D virBitmapIsBitSet(haltedmap, vcpupriv->qemu_i= d); + vcpupriv->halted =3D virTristateBoolFromBool(virBitmapIsBitSet(hal= tedmap, + vcpup= riv->qemu_id)); } ret =3D 0; diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h index 25328cd110..f3ec5d8042 100644 --- a/src/qemu/qemu_domain.h +++ b/src/qemu/qemu_domain.h @@ -399,7 +399,7 @@ struct _qemuDomainVcpuPrivate { int enable_id; /* order in which the vcpus were enabled in qemu */ int qemu_id; /* ID reported by qemu as 'CPU' in query-cpus */ char *alias; - bool halted; + virTristateBool halted; /* information for hotpluggable cpus */ char *type; diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index eaa6049fee..8d77d8913a 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -19659,7 +19659,6 @@ qemuDomainGetStatsVcpu(virQEMUDriverPtr driver, char param_name[VIR_TYPED_PARAM_FIELD_LENGTH]; virVcpuInfoPtr cpuinfo =3D NULL; unsigned long long *cpuwait =3D NULL; - bool vcpuhalted =3D false; if (virTypedParamsAddUInt(&record->params, &record->nparams, @@ -19679,15 +19678,11 @@ qemuDomainGetStatsVcpu(virQEMUDriverPtr driver, VIR_ALLOC_N(cpuwait, virDomainDefGetVcpus(dom->def)) < 0) goto cleanup; - if (HAVE_JOB(privflags) && virDomainObjIsActive(dom)) { - if (qemuDomainRefreshVcpuHalted(driver, dom, - QEMU_ASYNC_JOB_NONE) < 0) { + if (HAVE_JOB(privflags) && virDomainObjIsActive(dom) && + qemuDomainRefreshVcpuHalted(driver, dom, QEMU_ASYNC_JOB_NONE) < 0)= { /* it's ok to be silent and go ahead, because halted vcpu info * wasn't here from the beginning */ virResetLastError(); - } else { - vcpuhalted =3D true; - } } if (qemuDomainHelperGetVcpus(dom, cpuinfo, cpuwait, @@ -19735,14 +19730,14 @@ qemuDomainGetStatsVcpu(virQEMUDriverPtr driver, vcpupriv =3D QEMU_DOMAIN_VCPU_PRIVATE(vcpu); - if (vcpuhalted) { + if (vcpupriv->halted !=3D VIR_TRISTATE_BOOL_ABSENT) { snprintf(param_name, VIR_TYPED_PARAM_FIELD_LENGTH, "vcpu.%u.halted", cpuinfo[i].number); if (virTypedParamsAddBoolean(&record->params, &record->nparams, maxparams, param_name, - vcpupriv->halted) < 0) + vcpupriv->halted =3D=3D VIR_TRIST= ATE_BOOL_YES) < 0) goto cleanup; } } --=20 2.15.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Fri May 3 07:54:06 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1517931209602780.7019113511492; Tue, 6 Feb 2018 07:33:29 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A0BA13AA1B; Tue, 6 Feb 2018 15:33:28 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6C6016F130; Tue, 6 Feb 2018 15:33:18 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 9FC5818033DF; Tue, 6 Feb 2018 15:33:17 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w16FXGR5023396 for ; Tue, 6 Feb 2018 10:33:16 -0500 Received: by smtp.corp.redhat.com (Postfix) id 3C15C51DD4; Tue, 6 Feb 2018 15:33:16 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.136]) by smtp.corp.redhat.com (Postfix) with ESMTP id 946CD51DD7; Tue, 6 Feb 2018 15:32:46 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Tue, 6 Feb 2018 16:30:55 +0100 Message-Id: <56c5bab9b7a6267b5b110d0ce18a94e936f11bc5.1517930985.git.pkrempa@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 4/4] qemu: Limit refresh of CPU halted state to s390 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Tue, 06 Feb 2018 15:33:29 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" From: Viktor Mihajlovski 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 --- src/qemu/qemu_domain.c | 5 +++++ 1 file changed, 5 insertions(+) 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 =3D=3D 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; --=20 2.15.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list