From nobody Sun Feb 8 12:43:20 2026 Delivered-To: importer@patchew.org Received-SPF: none (zohomail.com: 8.43.85.245 is neither permitted nor denied by domain of lists.libvirt.org) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; spf=none (zohomail.com: 8.43.85.245 is neither permitted nor denied by domain of lists.libvirt.org) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1708444755124269.42294413285174; Tue, 20 Feb 2024 07:59:15 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 996) id 0EE3519B4; Tue, 20 Feb 2024 10:59:14 -0500 (EST) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 3D0CE1C7E; Tue, 20 Feb 2024 10:53:53 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 996) id 038111A1B; Tue, 20 Feb 2024 10:53:38 -0500 (EST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id DB0CC19AD for ; Tue, 20 Feb 2024 10:53:36 -0500 (EST) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-678-p9nT3Vm3OIukdbPn24laNg-1; Tue, 20 Feb 2024 10:53:35 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id F123785A596 for ; Tue, 20 Feb 2024 15:53:33 +0000 (UTC) Received: from maggie.brq.redhat.com (unknown [10.43.3.102]) by smtp.corp.redhat.com (Postfix) with ESMTP id 998262166AF0 for ; Tue, 20 Feb 2024 15:53:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.4 X-MC-Unique: p9nT3Vm3OIukdbPn24laNg-1 From: Michal Privoznik To: devel@lists.libvirt.org Subject: [PATCH v2 2/2] qemuxmlconftest: Introduce memory-hotplug-nvdimm-overlap test case Date: Tue, 20 Feb 2024 16:53:30 +0100 Message-ID: <0fda00eca51f3e7d883d2d17aa53690b6dcd6b3a.1708444344.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.6 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Message-ID-Hash: RPR7PQWNJTFMHTT75SHO6JTELGJKBDQD X-Message-ID-Hash: RPR7PQWNJTFMHTT75SHO6JTELGJKBDQD X-MailFrom: mprivozn@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="utf-8"; x-default="true" Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1708444756732100001 This new test case checks whether we are handling NVDIMMs correctly when checking for overlapping memory devices (see previous commit). Without previous commit, this test case would fail, yet it was produced in real life (at least the NVDIMM part) and thus it is valid. Signed-off-by: Michal Privoznik Reviewed-by: Martin Kletzander --- ...-hotplug-nvdimm-overlap.x86_64-latest.args | 40 ++++++++++ ...y-hotplug-nvdimm-overlap.x86_64-latest.xml | 1 + .../memory-hotplug-nvdimm-overlap.xml | 77 +++++++++++++++++++ tests/qemuxmlconftest.c | 4 + 4 files changed, 122 insertions(+) create mode 100644 tests/qemuxmlconfdata/memory-hotplug-nvdimm-overlap.x86= _64-latest.args create mode 120000 tests/qemuxmlconfdata/memory-hotplug-nvdimm-overlap.x86= _64-latest.xml create mode 100644 tests/qemuxmlconfdata/memory-hotplug-nvdimm-overlap.xml diff --git a/tests/qemuxmlconfdata/memory-hotplug-nvdimm-overlap.x86_64-lat= est.args b/tests/qemuxmlconfdata/memory-hotplug-nvdimm-overlap.x86_64-lates= t.args new file mode 100644 index 0000000000..e74d2d7013 --- /dev/null +++ b/tests/qemuxmlconfdata/memory-hotplug-nvdimm-overlap.x86_64-latest.args @@ -0,0 +1,40 @@ +LC_ALL=3DC \ +PATH=3D/bin \ +HOME=3D/var/lib/libvirt/qemu/domain--1-QEMUGuest1 \ +USER=3Dtest \ +LOGNAME=3Dtest \ +XDG_DATA_HOME=3D/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.local/share \ +XDG_CACHE_HOME=3D/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.cache \ +XDG_CONFIG_HOME=3D/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \ +/usr/bin/qemu-system-x86_64 \ +-name guest=3DQEMUGuest1,debug-threads=3Don \ +-S \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/va= r/lib/libvirt/qemu/domain--1-QEMUGuest1/master-key.aes"}' \ +-machine pc,usb=3Doff,dump-guest-core=3Doff,nvdimm=3Don,acpi=3Doff \ +-accel tcg \ +-cpu qemu64 \ +-m size=3D1048576k,slots=3D16,maxmem=3D1099511627776k \ +-overcommit mem-lock=3Doff \ +-smp 2,sockets=3D2,dies=3D1,clusters=3D1,cores=3D1,threads=3D1 \ +-object '{"qom-type":"memory-backend-ram","id":"ram-node0","size":10737418= 24}' \ +-numa node,nodeid=3D0,cpus=3D0-1,memdev=3Dram-node0 \ +-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=3Dcharmonitor,fd=3D1729,server=3Don,wait=3Doff \ +-mon chardev=3Dcharmonitor,id=3Dmonitor,mode=3Dcontrol \ +-rtc base=3Dutc \ +-no-shutdown \ +-boot strict=3Don \ +-device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0= x2"}' \ +-object '{"qom-type":"memory-backend-file","id":"memnvdimm0","mem-path":"/= tmp/nvdimm1","share":true,"prealloc":true,"size":536870912,"align":2097152}= ' \ +-device '{"driver":"nvdimm","node":0,"label-size":131072,"memdev":"memnvdi= mm0","id":"nvdimm0","slot":0,"addr":4294967296}' \ +-object '{"qom-type":"memory-backend-file","id":"memnvdimm1","mem-path":"/= tmp/nvdimm2","share":true,"prealloc":true,"size":536870912,"align":2097152}= ' \ +-device '{"driver":"nvdimm","node":0,"label-size":131072,"memdev":"memnvdi= mm1","id":"nvdimm1","slot":1,"addr":4829741056}' \ +-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1","no= de-name":"libvirt-1-storage","read-only":false}' \ +-device '{"driver":"ide-hd","bus":"ide.0","unit":0,"drive":"libvirt-1-stor= age","id":"ide0-0-0","bootindex":1}' \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","add= r":"0x3"}' \ +-sandbox on,obsolete=3Ddeny,elevateprivileges=3Ddeny,spawn=3Ddeny,resource= control=3Ddeny \ +-msg timestamp=3Don diff --git a/tests/qemuxmlconfdata/memory-hotplug-nvdimm-overlap.x86_64-lat= est.xml b/tests/qemuxmlconfdata/memory-hotplug-nvdimm-overlap.x86_64-latest= .xml new file mode 120000 index 0000000000..c5c37c4de9 --- /dev/null +++ b/tests/qemuxmlconfdata/memory-hotplug-nvdimm-overlap.x86_64-latest.xml @@ -0,0 +1 @@ +memory-hotplug-nvdimm-overlap.xml \ No newline at end of file diff --git a/tests/qemuxmlconfdata/memory-hotplug-nvdimm-overlap.xml b/test= s/qemuxmlconfdata/memory-hotplug-nvdimm-overlap.xml new file mode 100644 index 0000000000..707b00c75e --- /dev/null +++ b/tests/qemuxmlconfdata/memory-hotplug-nvdimm-overlap.xml @@ -0,0 +1,77 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 1099511627776 + 1267710 + 1267710 + 2 + + hvm + + + + + + + + qemu64 + + + + + + + destroy + restart + destroy + + /usr/bin/qemu-system-x86_64 + + + + +
+ + +
+ + +
+ + + + +