From nobody Thu May 2 18:11:02 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.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 149321191340444.05680286921711; Wed, 26 Apr 2017 06:05:13 -0700 (PDT) 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 3BB21C054C5A; Wed, 26 Apr 2017 13:05:11 +0000 (UTC) Received: from colo-mx.corp.redhat.com (unknown [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id ED13996536; Wed, 26 Apr 2017 13:05:10 +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 7DF515EC67; Wed, 26 Apr 2017 13:05:10 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v3QD589E003365 for ; Wed, 26 Apr 2017 09:05:08 -0400 Received: by smtp.corp.redhat.com (Postfix) id D30F591FBB; Wed, 26 Apr 2017 13:05:08 +0000 (UTC) Received: from angien.brq.redhat.com (dhcp129-47.brq.redhat.com [10.34.129.47]) by smtp.corp.redhat.com (Postfix) with ESMTP id 363C793299; Wed, 26 Apr 2017 13:05:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 3BB21C054C5A Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=libvir-list-bounces@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 3BB21C054C5A From: Peter Krempa To: libvir-list@redhat.com Date: Wed, 26 Apr 2017 15:05:00 +0200 Message-Id: <81687b0ec6ce5f449be57ef6ca5ea0a00fead53f.1493211900.git.pkrempa@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Cc: Peter Krempa Subject: [libvirt] [PATCH] qemu: numa: Don't return automatic nodeset for inactive domain 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.32]); Wed, 26 Apr 2017 13:05:12 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" qemuDomainGetNumaParameters would return the automatic nodeset even for the persistent config if the domain was running. This is incorrect since the automatic nodeset will be re-queried upon starting the vm. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=3D1445325 --- src/qemu/qemu_driver.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index e39de625d..1ba3e0943 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -9461,6 +9461,8 @@ qemuDomainGetNumaParameters(virDomainPtr dom, char *nodeset =3D NULL; int ret =3D -1; virDomainDefPtr def =3D NULL; + bool live =3D false; + virBitmapPtr autoNodeset =3D NULL; virCheckFlags(VIR_DOMAIN_AFFECT_LIVE | VIR_DOMAIN_AFFECT_CONFIG | @@ -9473,9 +9475,12 @@ qemuDomainGetNumaParameters(virDomainPtr dom, if (virDomainGetNumaParametersEnsureACL(dom->conn, vm->def) < 0) goto cleanup; - if (!(def =3D virDomainObjGetOneDef(vm, flags))) + if (!(def =3D virDomainObjGetOneDefState(vm, flags, &live))) goto cleanup; + if (live) + autoNodeset =3D priv->autoNodeset; + if ((*nparams) =3D=3D 0) { *nparams =3D QEMU_NB_NUMA_PARAM; ret =3D 0; @@ -9496,8 +9501,7 @@ qemuDomainGetNumaParameters(virDomainPtr dom, break; case 1: /* fill numa nodeset here */ - nodeset =3D virDomainNumatuneFormatNodeset(def->numa, - priv->autoNodeset, -1= ); + nodeset =3D virDomainNumatuneFormatNodeset(def->numa, autoNode= set, -1); if (!nodeset || virTypedParameterAssign(param, VIR_DOMAIN_NUMA_NODESET, VIR_TYPED_PARAM_STRING, nodeset) <= 0) --=20 2.12.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list