From nobody Thu May 2 15:54:36 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 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1513085889865713.714828418642; Tue, 12 Dec 2017 05:38:09 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id AE31249007; Tue, 12 Dec 2017 13:38:07 +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 3E7B86930E; Tue, 12 Dec 2017 13:38:07 +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 801AC4A467; Tue, 12 Dec 2017 13:38:05 +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 vBCDaoah018407 for ; Tue, 12 Dec 2017 08:36:50 -0500 Received: by smtp.corp.redhat.com (Postfix) id B5B875E9C7; Tue, 12 Dec 2017 13:36:50 +0000 (UTC) Received: from moe.brq.redhat.com (unknown [10.43.2.192]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3D3CB70A15 for ; Tue, 12 Dec 2017 13:36:49 +0000 (UTC) From: Michal Privoznik To: libvir-list@redhat.com Date: Tue, 12 Dec 2017 14:36:37 +0100 Message-Id: <2b908b908af463981c2a764c316e25b4abc311d4.1513085752.git.mprivozn@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 1/2] src: Export virDomainMemoryAccessType*String 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.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Tue, 12 Dec 2017 13:38:08 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" These are already exported at header file level because of VIR_ENUM_DECL being in numa_conf.h. However, they are not being exported at object level because of missing libvirt_private.syms record. Signed-off-by: Michal Privoznik Reviewed-by: John Ferlan --- src/libvirt_private.syms | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index de4ec4d44..7018ba0cd 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -718,6 +718,8 @@ virNodeDeviceEventUpdateNew; =20 =20 # conf/numa_conf.h +virDomainMemoryAccessTypeFromString; +virDomainMemoryAccessTypeToString; virDomainNumaCheckABIStability; virDomainNumaEquals; virDomainNumaFree; --=20 2.13.6 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu May 2 15:54:36 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 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1513085918295918.0683053461983; Tue, 12 Dec 2017 05:38:38 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BA57425C51; Tue, 12 Dec 2017 13:38:36 +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 96E8A5471B; Tue, 12 Dec 2017 13:38:36 +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 520504A468; Tue, 12 Dec 2017 13:38:35 +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 vBCDap2d018415 for ; Tue, 12 Dec 2017 08:36:51 -0500 Received: by smtp.corp.redhat.com (Postfix) id C40A15E9C7; Tue, 12 Dec 2017 13:36:51 +0000 (UTC) Received: from moe.brq.redhat.com (unknown [10.43.2.192]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3C2BD70A0C for ; Tue, 12 Dec 2017 13:36:50 +0000 (UTC) From: Michal Privoznik To: libvir-list@redhat.com Date: Tue, 12 Dec 2017 14:36:38 +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 Subject: [libvirt] [PATCH 2/2] qemuBuildMemPathStr: Forbid memoryBacking/access for non-numa case 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.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Tue, 12 Dec 2017 13:38:37 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" https://bugzilla.redhat.com/show_bug.cgi?id=3D1448149 If a domain has no numa nodes, that means we don't put any memory-backend-file onto the qemu command line. That in turn means we can't set access=3D'shared'. Therefore, we should produce an error instead of ignoring the setting silently. Signed-off-by: Michal Privoznik Reviewed-by: John Ferlan --- src/qemu/qemu_command.c | 9 +++ tests/qemuxml2argvdata/hugepages-memaccess3.xml | 87 +++++++++++++++++++++= ++++ tests/qemuxml2argvtest.c | 3 + 3 files changed, 99 insertions(+) create mode 100644 tests/qemuxml2argvdata/hugepages-memaccess3.xml diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 2dd50a214..dfc17ce34 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -7682,6 +7682,15 @@ qemuBuildMemPathStr(virQEMUDriverConfigPtr cfg, return -1; } =20 + if (def->mem.access !=3D VIR_DOMAIN_MEMORY_ACCESS_DEFAULT && + def->mem.access !=3D VIR_DOMAIN_MEMORY_ACCESS_PRIVATE) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("memory access mode '%s' not supported " + "without guest numa node"), + virDomainMemoryAccessTypeToString(def->mem.access)); + return -1; + } + if (qemuGetDomainHupageMemPath(def, cfg, def->mem.hugepages[0].size, &= mem_path) < 0) return -1; =20 diff --git a/tests/qemuxml2argvdata/hugepages-memaccess3.xml b/tests/qemuxm= l2argvdata/hugepages-memaccess3.xml new file mode 100644 index 000000000..8ec38d802 --- /dev/null +++ b/tests/qemuxml2argvdata/hugepages-memaccess3.xml @@ -0,0 +1,87 @@ + + fedora + 63840878-0deb-4095-97e6-fc444d9bc9fa + 4194304 + 4194304 + + + + + 4 + + hvm + + + + + + + + + + + + + + + + destroy + restart + destroy + + + + + + /usr/bin/qemu-system-x86_64 + + + + + +
+ + +
+ + + +
+ + +
+ + +
+ + + + + + + + + + + +
+ + + + + + + + + +