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