render / rpms / libvirt

Forked from rpms/libvirt 9 months ago
Clone
4aa5c4
From e4e8b74f2cf090c8b29efcd3ceac4e4c4d07b929 Mon Sep 17 00:00:00 2001
4aa5c4
Message-Id: <e4e8b74f2cf090c8b29efcd3ceac4e4c4d07b929@dist-git>
4aa5c4
From: Michal Privoznik <mprivozn@redhat.com>
4aa5c4
Date: Thu, 27 Jan 2022 11:13:53 +0100
4aa5c4
Subject: [PATCH] qemu_command: Generate memory only after controllers
4aa5c4
4aa5c4
Currently, memory device (def->mems) part of cmd line is
4aa5c4
generated before any controller. In majority of cases it doesn't
4aa5c4
matter because neither of memory devices live on a bus that's
4aa5c4
created by an exposed controller (e.g. there's no DIMM
4aa5c4
controller, at least not exposed). Except for virtio-mem and
4aa5c4
virtio-pmem, which do have a PCI address. And if it so happens
4aa5c4
that the device goes onto non-default bus (pci.0) starting such
4aa5c4
guest fails, because the controller that creates the desired bus
4aa5c4
wasn't processed yet. QEMU processes arguments in order.
4aa5c4
4aa5c4
For instance, if virtio-mem has address with bus='0x01' QEMU
4aa5c4
refuses to start with the following message:
4aa5c4
4aa5c4
  Bus 'pci.1' not found
4aa5c4
4aa5c4
Similarly for virtio-pmem. I've successfully tested migration and
4aa5c4
changing the order does not affect migration stream.
4aa5c4
4aa5c4
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2047271
4aa5c4
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
4aa5c4
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
4aa5c4
(cherry picked from commit af23241cfed712f69450e82135d7c7b4899736de)
4aa5c4
4aa5c4
Conflicts:
4aa5c4
tests/qemuxml2argvdata/hugepages-nvdimm.x86_64-latest.args:
4aa5c4
tests/qemuxml2argvdata/memfd-memory-numa.x86_64-latest.args:
4aa5c4
tests/qemuxml2argvdata/memory-hotplug-nvdimm-access.x86_64-latest.args:
4aa5c4
tests/qemuxml2argvdata/memory-hotplug-nvdimm-align.x86_64-latest.args:
4aa5c4
tests/qemuxml2argvdata/memory-hotplug-nvdimm-label.x86_64-latest.args:
4aa5c4
tests/qemuxml2argvdata/memory-hotplug-nvdimm-pmem.x86_64-latest.args:
4aa5c4
tests/qemuxml2argvdata/memory-hotplug-nvdimm-readonly.x86_64-latest.args:
4aa5c4
tests/qemuxml2argvdata/memory-hotplug-nvdimm.x86_64-latest.args:
4aa5c4
tests/qemuxml2argvdata/memory-hotplug-virtio-mem.x86_64-latest.args:
4aa5c4
tests/qemuxml2argvdata/memory-hotplug-virtio-pmem.x86_64-latest.args:
4aa5c4
  These happened because downstream we don't use JSON for -device,
4aa5c4
  but upstream we do (as of 1a691fe1c84090da80a652c4c80ac00a6134a69b).
4aa5c4
4aa5c4
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2050697
4aa5c4
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
4aa5c4
---
4aa5c4
 src/qemu/qemu_command.c                                   | 6 +++---
4aa5c4
 tests/qemuxml2argvdata/hugepages-memaccess.args           | 4 ++--
4aa5c4
 tests/qemuxml2argvdata/hugepages-memaccess2.args          | 4 ++--
4aa5c4
 tests/qemuxml2argvdata/hugepages-numa-default-dimm.args   | 4 ++--
4aa5c4
 .../qemuxml2argvdata/hugepages-nvdimm.x86_64-latest.args  | 4 ++--
4aa5c4
 .../qemuxml2argvdata/memfd-memory-numa.x86_64-latest.args | 4 ++--
4aa5c4
 tests/qemuxml2argvdata/memory-hotplug-dimm-addr.args      | 8 ++++----
4aa5c4
 tests/qemuxml2argvdata/memory-hotplug-dimm.args           | 8 ++++----
4aa5c4
 .../memory-hotplug-nvdimm-access.x86_64-latest.args       | 4 ++--
4aa5c4
 .../memory-hotplug-nvdimm-align.x86_64-5.2.0.args         | 4 ++--
4aa5c4
 .../memory-hotplug-nvdimm-align.x86_64-latest.args        | 4 ++--
4aa5c4
 .../memory-hotplug-nvdimm-label.x86_64-5.2.0.args         | 4 ++--
4aa5c4
 .../memory-hotplug-nvdimm-label.x86_64-latest.args        | 4 ++--
4aa5c4
 .../memory-hotplug-nvdimm-pmem.x86_64-5.2.0.args          | 4 ++--
4aa5c4
 .../memory-hotplug-nvdimm-pmem.x86_64-latest.args         | 4 ++--
4aa5c4
 .../memory-hotplug-nvdimm-ppc64-abi-update.args           | 4 ++--
4aa5c4
 tests/qemuxml2argvdata/memory-hotplug-nvdimm-ppc64.args   | 4 ++--
4aa5c4
 .../memory-hotplug-nvdimm-readonly.x86_64-5.2.0.args      | 4 ++--
4aa5c4
 .../memory-hotplug-nvdimm-readonly.x86_64-latest.args     | 4 ++--
4aa5c4
 .../memory-hotplug-nvdimm.x86_64-latest.args              | 4 ++--
4aa5c4
 .../memory-hotplug-ppc64-nonuma-abi-update.args           | 8 ++++----
4aa5c4
 tests/qemuxml2argvdata/memory-hotplug-ppc64-nonuma.args   | 8 ++++----
4aa5c4
 .../memory-hotplug-virtio-mem.x86_64-latest.args          | 8 ++++----
4aa5c4
 .../memory-hotplug-virtio-pmem.x86_64-5.2.0.args          | 4 ++--
4aa5c4
 .../memory-hotplug-virtio-pmem.x86_64-latest.args         | 4 ++--
4aa5c4
 tests/qemuxml2argvdata/pages-dimm-discard.args            | 8 ++++----
4aa5c4
 26 files changed, 65 insertions(+), 65 deletions(-)
4aa5c4
4aa5c4
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
4aa5c4
index 6b4647a711..2acdcca2ff 100644
4aa5c4
--- a/src/qemu/qemu_command.c
4aa5c4
+++ b/src/qemu/qemu_command.c
4aa5c4
@@ -10565,9 +10565,6 @@ qemuBuildCommandLine(virQEMUDriver *driver,
4aa5c4
         qemuBuildNumaCommandLine(cfg, def, cmd, priv) < 0)
4aa5c4
         return NULL;
4aa5c4
 
4aa5c4
-    if (qemuBuildMemoryDeviceCommandLine(cmd, cfg, def, priv) < 0)
4aa5c4
-        return NULL;
4aa5c4
-
4aa5c4
     virUUIDFormat(def->uuid, uuid);
4aa5c4
     virCommandAddArgList(cmd, "-uuid", uuid, NULL);
4aa5c4
 
4aa5c4
@@ -10617,6 +10614,9 @@ qemuBuildCommandLine(virQEMUDriver *driver,
4aa5c4
     if (qemuBuildControllersCommandLine(cmd, def, qemuCaps) < 0)
4aa5c4
         return NULL;
4aa5c4
 
4aa5c4
+    if (qemuBuildMemoryDeviceCommandLine(cmd, cfg, def, priv) < 0)
4aa5c4
+        return NULL;
4aa5c4
+
4aa5c4
     if (qemuBuildHubCommandLine(cmd, def, qemuCaps) < 0)
4aa5c4
         return NULL;
4aa5c4
 
4aa5c4
diff --git a/tests/qemuxml2argvdata/hugepages-memaccess.args b/tests/qemuxml2argvdata/hugepages-memaccess.args
4aa5c4
index b89f791697..a369c7f6da 100644
4aa5c4
--- a/tests/qemuxml2argvdata/hugepages-memaccess.args
4aa5c4
+++ b/tests/qemuxml2argvdata/hugepages-memaccess.args
4aa5c4
@@ -24,8 +24,6 @@ QEMU_AUDIO_DRV=none \
4aa5c4
 -numa node,nodeid=2,cpus=2,memdev=ram-node2 \
4aa5c4
 -object memory-backend-file,id=ram-node3,mem-path=/dev/hugepages1G/libvirt/qemu/-1-QEMUGuest1,share=off,prealloc=on,size=1073741824,host-nodes=3,policy=bind \
4aa5c4
 -numa node,nodeid=3,cpus=3,memdev=ram-node3 \
4aa5c4
--object memory-backend-file,id=memdimm0,mem-path=/dev/hugepages2M/libvirt/qemu/-1-QEMUGuest1,share=on,prealloc=on,size=536870912,host-nodes=0-3,policy=bind \
4aa5c4
--device pc-dimm,node=1,memdev=memdimm0,id=dimm0,slot=0,addr=4294967296 \
4aa5c4
 -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
4aa5c4
 -display none \
4aa5c4
 -no-user-config \
4aa5c4
@@ -37,6 +35,8 @@ QEMU_AUDIO_DRV=none \
4aa5c4
 -no-acpi \
4aa5c4
 -boot strict=on \
4aa5c4
 -usb \
4aa5c4
+-object memory-backend-file,id=memdimm0,mem-path=/dev/hugepages2M/libvirt/qemu/-1-QEMUGuest1,share=on,prealloc=on,size=536870912,host-nodes=0-3,policy=bind \
4aa5c4
+-device pc-dimm,node=1,memdev=memdimm0,id=dimm0,slot=0,addr=4294967296 \
4aa5c4
 -drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-ide0-0-0 \
4aa5c4
 -device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 \
4aa5c4
 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 \
4aa5c4
diff --git a/tests/qemuxml2argvdata/hugepages-memaccess2.args b/tests/qemuxml2argvdata/hugepages-memaccess2.args
4aa5c4
index 0c296797e9..434ebdaa62 100644
4aa5c4
--- a/tests/qemuxml2argvdata/hugepages-memaccess2.args
4aa5c4
+++ b/tests/qemuxml2argvdata/hugepages-memaccess2.args
4aa5c4
@@ -24,8 +24,6 @@ QEMU_AUDIO_DRV=none \
4aa5c4
 -numa node,nodeid=2,cpus=2,memdev=ram-node2 \
4aa5c4
 -object memory-backend-file,id=ram-node3,mem-path=/var/lib/libvirt/qemu/ram/-1-QEMUGuest1/ram-node3,share=off,size=1073741824,host-nodes=3,policy=bind \
4aa5c4
 -numa node,nodeid=3,cpus=3,memdev=ram-node3 \
4aa5c4
--object memory-backend-file,id=memdimm0,mem-path=/dev/hugepages2M/libvirt/qemu/-1-QEMUGuest1,share=on,prealloc=on,size=536870912,host-nodes=0-3,policy=bind \
4aa5c4
--device pc-dimm,node=1,memdev=memdimm0,id=dimm0,slot=0,addr=4294967296 \
4aa5c4
 -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
4aa5c4
 -display none \
4aa5c4
 -no-user-config \
4aa5c4
@@ -37,6 +35,8 @@ QEMU_AUDIO_DRV=none \
4aa5c4
 -no-acpi \
4aa5c4
 -boot strict=on \
4aa5c4
 -usb \
4aa5c4
+-object memory-backend-file,id=memdimm0,mem-path=/dev/hugepages2M/libvirt/qemu/-1-QEMUGuest1,share=on,prealloc=on,size=536870912,host-nodes=0-3,policy=bind \
4aa5c4
+-device pc-dimm,node=1,memdev=memdimm0,id=dimm0,slot=0,addr=4294967296 \
4aa5c4
 -drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-ide0-0-0 \
4aa5c4
 -device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 \
4aa5c4
 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 \
4aa5c4
diff --git a/tests/qemuxml2argvdata/hugepages-numa-default-dimm.args b/tests/qemuxml2argvdata/hugepages-numa-default-dimm.args
4aa5c4
index f560cabf8e..57bb70346d 100644
4aa5c4
--- a/tests/qemuxml2argvdata/hugepages-numa-default-dimm.args
4aa5c4
+++ b/tests/qemuxml2argvdata/hugepages-numa-default-dimm.args
4aa5c4
@@ -19,8 +19,6 @@ QEMU_AUDIO_DRV=none \
4aa5c4
 -mem-prealloc \
4aa5c4
 -mem-path /dev/hugepages2M/libvirt/qemu/-1-fedora \
4aa5c4
 -numa node,nodeid=0,cpus=0-1,mem=1024 \
4aa5c4
--object memory-backend-file,id=memdimm0,mem-path=/dev/hugepages1G/libvirt/qemu/-1-fedora,size=1073741824,host-nodes=1-3,policy=bind \
4aa5c4
--device pc-dimm,node=0,memdev=memdimm0,id=dimm0,slot=0 \
4aa5c4
 -uuid 63840878-0deb-4095-97e6-fc444d9bc9fa \
4aa5c4
 -display none \
4aa5c4
 -no-user-config \
4aa5c4
@@ -32,4 +30,6 @@ QEMU_AUDIO_DRV=none \
4aa5c4
 -no-acpi \
4aa5c4
 -boot strict=on \
4aa5c4
 -usb \
4aa5c4
+-object memory-backend-file,id=memdimm0,mem-path=/dev/hugepages1G/libvirt/qemu/-1-fedora,size=1073741824,host-nodes=1-3,policy=bind \
4aa5c4
+-device pc-dimm,node=0,memdev=memdimm0,id=dimm0,slot=0 \
4aa5c4
 -msg timestamp=on
4aa5c4
diff --git a/tests/qemuxml2argvdata/hugepages-nvdimm.x86_64-latest.args b/tests/qemuxml2argvdata/hugepages-nvdimm.x86_64-latest.args
4aa5c4
index 8b5665f86e..7d9dcfb4df 100644
4aa5c4
--- a/tests/qemuxml2argvdata/hugepages-nvdimm.x86_64-latest.args
4aa5c4
+++ b/tests/qemuxml2argvdata/hugepages-nvdimm.x86_64-latest.args
4aa5c4
@@ -18,8 +18,6 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
4aa5c4
 -smp 2,sockets=2,dies=1,cores=1,threads=1 \
4aa5c4
 -object '{"qom-type":"memory-backend-file","id":"ram-node0","mem-path":"/dev/hugepages2M/libvirt/qemu/-1-QEMUGuest1","share":true,"prealloc":true,"size":1073741824}' \
4aa5c4
 -numa node,nodeid=0,cpus=0-1,memdev=ram-node0 \
4aa5c4
--object '{"qom-type":"memory-backend-file","id":"memnvdimm0","mem-path":"/tmp/nvdimm","share":true,"prealloc":true,"size":536870912}' \
4aa5c4
--device nvdimm,node=0,memdev=memnvdimm0,id=nvdimm0,slot=0 \
4aa5c4
 -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
4aa5c4
 -display none \
4aa5c4
 -no-user-config \
4aa5c4
@@ -31,6 +29,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
4aa5c4
 -no-acpi \
4aa5c4
 -boot strict=on \
4aa5c4
 -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
4aa5c4
+-object '{"qom-type":"memory-backend-file","id":"memnvdimm0","mem-path":"/tmp/nvdimm","share":true,"prealloc":true,"size":536870912}' \
4aa5c4
+-device nvdimm,node=0,memdev=memnvdimm0,id=nvdimm0,slot=0 \
4aa5c4
 -audiodev '{"id":"audio1","driver":"none"}' \
4aa5c4
 -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
4aa5c4
 -msg timestamp=on
4aa5c4
diff --git a/tests/qemuxml2argvdata/memfd-memory-numa.x86_64-latest.args b/tests/qemuxml2argvdata/memfd-memory-numa.x86_64-latest.args
4aa5c4
index 8a40e2d79c..04a320d469 100644
4aa5c4
--- a/tests/qemuxml2argvdata/memfd-memory-numa.x86_64-latest.args
4aa5c4
+++ b/tests/qemuxml2argvdata/memfd-memory-numa.x86_64-latest.args
4aa5c4
@@ -18,8 +18,6 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-instance-00000092/.config \
4aa5c4
 -smp 8,sockets=1,dies=1,cores=8,threads=1 \
4aa5c4
 -object '{"qom-type":"memory-backend-memfd","id":"ram-node0","hugetlb":true,"hugetlbsize":2097152,"share":true,"prealloc":true,"size":15032385536,"host-nodes":[3],"policy":"preferred"}' \
4aa5c4
 -numa node,nodeid=0,cpus=0-7,memdev=ram-node0 \
4aa5c4
--object '{"qom-type":"memory-backend-file","id":"memnvdimm0","mem-path":"/tmp/nvdimm","share":true,"prealloc":true,"size":536870912,"host-nodes":[3],"policy":"preferred"}' \
4aa5c4
--device nvdimm,node=0,memdev=memnvdimm0,id=nvdimm0,slot=0 \
4aa5c4
 -uuid 126f2720-6f8e-45ab-a886-ec9277079a67 \
4aa5c4
 -display none \
4aa5c4
 -no-user-config \
4aa5c4
@@ -31,6 +29,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-instance-00000092/.config \
4aa5c4
 -no-acpi \
4aa5c4
 -boot strict=on \
4aa5c4
 -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
4aa5c4
+-object '{"qom-type":"memory-backend-file","id":"memnvdimm0","mem-path":"/tmp/nvdimm","share":true,"prealloc":true,"size":536870912,"host-nodes":[3],"policy":"preferred"}' \
4aa5c4
+-device nvdimm,node=0,memdev=memnvdimm0,id=nvdimm0,slot=0 \
4aa5c4
 -audiodev '{"id":"audio1","driver":"none"}' \
4aa5c4
 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 \
4aa5c4
 -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
4aa5c4
diff --git a/tests/qemuxml2argvdata/memory-hotplug-dimm-addr.args b/tests/qemuxml2argvdata/memory-hotplug-dimm-addr.args
4aa5c4
index 907072d55d..b36117f1e8 100644
4aa5c4
--- a/tests/qemuxml2argvdata/memory-hotplug-dimm-addr.args
4aa5c4
+++ b/tests/qemuxml2argvdata/memory-hotplug-dimm-addr.args
4aa5c4
@@ -17,10 +17,6 @@ QEMU_AUDIO_DRV=none \
4aa5c4
 -realtime mlock=off \
4aa5c4
 -smp 2,sockets=2,cores=1,threads=1 \
4aa5c4
 -numa node,nodeid=0,cpus=0-1,mem=214 \
4aa5c4
--object memory-backend-file,id=memdimm0,mem-path=/dev/hugepages2M/libvirt/qemu/-1-QEMUGuest1,prealloc=on,size=536870912,host-nodes=1-3,policy=bind \
4aa5c4
--device pc-dimm,node=0,memdev=memdimm0,id=dimm0,slot=0,addr=4294967296 \
4aa5c4
--object memory-backend-ram,id=memdimm2,size=536870912 \
4aa5c4
--device pc-dimm,node=0,memdev=memdimm2,id=dimm2,slot=2 \
4aa5c4
 -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
4aa5c4
 -display none \
4aa5c4
 -no-user-config \
4aa5c4
@@ -32,6 +28,10 @@ QEMU_AUDIO_DRV=none \
4aa5c4
 -no-acpi \
4aa5c4
 -boot strict=on \
4aa5c4
 -usb \
4aa5c4
+-object memory-backend-file,id=memdimm0,mem-path=/dev/hugepages2M/libvirt/qemu/-1-QEMUGuest1,prealloc=on,size=536870912,host-nodes=1-3,policy=bind \
4aa5c4
+-device pc-dimm,node=0,memdev=memdimm0,id=dimm0,slot=0,addr=4294967296 \
4aa5c4
+-object memory-backend-ram,id=memdimm2,size=536870912 \
4aa5c4
+-device pc-dimm,node=0,memdev=memdimm2,id=dimm2,slot=2 \
4aa5c4
 -drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-ide0-0-0 \
4aa5c4
 -device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 \
4aa5c4
 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x2 \
4aa5c4
diff --git a/tests/qemuxml2argvdata/memory-hotplug-dimm.args b/tests/qemuxml2argvdata/memory-hotplug-dimm.args
4aa5c4
index 5d87f4a3ef..72c2803c5e 100644
4aa5c4
--- a/tests/qemuxml2argvdata/memory-hotplug-dimm.args
4aa5c4
+++ b/tests/qemuxml2argvdata/memory-hotplug-dimm.args
4aa5c4
@@ -17,10 +17,6 @@ QEMU_AUDIO_DRV=none \
4aa5c4
 -realtime mlock=off \
4aa5c4
 -smp 2,sockets=2,cores=1,threads=1 \
4aa5c4
 -numa node,nodeid=0,cpus=0-1,mem=214 \
4aa5c4
--object memory-backend-ram,id=memdimm0,size=536870912 \
4aa5c4
--device pc-dimm,node=0,memdev=memdimm0,id=dimm0,slot=0 \
4aa5c4
--object memory-backend-file,id=memdimm1,mem-path=/dev/hugepages2M/libvirt/qemu/-1-QEMUGuest1,prealloc=on,size=536870912,host-nodes=1-3,policy=bind \
4aa5c4
--device pc-dimm,node=0,memdev=memdimm1,id=dimm1,slot=1 \
4aa5c4
 -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
4aa5c4
 -display none \
4aa5c4
 -no-user-config \
4aa5c4
@@ -32,6 +28,10 @@ QEMU_AUDIO_DRV=none \
4aa5c4
 -no-acpi \
4aa5c4
 -boot strict=on \
4aa5c4
 -usb \
4aa5c4
+-object memory-backend-ram,id=memdimm0,size=536870912 \
4aa5c4
+-device pc-dimm,node=0,memdev=memdimm0,id=dimm0,slot=0 \
4aa5c4
+-object memory-backend-file,id=memdimm1,mem-path=/dev/hugepages2M/libvirt/qemu/-1-QEMUGuest1,prealloc=on,size=536870912,host-nodes=1-3,policy=bind \
4aa5c4
+-device pc-dimm,node=0,memdev=memdimm1,id=dimm1,slot=1 \
4aa5c4
 -drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-ide0-0-0 \
4aa5c4
 -device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 \
4aa5c4
 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x2 \
4aa5c4
diff --git a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-access.x86_64-latest.args b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-access.x86_64-latest.args
4aa5c4
index 3664150c51..94aeadabce 100644
4aa5c4
--- a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-access.x86_64-latest.args
4aa5c4
+++ b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-access.x86_64-latest.args
4aa5c4
@@ -18,8 +18,6 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
4aa5c4
 -smp 2,sockets=2,dies=1,cores=1,threads=1 \
4aa5c4
 -object '{"qom-type":"memory-backend-ram","id":"ram-node0","size":224395264}' \
4aa5c4
 -numa node,nodeid=0,cpus=0-1,memdev=ram-node0 \
4aa5c4
--object '{"qom-type":"memory-backend-file","id":"memnvdimm0","mem-path":"/tmp/nvdimm","share":false,"prealloc":true,"size":536870912}' \
4aa5c4
--device nvdimm,node=0,memdev=memnvdimm0,id=nvdimm0,slot=0 \
4aa5c4
 -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
4aa5c4
 -display none \
4aa5c4
 -no-user-config \
4aa5c4
@@ -31,6 +29,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
4aa5c4
 -no-acpi \
4aa5c4
 -boot strict=on \
4aa5c4
 -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
4aa5c4
+-object '{"qom-type":"memory-backend-file","id":"memnvdimm0","mem-path":"/tmp/nvdimm","share":false,"prealloc":true,"size":536870912}' \
4aa5c4
+-device nvdimm,node=0,memdev=memnvdimm0,id=nvdimm0,slot=0 \
4aa5c4
 -blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \
4aa5c4
 -blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw","file":"libvirt-1-storage"}' \
4aa5c4
 -device ide-hd,bus=ide.0,unit=0,drive=libvirt-1-format,id=ide0-0-0,bootindex=1 \
4aa5c4
diff --git a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-align.x86_64-5.2.0.args b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-align.x86_64-5.2.0.args
4aa5c4
index 6c28c86004..0b29a6fded 100644
4aa5c4
--- a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-align.x86_64-5.2.0.args
4aa5c4
+++ b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-align.x86_64-5.2.0.args
4aa5c4
@@ -18,8 +18,6 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
4aa5c4
 -smp 2,sockets=2,dies=1,cores=1,threads=1 \
4aa5c4
 -object memory-backend-ram,id=ram-node0,size=224395264 \
4aa5c4
 -numa node,nodeid=0,cpus=0-1,memdev=ram-node0 \
4aa5c4
--object memory-backend-file,id=memnvdimm0,mem-path=/tmp/nvdimm,share=off,prealloc=on,size=536870912,align=2097152 \
4aa5c4
--device nvdimm,node=0,memdev=memnvdimm0,id=nvdimm0,slot=0 \
4aa5c4
 -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
4aa5c4
 -display none \
4aa5c4
 -no-user-config \
4aa5c4
@@ -31,6 +29,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
4aa5c4
 -no-acpi \
4aa5c4
 -boot strict=on \
4aa5c4
 -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
4aa5c4
+-object memory-backend-file,id=memnvdimm0,mem-path=/tmp/nvdimm,share=off,prealloc=on,size=536870912,align=2097152 \
4aa5c4
+-device nvdimm,node=0,memdev=memnvdimm0,id=nvdimm0,slot=0 \
4aa5c4
 -blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \
4aa5c4
 -blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw","file":"libvirt-1-storage"}' \
4aa5c4
 -device ide-hd,bus=ide.0,unit=0,drive=libvirt-1-format,id=ide0-0-0,bootindex=1 \
4aa5c4
diff --git a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-align.x86_64-latest.args b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-align.x86_64-latest.args
4aa5c4
index aa77849079..5045cc8318 100644
4aa5c4
--- a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-align.x86_64-latest.args
4aa5c4
+++ b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-align.x86_64-latest.args
4aa5c4
@@ -18,8 +18,6 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
4aa5c4
 -smp 2,sockets=2,dies=1,cores=1,threads=1 \
4aa5c4
 -object '{"qom-type":"memory-backend-ram","id":"ram-node0","size":224395264}' \
4aa5c4
 -numa node,nodeid=0,cpus=0-1,memdev=ram-node0 \
4aa5c4
--object '{"qom-type":"memory-backend-file","id":"memnvdimm0","mem-path":"/tmp/nvdimm","share":false,"prealloc":true,"size":536870912,"align":2097152}' \
4aa5c4
--device nvdimm,node=0,memdev=memnvdimm0,id=nvdimm0,slot=0 \
4aa5c4
 -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
4aa5c4
 -display none \
4aa5c4
 -no-user-config \
4aa5c4
@@ -31,6 +29,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
4aa5c4
 -no-acpi \
4aa5c4
 -boot strict=on \
4aa5c4
 -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
4aa5c4
+-object '{"qom-type":"memory-backend-file","id":"memnvdimm0","mem-path":"/tmp/nvdimm","share":false,"prealloc":true,"size":536870912,"align":2097152}' \
4aa5c4
+-device nvdimm,node=0,memdev=memnvdimm0,id=nvdimm0,slot=0 \
4aa5c4
 -blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \
4aa5c4
 -blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw","file":"libvirt-1-storage"}' \
4aa5c4
 -device ide-hd,bus=ide.0,unit=0,drive=libvirt-1-format,id=ide0-0-0,bootindex=1 \
4aa5c4
diff --git a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-label.x86_64-5.2.0.args b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-label.x86_64-5.2.0.args
4aa5c4
index c45b401af5..7c67161b78 100644
4aa5c4
--- a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-label.x86_64-5.2.0.args
4aa5c4
+++ b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-label.x86_64-5.2.0.args
4aa5c4
@@ -18,8 +18,6 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
4aa5c4
 -smp 2,sockets=2,dies=1,cores=1,threads=1 \
4aa5c4
 -object memory-backend-ram,id=ram-node0,size=224395264 \
4aa5c4
 -numa node,nodeid=0,cpus=0-1,memdev=ram-node0 \
4aa5c4
--object memory-backend-file,id=memnvdimm0,mem-path=/tmp/nvdimm,share=off,prealloc=on,size=536870912 \
4aa5c4
--device nvdimm,node=0,label-size=131072,memdev=memnvdimm0,id=nvdimm0,slot=0 \
4aa5c4
 -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
4aa5c4
 -display none \
4aa5c4
 -no-user-config \
4aa5c4
@@ -31,6 +29,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
4aa5c4
 -no-acpi \
4aa5c4
 -boot strict=on \
4aa5c4
 -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
4aa5c4
+-object memory-backend-file,id=memnvdimm0,mem-path=/tmp/nvdimm,share=off,prealloc=on,size=536870912 \
4aa5c4
+-device nvdimm,node=0,label-size=131072,memdev=memnvdimm0,id=nvdimm0,slot=0 \
4aa5c4
 -blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \
4aa5c4
 -blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw","file":"libvirt-1-storage"}' \
4aa5c4
 -device ide-hd,bus=ide.0,unit=0,drive=libvirt-1-format,id=ide0-0-0,bootindex=1 \
4aa5c4
diff --git a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-label.x86_64-latest.args b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-label.x86_64-latest.args
4aa5c4
index 07863ba87c..9466877699 100644
4aa5c4
--- a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-label.x86_64-latest.args
4aa5c4
+++ b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-label.x86_64-latest.args
4aa5c4
@@ -18,8 +18,6 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
4aa5c4
 -smp 2,sockets=2,dies=1,cores=1,threads=1 \
4aa5c4
 -object '{"qom-type":"memory-backend-ram","id":"ram-node0","size":224395264}' \
4aa5c4
 -numa node,nodeid=0,cpus=0-1,memdev=ram-node0 \
4aa5c4
--object '{"qom-type":"memory-backend-file","id":"memnvdimm0","mem-path":"/tmp/nvdimm","share":false,"prealloc":true,"size":536870912}' \
4aa5c4
--device nvdimm,node=0,label-size=131072,memdev=memnvdimm0,id=nvdimm0,slot=0 \
4aa5c4
 -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
4aa5c4
 -display none \
4aa5c4
 -no-user-config \
4aa5c4
@@ -31,6 +29,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
4aa5c4
 -no-acpi \
4aa5c4
 -boot strict=on \
4aa5c4
 -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
4aa5c4
+-object '{"qom-type":"memory-backend-file","id":"memnvdimm0","mem-path":"/tmp/nvdimm","share":false,"prealloc":true,"size":536870912}' \
4aa5c4
+-device nvdimm,node=0,label-size=131072,memdev=memnvdimm0,id=nvdimm0,slot=0 \
4aa5c4
 -blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \
4aa5c4
 -blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw","file":"libvirt-1-storage"}' \
4aa5c4
 -device ide-hd,bus=ide.0,unit=0,drive=libvirt-1-format,id=ide0-0-0,bootindex=1 \
4aa5c4
diff --git a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-pmem.x86_64-5.2.0.args b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-pmem.x86_64-5.2.0.args
4aa5c4
index 3f35d4dca2..c4dae0cfd1 100644
4aa5c4
--- a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-pmem.x86_64-5.2.0.args
4aa5c4
+++ b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-pmem.x86_64-5.2.0.args
4aa5c4
@@ -18,8 +18,6 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
4aa5c4
 -smp 2,sockets=2,dies=1,cores=1,threads=1 \
4aa5c4
 -object memory-backend-ram,id=ram-node0,size=224395264 \
4aa5c4
 -numa node,nodeid=0,cpus=0-1,memdev=ram-node0 \
4aa5c4
--object memory-backend-file,id=memnvdimm0,mem-path=/tmp/nvdimm,share=off,size=536870912,pmem=on \
4aa5c4
--device nvdimm,node=0,memdev=memnvdimm0,id=nvdimm0,slot=0 \
4aa5c4
 -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
4aa5c4
 -display none \
4aa5c4
 -no-user-config \
4aa5c4
@@ -31,6 +29,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
4aa5c4
 -no-acpi \
4aa5c4
 -boot strict=on \
4aa5c4
 -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
4aa5c4
+-object memory-backend-file,id=memnvdimm0,mem-path=/tmp/nvdimm,share=off,size=536870912,pmem=on \
4aa5c4
+-device nvdimm,node=0,memdev=memnvdimm0,id=nvdimm0,slot=0 \
4aa5c4
 -blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \
4aa5c4
 -blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw","file":"libvirt-1-storage"}' \
4aa5c4
 -device ide-hd,bus=ide.0,unit=0,drive=libvirt-1-format,id=ide0-0-0,bootindex=1 \
4aa5c4
diff --git a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-pmem.x86_64-latest.args b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-pmem.x86_64-latest.args
4aa5c4
index 4ed86feb01..9324535ac3 100644
4aa5c4
--- a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-pmem.x86_64-latest.args
4aa5c4
+++ b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-pmem.x86_64-latest.args
4aa5c4
@@ -18,8 +18,6 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
4aa5c4
 -smp 2,sockets=2,dies=1,cores=1,threads=1 \
4aa5c4
 -object '{"qom-type":"memory-backend-ram","id":"ram-node0","size":224395264}' \
4aa5c4
 -numa node,nodeid=0,cpus=0-1,memdev=ram-node0 \
4aa5c4
--object '{"qom-type":"memory-backend-file","id":"memnvdimm0","mem-path":"/tmp/nvdimm","share":false,"size":536870912,"pmem":true}' \
4aa5c4
--device nvdimm,node=0,memdev=memnvdimm0,id=nvdimm0,slot=0 \
4aa5c4
 -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
4aa5c4
 -display none \
4aa5c4
 -no-user-config \
4aa5c4
@@ -31,6 +29,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
4aa5c4
 -no-acpi \
4aa5c4
 -boot strict=on \
4aa5c4
 -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
4aa5c4
+-object '{"qom-type":"memory-backend-file","id":"memnvdimm0","mem-path":"/tmp/nvdimm","share":false,"size":536870912,"pmem":true}' \
4aa5c4
+-device nvdimm,node=0,memdev=memnvdimm0,id=nvdimm0,slot=0 \
4aa5c4
 -blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \
4aa5c4
 -blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw","file":"libvirt-1-storage"}' \
4aa5c4
 -device ide-hd,bus=ide.0,unit=0,drive=libvirt-1-format,id=ide0-0-0,bootindex=1 \
4aa5c4
diff --git a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-ppc64-abi-update.args b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-ppc64-abi-update.args
4aa5c4
index ebdb0429d0..55b16c9dc2 100644
4aa5c4
--- a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-ppc64-abi-update.args
4aa5c4
+++ b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-ppc64-abi-update.args
4aa5c4
@@ -17,8 +17,6 @@ QEMU_AUDIO_DRV=none \
4aa5c4
 -realtime mlock=off \
4aa5c4
 -smp 2,sockets=2,cores=1,threads=1 \
4aa5c4
 -numa node,nodeid=0,cpus=0-1,mem=1024 \
4aa5c4
--object memory-backend-file,id=memnvdimm0,mem-path=/tmp/nvdimm,prealloc=on,size=537001984 \
4aa5c4
--device nvdimm,node=0,label-size=131072,uuid=49545eb3-75e1-2d0a-acdd-f0294406c99e,memdev=memnvdimm0,id=nvdimm0,slot=0 \
4aa5c4
 -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
4aa5c4
 -display none \
4aa5c4
 -no-user-config \
4aa5c4
@@ -28,4 +26,6 @@ QEMU_AUDIO_DRV=none \
4aa5c4
 -rtc base=utc \
4aa5c4
 -no-shutdown \
4aa5c4
 -boot strict=on \
4aa5c4
+-object memory-backend-file,id=memnvdimm0,mem-path=/tmp/nvdimm,prealloc=on,size=537001984 \
4aa5c4
+-device nvdimm,node=0,label-size=131072,uuid=49545eb3-75e1-2d0a-acdd-f0294406c99e,memdev=memnvdimm0,id=nvdimm0,slot=0 \
4aa5c4
 -msg timestamp=on
4aa5c4
diff --git a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-ppc64.args b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-ppc64.args
4aa5c4
index ebdb0429d0..55b16c9dc2 100644
4aa5c4
--- a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-ppc64.args
4aa5c4
+++ b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-ppc64.args
4aa5c4
@@ -17,8 +17,6 @@ QEMU_AUDIO_DRV=none \
4aa5c4
 -realtime mlock=off \
4aa5c4
 -smp 2,sockets=2,cores=1,threads=1 \
4aa5c4
 -numa node,nodeid=0,cpus=0-1,mem=1024 \
4aa5c4
--object memory-backend-file,id=memnvdimm0,mem-path=/tmp/nvdimm,prealloc=on,size=537001984 \
4aa5c4
--device nvdimm,node=0,label-size=131072,uuid=49545eb3-75e1-2d0a-acdd-f0294406c99e,memdev=memnvdimm0,id=nvdimm0,slot=0 \
4aa5c4
 -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
4aa5c4
 -display none \
4aa5c4
 -no-user-config \
4aa5c4
@@ -28,4 +26,6 @@ QEMU_AUDIO_DRV=none \
4aa5c4
 -rtc base=utc \
4aa5c4
 -no-shutdown \
4aa5c4
 -boot strict=on \
4aa5c4
+-object memory-backend-file,id=memnvdimm0,mem-path=/tmp/nvdimm,prealloc=on,size=537001984 \
4aa5c4
+-device nvdimm,node=0,label-size=131072,uuid=49545eb3-75e1-2d0a-acdd-f0294406c99e,memdev=memnvdimm0,id=nvdimm0,slot=0 \
4aa5c4
 -msg timestamp=on
4aa5c4
diff --git a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-readonly.x86_64-5.2.0.args b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-readonly.x86_64-5.2.0.args
4aa5c4
index bca2f286ba..b1873c100f 100644
4aa5c4
--- a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-readonly.x86_64-5.2.0.args
4aa5c4
+++ b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-readonly.x86_64-5.2.0.args
4aa5c4
@@ -18,8 +18,6 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
4aa5c4
 -smp 2,sockets=2,dies=1,cores=1,threads=1 \
4aa5c4
 -object memory-backend-ram,id=ram-node0,size=224395264 \
4aa5c4
 -numa node,nodeid=0,cpus=0-1,memdev=ram-node0 \
4aa5c4
--object memory-backend-file,id=memnvdimm0,mem-path=/tmp/nvdimm,share=off,prealloc=on,size=536870912 \
4aa5c4
--device nvdimm,node=0,unarmed=on,memdev=memnvdimm0,id=nvdimm0,slot=0 \
4aa5c4
 -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
4aa5c4
 -display none \
4aa5c4
 -no-user-config \
4aa5c4
@@ -31,6 +29,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
4aa5c4
 -no-acpi \
4aa5c4
 -boot strict=on \
4aa5c4
 -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
4aa5c4
+-object memory-backend-file,id=memnvdimm0,mem-path=/tmp/nvdimm,share=off,prealloc=on,size=536870912 \
4aa5c4
+-device nvdimm,node=0,unarmed=on,memdev=memnvdimm0,id=nvdimm0,slot=0 \
4aa5c4
 -blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \
4aa5c4
 -blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw","file":"libvirt-1-storage"}' \
4aa5c4
 -device ide-hd,bus=ide.0,unit=0,drive=libvirt-1-format,id=ide0-0-0,bootindex=1 \
4aa5c4
diff --git a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-readonly.x86_64-latest.args b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-readonly.x86_64-latest.args
4aa5c4
index 8be7f35cec..4f11d22e00 100644
4aa5c4
--- a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-readonly.x86_64-latest.args
4aa5c4
+++ b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-readonly.x86_64-latest.args
4aa5c4
@@ -18,8 +18,6 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
4aa5c4
 -smp 2,sockets=2,dies=1,cores=1,threads=1 \
4aa5c4
 -object '{"qom-type":"memory-backend-ram","id":"ram-node0","size":224395264}' \
4aa5c4
 -numa node,nodeid=0,cpus=0-1,memdev=ram-node0 \
4aa5c4
--object '{"qom-type":"memory-backend-file","id":"memnvdimm0","mem-path":"/tmp/nvdimm","share":false,"prealloc":true,"size":536870912}' \
4aa5c4
--device nvdimm,node=0,unarmed=on,memdev=memnvdimm0,id=nvdimm0,slot=0 \
4aa5c4
 -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
4aa5c4
 -display none \
4aa5c4
 -no-user-config \
4aa5c4
@@ -31,6 +29,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
4aa5c4
 -no-acpi \
4aa5c4
 -boot strict=on \
4aa5c4
 -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
4aa5c4
+-object '{"qom-type":"memory-backend-file","id":"memnvdimm0","mem-path":"/tmp/nvdimm","share":false,"prealloc":true,"size":536870912}' \
4aa5c4
+-device nvdimm,node=0,unarmed=on,memdev=memnvdimm0,id=nvdimm0,slot=0 \
4aa5c4
 -blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \
4aa5c4
 -blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw","file":"libvirt-1-storage"}' \
4aa5c4
 -device ide-hd,bus=ide.0,unit=0,drive=libvirt-1-format,id=ide0-0-0,bootindex=1 \
4aa5c4
diff --git a/tests/qemuxml2argvdata/memory-hotplug-nvdimm.x86_64-latest.args b/tests/qemuxml2argvdata/memory-hotplug-nvdimm.x86_64-latest.args
4aa5c4
index 307698749e..434a0f91cf 100644
4aa5c4
--- a/tests/qemuxml2argvdata/memory-hotplug-nvdimm.x86_64-latest.args
4aa5c4
+++ b/tests/qemuxml2argvdata/memory-hotplug-nvdimm.x86_64-latest.args
4aa5c4
@@ -18,8 +18,6 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
4aa5c4
 -smp 2,sockets=2,dies=1,cores=1,threads=1 \
4aa5c4
 -object '{"qom-type":"memory-backend-ram","id":"ram-node0","size":1073741824}' \
4aa5c4
 -numa node,nodeid=0,cpus=0-1,memdev=ram-node0 \
4aa5c4
--object '{"qom-type":"memory-backend-file","id":"memnvdimm0","mem-path":"/tmp/nvdimm","prealloc":true,"size":536870912}' \
4aa5c4
--device nvdimm,node=0,memdev=memnvdimm0,id=nvdimm0,slot=0 \
4aa5c4
 -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
4aa5c4
 -display none \
4aa5c4
 -no-user-config \
4aa5c4
@@ -31,6 +29,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
4aa5c4
 -no-acpi \
4aa5c4
 -boot strict=on \
4aa5c4
 -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
4aa5c4
+-object '{"qom-type":"memory-backend-file","id":"memnvdimm0","mem-path":"/tmp/nvdimm","prealloc":true,"size":536870912}' \
4aa5c4
+-device nvdimm,node=0,memdev=memnvdimm0,id=nvdimm0,slot=0 \
4aa5c4
 -blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \
4aa5c4
 -blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw","file":"libvirt-1-storage"}' \
4aa5c4
 -device ide-hd,bus=ide.0,unit=0,drive=libvirt-1-format,id=ide0-0-0,bootindex=1 \
4aa5c4
diff --git a/tests/qemuxml2argvdata/memory-hotplug-ppc64-nonuma-abi-update.args b/tests/qemuxml2argvdata/memory-hotplug-ppc64-nonuma-abi-update.args
4aa5c4
index 5380c9e805..e8a6451841 100644
4aa5c4
--- a/tests/qemuxml2argvdata/memory-hotplug-ppc64-nonuma-abi-update.args
4aa5c4
+++ b/tests/qemuxml2argvdata/memory-hotplug-ppc64-nonuma-abi-update.args
4aa5c4
@@ -16,10 +16,6 @@ QEMU_AUDIO_DRV=none \
4aa5c4
 -m size=1048576k,slots=16,maxmem=4194304k \
4aa5c4
 -realtime mlock=off \
4aa5c4
 -smp 1,sockets=1,cores=1,threads=1 \
4aa5c4
--object memory-backend-ram,id=memdimm0,size=536870912 \
4aa5c4
--device pc-dimm,memdev=memdimm0,id=dimm0,slot=0 \
4aa5c4
--object memory-backend-ram,id=memdimm1,size=536870912 \
4aa5c4
--device pc-dimm,memdev=memdimm1,id=dimm1,slot=1 \
4aa5c4
 -uuid 49545eb3-75e1-2d0a-acdd-f0294406c99e \
4aa5c4
 -display none \
4aa5c4
 -no-user-config \
4aa5c4
@@ -29,4 +25,8 @@ QEMU_AUDIO_DRV=none \
4aa5c4
 -rtc base=utc \
4aa5c4
 -no-shutdown \
4aa5c4
 -boot strict=on \
4aa5c4
+-object memory-backend-ram,id=memdimm0,size=536870912 \
4aa5c4
+-device pc-dimm,memdev=memdimm0,id=dimm0,slot=0 \
4aa5c4
+-object memory-backend-ram,id=memdimm1,size=536870912 \
4aa5c4
+-device pc-dimm,memdev=memdimm1,id=dimm1,slot=1 \
4aa5c4
 -msg timestamp=on
4aa5c4
diff --git a/tests/qemuxml2argvdata/memory-hotplug-ppc64-nonuma.args b/tests/qemuxml2argvdata/memory-hotplug-ppc64-nonuma.args
4aa5c4
index acff36eb78..181409cde0 100644
4aa5c4
--- a/tests/qemuxml2argvdata/memory-hotplug-ppc64-nonuma.args
4aa5c4
+++ b/tests/qemuxml2argvdata/memory-hotplug-ppc64-nonuma.args
4aa5c4
@@ -16,10 +16,6 @@ QEMU_AUDIO_DRV=none \
4aa5c4
 -m size=1310720k,slots=16,maxmem=4194304k \
4aa5c4
 -realtime mlock=off \
4aa5c4
 -smp 1,sockets=1,cores=1,threads=1 \
4aa5c4
--object memory-backend-ram,id=memdimm0,size=536870912 \
4aa5c4
--device pc-dimm,memdev=memdimm0,id=dimm0,slot=0 \
4aa5c4
--object memory-backend-ram,id=memdimm1,size=536870912 \
4aa5c4
--device pc-dimm,memdev=memdimm1,id=dimm1,slot=1 \
4aa5c4
 -uuid 49545eb3-75e1-2d0a-acdd-f0294406c99e \
4aa5c4
 -display none \
4aa5c4
 -no-user-config \
4aa5c4
@@ -29,4 +25,8 @@ QEMU_AUDIO_DRV=none \
4aa5c4
 -rtc base=utc \
4aa5c4
 -no-shutdown \
4aa5c4
 -boot strict=on \
4aa5c4
+-object memory-backend-ram,id=memdimm0,size=536870912 \
4aa5c4
+-device pc-dimm,memdev=memdimm0,id=dimm0,slot=0 \
4aa5c4
+-object memory-backend-ram,id=memdimm1,size=536870912 \
4aa5c4
+-device pc-dimm,memdev=memdimm1,id=dimm1,slot=1 \
4aa5c4
 -msg timestamp=on
4aa5c4
diff --git a/tests/qemuxml2argvdata/memory-hotplug-virtio-mem.x86_64-latest.args b/tests/qemuxml2argvdata/memory-hotplug-virtio-mem.x86_64-latest.args
4aa5c4
index 8747b249da..30b635d365 100644
4aa5c4
--- a/tests/qemuxml2argvdata/memory-hotplug-virtio-mem.x86_64-latest.args
4aa5c4
+++ b/tests/qemuxml2argvdata/memory-hotplug-virtio-mem.x86_64-latest.args
4aa5c4
@@ -18,10 +18,6 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
4aa5c4
 -smp 2,sockets=2,dies=1,cores=1,threads=1 \
4aa5c4
 -object '{"qom-type":"memory-backend-ram","id":"ram-node0","size":2145386496}' \
4aa5c4
 -numa node,nodeid=0,cpus=0-1,memdev=ram-node0 \
4aa5c4
--object '{"qom-type":"memory-backend-ram","id":"memvirtiomem0","reserve":false,"size":1073741824}' \
4aa5c4
--device virtio-mem-pci,node=0,block-size=2097152,requested-size=536870912,memdev=memvirtiomem0,id=virtiomem0,bus=pci.0,addr=0x2 \
4aa5c4
--object '{"qom-type":"memory-backend-file","id":"memvirtiomem1","mem-path":"/dev/hugepages2M/libvirt/qemu/-1-QEMUGuest1","reserve":false,"size":2147483648,"host-nodes":[1,2,3],"policy":"bind"}' \
4aa5c4
--device virtio-mem-pci,node=0,block-size=2097152,requested-size=1073741824,memdev=memvirtiomem1,id=virtiomem1,bus=pci.0,addr=0x3 \
4aa5c4
 -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
4aa5c4
 -display none \
4aa5c4
 -no-user-config \
4aa5c4
@@ -33,6 +29,10 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
4aa5c4
 -no-acpi \
4aa5c4
 -boot strict=on \
4aa5c4
 -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
4aa5c4
+-object '{"qom-type":"memory-backend-ram","id":"memvirtiomem0","reserve":false,"size":1073741824}' \
4aa5c4
+-device virtio-mem-pci,node=0,block-size=2097152,requested-size=536870912,memdev=memvirtiomem0,id=virtiomem0,bus=pci.0,addr=0x2 \
4aa5c4
+-object '{"qom-type":"memory-backend-file","id":"memvirtiomem1","mem-path":"/dev/hugepages2M/libvirt/qemu/-1-QEMUGuest1","reserve":false,"size":2147483648,"host-nodes":[1,2,3],"policy":"bind"}' \
4aa5c4
+-device virtio-mem-pci,node=0,block-size=2097152,requested-size=1073741824,memdev=memvirtiomem1,id=virtiomem1,bus=pci.0,addr=0x3 \
4aa5c4
 -blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \
4aa5c4
 -blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw","file":"libvirt-1-storage"}' \
4aa5c4
 -device ide-hd,bus=ide.0,unit=0,drive=libvirt-1-format,id=ide0-0-0,bootindex=1 \
4aa5c4
diff --git a/tests/qemuxml2argvdata/memory-hotplug-virtio-pmem.x86_64-5.2.0.args b/tests/qemuxml2argvdata/memory-hotplug-virtio-pmem.x86_64-5.2.0.args
4aa5c4
index 17fd98fb88..8fa678c209 100644
4aa5c4
--- a/tests/qemuxml2argvdata/memory-hotplug-virtio-pmem.x86_64-5.2.0.args
4aa5c4
+++ b/tests/qemuxml2argvdata/memory-hotplug-virtio-pmem.x86_64-5.2.0.args
4aa5c4
@@ -18,8 +18,6 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
4aa5c4
 -smp 2,sockets=2,dies=1,cores=1,threads=1 \
4aa5c4
 -object memory-backend-ram,id=ram-node0,size=2145386496 \
4aa5c4
 -numa node,nodeid=0,cpus=0-1,memdev=ram-node0 \
4aa5c4
--object memory-backend-file,id=memvirtiopmem0,mem-path=/tmp/virtio_pmem,share=on,size=536870912 \
4aa5c4
--device virtio-pmem-pci,memdev=memvirtiopmem0,id=virtiopmem0,bus=pci.0,addr=0x5 \
4aa5c4
 -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
4aa5c4
 -display none \
4aa5c4
 -no-user-config \
4aa5c4
@@ -31,6 +29,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
4aa5c4
 -no-acpi \
4aa5c4
 -boot strict=on \
4aa5c4
 -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
4aa5c4
+-object memory-backend-file,id=memvirtiopmem0,mem-path=/tmp/virtio_pmem,share=on,size=536870912 \
4aa5c4
+-device virtio-pmem-pci,memdev=memvirtiopmem0,id=virtiopmem0,bus=pci.0,addr=0x5 \
4aa5c4
 -blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \
4aa5c4
 -blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw","file":"libvirt-1-storage"}' \
4aa5c4
 -device ide-hd,bus=ide.0,unit=0,drive=libvirt-1-format,id=ide0-0-0,bootindex=1 \
4aa5c4
diff --git a/tests/qemuxml2argvdata/memory-hotplug-virtio-pmem.x86_64-latest.args b/tests/qemuxml2argvdata/memory-hotplug-virtio-pmem.x86_64-latest.args
4aa5c4
index e5a91b6d33..95ff490cef 100644
4aa5c4
--- a/tests/qemuxml2argvdata/memory-hotplug-virtio-pmem.x86_64-latest.args
4aa5c4
+++ b/tests/qemuxml2argvdata/memory-hotplug-virtio-pmem.x86_64-latest.args
4aa5c4
@@ -18,8 +18,6 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
4aa5c4
 -smp 2,sockets=2,dies=1,cores=1,threads=1 \
4aa5c4
 -object '{"qom-type":"memory-backend-ram","id":"ram-node0","size":2145386496}' \
4aa5c4
 -numa node,nodeid=0,cpus=0-1,memdev=ram-node0 \
4aa5c4
--object '{"qom-type":"memory-backend-file","id":"memvirtiopmem0","mem-path":"/tmp/virtio_pmem","share":true,"size":536870912}' \
4aa5c4
--device virtio-pmem-pci,memdev=memvirtiopmem0,id=virtiopmem0,bus=pci.0,addr=0x5 \
4aa5c4
 -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
4aa5c4
 -display none \
4aa5c4
 -no-user-config \
4aa5c4
@@ -31,6 +29,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
4aa5c4
 -no-acpi \
4aa5c4
 -boot strict=on \
4aa5c4
 -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
4aa5c4
+-object '{"qom-type":"memory-backend-file","id":"memvirtiopmem0","mem-path":"/tmp/virtio_pmem","share":true,"size":536870912}' \
4aa5c4
+-device virtio-pmem-pci,memdev=memvirtiopmem0,id=virtiopmem0,bus=pci.0,addr=0x5 \
4aa5c4
 -blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \
4aa5c4
 -blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw","file":"libvirt-1-storage"}' \
4aa5c4
 -device ide-hd,bus=ide.0,unit=0,drive=libvirt-1-format,id=ide0-0-0,bootindex=1 \
4aa5c4
diff --git a/tests/qemuxml2argvdata/pages-dimm-discard.args b/tests/qemuxml2argvdata/pages-dimm-discard.args
4aa5c4
index 2ebe9c1350..e63c908549 100644
4aa5c4
--- a/tests/qemuxml2argvdata/pages-dimm-discard.args
4aa5c4
+++ b/tests/qemuxml2argvdata/pages-dimm-discard.args
4aa5c4
@@ -17,10 +17,6 @@ QEMU_AUDIO_DRV=none \
4aa5c4
 -realtime mlock=off \
4aa5c4
 -smp 2,sockets=2,cores=1,threads=1 \
4aa5c4
 -numa node,nodeid=0,cpus=0-1,mem=1024 \
4aa5c4
--object memory-backend-file,id=memdimm0,mem-path=/dev/hugepages1G/libvirt/qemu/-1-fedora,prealloc=on,size=1073741824,host-nodes=1-3,policy=bind \
4aa5c4
--device pc-dimm,node=0,memdev=memdimm0,id=dimm0,slot=0 \
4aa5c4
--object memory-backend-file,id=memdimm1,mem-path=/var/lib/libvirt/qemu/ram/-1-fedora/dimm1,discard-data=on,share=off,size=536870912 \
4aa5c4
--device pc-dimm,node=0,memdev=memdimm1,id=dimm1,slot=1 \
4aa5c4
 -uuid 63840878-0deb-4095-97e6-fc444d9bc9fa \
4aa5c4
 -display none \
4aa5c4
 -no-user-config \
4aa5c4
@@ -32,4 +28,8 @@ QEMU_AUDIO_DRV=none \
4aa5c4
 -no-acpi \
4aa5c4
 -boot strict=on \
4aa5c4
 -usb \
4aa5c4
+-object memory-backend-file,id=memdimm0,mem-path=/dev/hugepages1G/libvirt/qemu/-1-fedora,prealloc=on,size=1073741824,host-nodes=1-3,policy=bind \
4aa5c4
+-device pc-dimm,node=0,memdev=memdimm0,id=dimm0,slot=0 \
4aa5c4
+-object memory-backend-file,id=memdimm1,mem-path=/var/lib/libvirt/qemu/ram/-1-fedora/dimm1,discard-data=on,share=off,size=536870912 \
4aa5c4
+-device pc-dimm,node=0,memdev=memdimm1,id=dimm1,slot=1 \
4aa5c4
 -msg timestamp=on
4aa5c4
-- 
4aa5c4
2.35.1
4aa5c4