[libvirt] [PATCH 3/3] qemu_command: Prefer '-overcommit mem-lock' over -realtime mlock'

Michal Privoznik mprivozn at redhat.com
Fri Apr 12 08:46:41 UTC 2019


The latter is deprecated and will be removed soon. The advised
replacement is '-overcommit mem-lock=on|off'.

Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
---
 src/qemu/qemu_command.c                               | 11 ++++++++---
 .../channel-unix-guestfwd.x86_64-latest.args          |  2 +-
 .../console-virtio-unix.x86_64-latest.args            |  2 +-
 .../controller-virtio-scsi.x86_64-latest.args         |  2 +-
 tests/qemuxml2argvdata/disk-aio.x86_64-latest.args    |  2 +-
 .../disk-backing-chains-noindex.x86_64-latest.args    |  2 +-
 tests/qemuxml2argvdata/disk-cache.x86_64-latest.args  |  2 +-
 .../disk-cdrom-bus-other.x86_64-latest.args           |  2 +-
 .../disk-cdrom-network.x86_64-latest.args             |  2 +-
 .../disk-cdrom-tray.x86_64-latest.args                |  2 +-
 tests/qemuxml2argvdata/disk-cdrom.x86_64-latest.args  |  2 +-
 .../disk-copy_on_read.x86_64-latest.args              |  2 +-
 .../disk-detect-zeroes.x86_64-latest.args             |  2 +-
 .../disk-error-policy.x86_64-latest.args              |  2 +-
 .../disk-floppy-q35-2_11.x86_64-latest.args           |  2 +-
 .../disk-floppy-q35-2_9.x86_64-latest.args            |  2 +-
 tests/qemuxml2argvdata/disk-floppy.x86_64-latest.args |  2 +-
 .../disk-network-gluster.x86_64-latest.args           |  2 +-
 .../disk-network-iscsi.x86_64-latest.args             |  2 +-
 .../disk-network-nbd.x86_64-latest.args               |  2 +-
 .../disk-network-rbd.x86_64-latest.args               |  2 +-
 .../disk-network-sheepdog.x86_64-latest.args          |  2 +-
 .../disk-network-source-auth.x86_64-latest.args       |  2 +-
 .../disk-network-tlsx509.x86_64-latest.args           |  2 +-
 .../disk-readonly-disk.x86_64-latest.args             |  2 +-
 .../disk-scsi-device-auto.x86_64-latest.args          |  2 +-
 tests/qemuxml2argvdata/disk-scsi.x86_64-latest.args   |  2 +-
 tests/qemuxml2argvdata/disk-shared.x86_64-latest.args |  2 +-
 .../disk-virtio-scsi-reservations.x86_64-latest.args  |  2 +-
 .../floppy-drive-fat.x86_64-latest.args               |  2 +-
 tests/qemuxml2argvdata/genid-auto.x86_64-latest.args  |  2 +-
 tests/qemuxml2argvdata/genid.x86_64-latest.args       |  2 +-
 ...raphics-egl-headless-rendernode.x86_64-latest.args |  2 +-
 .../graphics-egl-headless.x86_64-latest.args          |  2 +-
 ...aphics-spice-gl-auto-rendernode.x86_64-latest.args |  2 +-
 .../graphics-vnc-tls-secret.x86_64-latest.args        |  2 +-
 .../graphics-vnc-tls.x86_64-latest.args               |  2 +-
 ...mdev-display-spice-egl-headless.x86_64-latest.args |  2 +-
 ...stdev-mdev-display-spice-opengl.x86_64-latest.args |  2 +-
 ...v-mdev-display-vnc-egl-headless.x86_64-latest.args |  2 +-
 .../hostdev-mdev-display-vnc.x86_64-latest.args       |  2 +-
 .../hugepages-nvdimm.x86_64-latest.args               |  2 +-
 .../iothreads-virtio-scsi-pci.x86_64-latest.args      |  2 +-
 .../memfd-memory-default-hugepage.x86_64-latest.args  |  2 +-
 .../memfd-memory-numa.x86_64-latest.args              |  2 +-
 .../memory-hotplug-nvdimm-access.x86_64-latest.args   |  2 +-
 .../memory-hotplug-nvdimm-align.x86_64-latest.args    |  2 +-
 .../memory-hotplug-nvdimm-label.x86_64-latest.args    |  2 +-
 .../memory-hotplug-nvdimm-pmem.x86_64-latest.args     |  2 +-
 .../memory-hotplug-nvdimm-readonly.x86_64-latest.args |  2 +-
 .../memory-hotplug-nvdimm.x86_64-latest.args          |  2 +-
 tests/qemuxml2argvdata/mlock-off.args                 |  2 +-
 tests/qemuxml2argvdata/mlock-on.args                  |  2 +-
 .../qemuxml2argvdata/net-vhostuser.x86_64-latest.args |  2 +-
 .../os-firmware-bios.x86_64-latest.args               |  2 +-
 .../os-firmware-efi-secboot.x86_64-latest.args        |  2 +-
 .../os-firmware-efi.x86_64-latest.args                |  2 +-
 .../parallel-unix-chardev.x86_64-latest.args          |  2 +-
 .../ppc64-pseries-graphics.ppc64-latest.args          |  2 +-
 .../ppc64-pseries-headless.ppc64-latest.args          |  2 +-
 .../riscv64-virt-headless.riscv64-latest.args         |  2 +-
 .../serial-unix-chardev.x86_64-latest.args            |  2 +-
 .../smartcard-passthrough-unix.x86_64-latest.args     |  2 +-
 .../tpm-emulator-tpm2.x86_64-latest.args              |  2 +-
 .../qemuxml2argvdata/tpm-emulator.x86_64-latest.args  |  2 +-
 .../tseg-explicit-size.x86_64-latest.args             |  2 +-
 .../usb-redir-unix.x86_64-latest.args                 |  2 +-
 .../vhost-vsock-auto.x86_64-latest.args               |  2 +-
 tests/qemuxml2argvdata/vhost-vsock.x86_64-latest.args |  2 +-
 .../video-qxl-device-vram64.x86_64-latest.args        |  2 +-
 .../video-qxl-sec-device-vram64.x86_64-latest.args    |  2 +-
 .../virtio-non-transitional.x86_64-3.1.0.args         |  2 +-
 .../virtio-non-transitional.x86_64-latest.args        |  2 +-
 .../virtio-rng-egd-unix.x86_64-latest.args            |  2 +-
 .../virtio-transitional.x86_64-3.1.0.args             |  2 +-
 .../virtio-transitional.x86_64-latest.args            |  2 +-
 .../x86_64-pc-graphics.x86_64-latest.args             |  2 +-
 .../x86_64-pc-headless.x86_64-latest.args             |  2 +-
 .../x86_64-q35-graphics.x86_64-latest.args            |  2 +-
 .../x86_64-q35-headless.x86_64-latest.args            |  2 +-
 tests/qemuxml2argvtest.c                              |  4 ++--
 81 files changed, 89 insertions(+), 84 deletions(-)

diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index abaadd3de0..2acc0b56ea 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -7917,9 +7917,14 @@ qemuBuildMemCommandLine(virCommandPtr cmd,
         qemuBuildMemPathStr(cfg, def, cmd, priv) < 0)
         return -1;
 
-    virCommandAddArg(cmd, "-realtime");
-    virCommandAddArgFormat(cmd, "mlock=%s",
-                           def->mem.locked ? "on" : "off");
+    if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_OVERCOMMIT)) {
+        virCommandAddArg(cmd, "-overcommit");
+        virCommandAddArgFormat(cmd, "mem-lock=%s", def->mem.locked ? "on" : "off");
+    } else {
+        virCommandAddArg(cmd, "-realtime");
+        virCommandAddArgFormat(cmd, "mlock=%s",
+                               def->mem.locked ? "on" : "off");
+    }
 
     return 0;
 }
diff --git a/tests/qemuxml2argvdata/channel-unix-guestfwd.x86_64-latest.args b/tests/qemuxml2argvdata/channel-unix-guestfwd.x86_64-latest.args
index c1bb05a16e..f9bc1f7420 100644
--- a/tests/qemuxml2argvdata/channel-unix-guestfwd.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/channel-unix-guestfwd.x86_64-latest.args
@@ -14,7 +14,7 @@ QEMU_AUDIO_DRV=none \
 file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
 -machine pc,accel=kvm,usb=off,dump-guest-core=off \
 -m 214 \
--realtime mlock=off \
+-overcommit mem-lock=off \
 -smp 1,sockets=1,cores=1,threads=1 \
 -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
 -display none \
diff --git a/tests/qemuxml2argvdata/console-virtio-unix.x86_64-latest.args b/tests/qemuxml2argvdata/console-virtio-unix.x86_64-latest.args
index f9620c9ce5..e9ec18a31f 100644
--- a/tests/qemuxml2argvdata/console-virtio-unix.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/console-virtio-unix.x86_64-latest.args
@@ -14,7 +14,7 @@ QEMU_AUDIO_DRV=none \
 file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
 -machine pc,accel=kvm,usb=off,dump-guest-core=off \
 -m 214 \
--realtime mlock=off \
+-overcommit mem-lock=off \
 -smp 1,sockets=1,cores=1,threads=1 \
 -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
 -display none \
diff --git a/tests/qemuxml2argvdata/controller-virtio-scsi.x86_64-latest.args b/tests/qemuxml2argvdata/controller-virtio-scsi.x86_64-latest.args
index d1088a5a06..32b781ced9 100644
--- a/tests/qemuxml2argvdata/controller-virtio-scsi.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/controller-virtio-scsi.x86_64-latest.args
@@ -14,7 +14,7 @@ QEMU_AUDIO_DRV=none \
 file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
 -machine pc,accel=tcg,usb=off,dump-guest-core=off \
 -m 214 \
--realtime mlock=off \
+-overcommit mem-lock=off \
 -smp 8,sockets=8,cores=1,threads=1 \
 -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
 -display none \
diff --git a/tests/qemuxml2argvdata/disk-aio.x86_64-latest.args b/tests/qemuxml2argvdata/disk-aio.x86_64-latest.args
index 9ba9588dd4..623ea39a2e 100644
--- a/tests/qemuxml2argvdata/disk-aio.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/disk-aio.x86_64-latest.args
@@ -14,7 +14,7 @@ QEMU_AUDIO_DRV=none \
 file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
 -machine pc,accel=tcg,usb=off,dump-guest-core=off \
 -m 214 \
--realtime mlock=off \
+-overcommit mem-lock=off \
 -smp 1,sockets=1,cores=1,threads=1 \
 -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
 -display none \
diff --git a/tests/qemuxml2argvdata/disk-backing-chains-noindex.x86_64-latest.args b/tests/qemuxml2argvdata/disk-backing-chains-noindex.x86_64-latest.args
index ee3a3f4ed3..bba58be46c 100644
--- a/tests/qemuxml2argvdata/disk-backing-chains-noindex.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/disk-backing-chains-noindex.x86_64-latest.args
@@ -14,7 +14,7 @@ QEMU_AUDIO_DRV=none \
 file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
 -machine pc,accel=tcg,usb=off,dump-guest-core=off \
 -m 214 \
--realtime mlock=off \
+-overcommit mem-lock=off \
 -smp 1,sockets=1,cores=1,threads=1 \
 -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
 -display none \
diff --git a/tests/qemuxml2argvdata/disk-cache.x86_64-latest.args b/tests/qemuxml2argvdata/disk-cache.x86_64-latest.args
index efe9678d41..7ea6d5b4d5 100644
--- a/tests/qemuxml2argvdata/disk-cache.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/disk-cache.x86_64-latest.args
@@ -14,7 +14,7 @@ QEMU_AUDIO_DRV=none \
 file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
 -machine pc-i440fx-2.6,accel=tcg,usb=off,dump-guest-core=off \
 -m 214 \
--realtime mlock=off \
+-overcommit mem-lock=off \
 -smp 1,sockets=1,cores=1,threads=1 \
 -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
 -display none \
diff --git a/tests/qemuxml2argvdata/disk-cdrom-bus-other.x86_64-latest.args b/tests/qemuxml2argvdata/disk-cdrom-bus-other.x86_64-latest.args
index b069edbfa3..b2ac9b5c04 100644
--- a/tests/qemuxml2argvdata/disk-cdrom-bus-other.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/disk-cdrom-bus-other.x86_64-latest.args
@@ -14,7 +14,7 @@ QEMU_AUDIO_DRV=none \
 file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
 -machine pc,accel=tcg,usb=off,dump-guest-core=off \
 -m 214 \
--realtime mlock=off \
+-overcommit mem-lock=off \
 -smp 1,sockets=1,cores=1,threads=1 \
 -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
 -display none \
diff --git a/tests/qemuxml2argvdata/disk-cdrom-network.x86_64-latest.args b/tests/qemuxml2argvdata/disk-cdrom-network.x86_64-latest.args
index 1ece3d6f46..cf711c0a3f 100644
--- a/tests/qemuxml2argvdata/disk-cdrom-network.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/disk-cdrom-network.x86_64-latest.args
@@ -14,7 +14,7 @@ QEMU_AUDIO_DRV=none \
 file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
 -machine pc-1.2,accel=kvm,usb=off,dump-guest-core=off \
 -m 1024 \
--realtime mlock=off \
+-overcommit mem-lock=off \
 -smp 1,sockets=1,cores=1,threads=1 \
 -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
 -display none \
diff --git a/tests/qemuxml2argvdata/disk-cdrom-tray.x86_64-latest.args b/tests/qemuxml2argvdata/disk-cdrom-tray.x86_64-latest.args
index 33262d37e8..ad17416851 100644
--- a/tests/qemuxml2argvdata/disk-cdrom-tray.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/disk-cdrom-tray.x86_64-latest.args
@@ -14,7 +14,7 @@ QEMU_AUDIO_DRV=none \
 file=/tmp/lib/domain--1-test/master-key.aes \
 -machine pc-0.13,accel=tcg,usb=off,dump-guest-core=off \
 -m 1024 \
--realtime mlock=off \
+-overcommit mem-lock=off \
 -smp 1,sockets=1,cores=1,threads=1 \
 -uuid 3fa02811-7832-34bd-004d-1ff56a9286ff \
 -display none \
diff --git a/tests/qemuxml2argvdata/disk-cdrom.x86_64-latest.args b/tests/qemuxml2argvdata/disk-cdrom.x86_64-latest.args
index 9caed976d1..bacef71aad 100644
--- a/tests/qemuxml2argvdata/disk-cdrom.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/disk-cdrom.x86_64-latest.args
@@ -14,7 +14,7 @@ QEMU_AUDIO_DRV=none \
 file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
 -machine pc,accel=tcg,usb=off,dump-guest-core=off \
 -m 214 \
--realtime mlock=off \
+-overcommit mem-lock=off \
 -smp 1,sockets=1,cores=1,threads=1 \
 -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
 -display none \
diff --git a/tests/qemuxml2argvdata/disk-copy_on_read.x86_64-latest.args b/tests/qemuxml2argvdata/disk-copy_on_read.x86_64-latest.args
index 31719c4933..1f1d37c957 100644
--- a/tests/qemuxml2argvdata/disk-copy_on_read.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/disk-copy_on_read.x86_64-latest.args
@@ -14,7 +14,7 @@ QEMU_AUDIO_DRV=none \
 file=/tmp/lib/domain--1-test/master-key.aes \
 -machine pc-0.13,accel=tcg,usb=off,dump-guest-core=off \
 -m 1024 \
--realtime mlock=off \
+-overcommit mem-lock=off \
 -smp 1,sockets=1,cores=1,threads=1 \
 -uuid 468404ad-d49c-40f2-9e14-02294f9c1be3 \
 -display none \
diff --git a/tests/qemuxml2argvdata/disk-detect-zeroes.x86_64-latest.args b/tests/qemuxml2argvdata/disk-detect-zeroes.x86_64-latest.args
index a0cc477400..b48c0f8d43 100644
--- a/tests/qemuxml2argvdata/disk-detect-zeroes.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/disk-detect-zeroes.x86_64-latest.args
@@ -14,7 +14,7 @@ QEMU_AUDIO_DRV=none \
 file=/tmp/lib/domain--1-test/master-key.aes \
 -machine pc-0.13,accel=tcg,usb=off,dump-guest-core=off \
 -m 1024 \
--realtime mlock=off \
+-overcommit mem-lock=off \
 -smp 1,sockets=1,cores=1,threads=1 \
 -uuid 92d7a226-cfae-425b-a6d3-00bbf9ec5c9e \
 -display none \
diff --git a/tests/qemuxml2argvdata/disk-error-policy.x86_64-latest.args b/tests/qemuxml2argvdata/disk-error-policy.x86_64-latest.args
index b48408434c..ea754cef0f 100644
--- a/tests/qemuxml2argvdata/disk-error-policy.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/disk-error-policy.x86_64-latest.args
@@ -14,7 +14,7 @@ QEMU_AUDIO_DRV=none \
 file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
 -machine pc,accel=tcg,usb=off,dump-guest-core=off \
 -m 214 \
--realtime mlock=off \
+-overcommit mem-lock=off \
 -smp 1,sockets=1,cores=1,threads=1 \
 -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
 -display none \
diff --git a/tests/qemuxml2argvdata/disk-floppy-q35-2_11.x86_64-latest.args b/tests/qemuxml2argvdata/disk-floppy-q35-2_11.x86_64-latest.args
index b221718e29..02e2b1e76c 100644
--- a/tests/qemuxml2argvdata/disk-floppy-q35-2_11.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/disk-floppy-q35-2_11.x86_64-latest.args
@@ -14,7 +14,7 @@ QEMU_AUDIO_DRV=none \
 file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
 -machine pc-q35-2.11,accel=tcg,usb=off,dump-guest-core=off \
 -m 214 \
--realtime mlock=off \
+-overcommit mem-lock=off \
 -smp 1,sockets=1,cores=1,threads=1 \
 -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
 -display none \
diff --git a/tests/qemuxml2argvdata/disk-floppy-q35-2_9.x86_64-latest.args b/tests/qemuxml2argvdata/disk-floppy-q35-2_9.x86_64-latest.args
index 51be45465e..a158e8e3d3 100644
--- a/tests/qemuxml2argvdata/disk-floppy-q35-2_9.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/disk-floppy-q35-2_9.x86_64-latest.args
@@ -14,7 +14,7 @@ QEMU_AUDIO_DRV=none \
 file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
 -machine pc-q35-2.9,accel=tcg,usb=off,dump-guest-core=off \
 -m 214 \
--realtime mlock=off \
+-overcommit mem-lock=off \
 -smp 1,sockets=1,cores=1,threads=1 \
 -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
 -display none \
diff --git a/tests/qemuxml2argvdata/disk-floppy.x86_64-latest.args b/tests/qemuxml2argvdata/disk-floppy.x86_64-latest.args
index fdac8cf00c..f2ce94a330 100644
--- a/tests/qemuxml2argvdata/disk-floppy.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/disk-floppy.x86_64-latest.args
@@ -14,7 +14,7 @@ QEMU_AUDIO_DRV=none \
 file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
 -machine pc,accel=tcg,usb=off,dump-guest-core=off \
 -m 214 \
--realtime mlock=off \
+-overcommit mem-lock=off \
 -smp 1,sockets=1,cores=1,threads=1 \
 -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
 -display none \
diff --git a/tests/qemuxml2argvdata/disk-network-gluster.x86_64-latest.args b/tests/qemuxml2argvdata/disk-network-gluster.x86_64-latest.args
index e11ceab6bc..c34abe89b4 100644
--- a/tests/qemuxml2argvdata/disk-network-gluster.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/disk-network-gluster.x86_64-latest.args
@@ -14,7 +14,7 @@ QEMU_AUDIO_DRV=none \
 file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
 -machine pc,accel=tcg,usb=off,dump-guest-core=off \
 -m 214 \
--realtime mlock=off \
+-overcommit mem-lock=off \
 -smp 1,sockets=1,cores=1,threads=1 \
 -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
 -display none \
diff --git a/tests/qemuxml2argvdata/disk-network-iscsi.x86_64-latest.args b/tests/qemuxml2argvdata/disk-network-iscsi.x86_64-latest.args
index da04caf134..19fcd97c80 100644
--- a/tests/qemuxml2argvdata/disk-network-iscsi.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/disk-network-iscsi.x86_64-latest.args
@@ -14,7 +14,7 @@ QEMU_AUDIO_DRV=none \
 file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
 -machine pc,accel=tcg,usb=off,dump-guest-core=off \
 -m 214 \
--realtime mlock=off \
+-overcommit mem-lock=off \
 -smp 1,sockets=1,cores=1,threads=1 \
 -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
 -display none \
diff --git a/tests/qemuxml2argvdata/disk-network-nbd.x86_64-latest.args b/tests/qemuxml2argvdata/disk-network-nbd.x86_64-latest.args
index beafc0bfa4..554387358a 100644
--- a/tests/qemuxml2argvdata/disk-network-nbd.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/disk-network-nbd.x86_64-latest.args
@@ -14,7 +14,7 @@ QEMU_AUDIO_DRV=none \
 file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
 -machine pc,accel=tcg,usb=off,dump-guest-core=off \
 -m 214 \
--realtime mlock=off \
+-overcommit mem-lock=off \
 -smp 1,sockets=1,cores=1,threads=1 \
 -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
 -display none \
diff --git a/tests/qemuxml2argvdata/disk-network-rbd.x86_64-latest.args b/tests/qemuxml2argvdata/disk-network-rbd.x86_64-latest.args
index 7650a8889f..98297d8872 100644
--- a/tests/qemuxml2argvdata/disk-network-rbd.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/disk-network-rbd.x86_64-latest.args
@@ -14,7 +14,7 @@ QEMU_AUDIO_DRV=none \
 file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
 -machine pc,accel=tcg,usb=off,dump-guest-core=off \
 -m 214 \
--realtime mlock=off \
+-overcommit mem-lock=off \
 -smp 1,sockets=1,cores=1,threads=1 \
 -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
 -display none \
diff --git a/tests/qemuxml2argvdata/disk-network-sheepdog.x86_64-latest.args b/tests/qemuxml2argvdata/disk-network-sheepdog.x86_64-latest.args
index 48a85a9d1e..011c02ba88 100644
--- a/tests/qemuxml2argvdata/disk-network-sheepdog.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/disk-network-sheepdog.x86_64-latest.args
@@ -14,7 +14,7 @@ QEMU_AUDIO_DRV=none \
 file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
 -machine pc,accel=tcg,usb=off,dump-guest-core=off \
 -m 214 \
--realtime mlock=off \
+-overcommit mem-lock=off \
 -smp 1,sockets=1,cores=1,threads=1 \
 -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
 -display none \
diff --git a/tests/qemuxml2argvdata/disk-network-source-auth.x86_64-latest.args b/tests/qemuxml2argvdata/disk-network-source-auth.x86_64-latest.args
index dd95c0f002..9bc67a1c40 100644
--- a/tests/qemuxml2argvdata/disk-network-source-auth.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/disk-network-source-auth.x86_64-latest.args
@@ -14,7 +14,7 @@ QEMU_AUDIO_DRV=none \
 file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
 -machine pc,accel=tcg,usb=off,dump-guest-core=off \
 -m 214 \
--realtime mlock=off \
+-overcommit mem-lock=off \
 -smp 1,sockets=1,cores=1,threads=1 \
 -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
 -display none \
diff --git a/tests/qemuxml2argvdata/disk-network-tlsx509.x86_64-latest.args b/tests/qemuxml2argvdata/disk-network-tlsx509.x86_64-latest.args
index 35e5936828..c043de80d8 100644
--- a/tests/qemuxml2argvdata/disk-network-tlsx509.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/disk-network-tlsx509.x86_64-latest.args
@@ -15,7 +15,7 @@ file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
 -machine pc,accel=tcg,usb=off,dump-guest-core=off \
 -cpu qemu32 \
 -m 214 \
--realtime mlock=off \
+-overcommit mem-lock=off \
 -smp 1,sockets=1,cores=1,threads=1 \
 -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
 -display none \
diff --git a/tests/qemuxml2argvdata/disk-readonly-disk.x86_64-latest.args b/tests/qemuxml2argvdata/disk-readonly-disk.x86_64-latest.args
index 2096a2ef92..c325c6fe76 100644
--- a/tests/qemuxml2argvdata/disk-readonly-disk.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/disk-readonly-disk.x86_64-latest.args
@@ -14,7 +14,7 @@ QEMU_AUDIO_DRV=none \
 file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
 -machine pc,accel=tcg,usb=off,dump-guest-core=off \
 -m 214 \
--realtime mlock=off \
+-overcommit mem-lock=off \
 -smp 1,sockets=1,cores=1,threads=1 \
 -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
 -display none \
diff --git a/tests/qemuxml2argvdata/disk-scsi-device-auto.x86_64-latest.args b/tests/qemuxml2argvdata/disk-scsi-device-auto.x86_64-latest.args
index 248a64eeef..9661115009 100644
--- a/tests/qemuxml2argvdata/disk-scsi-device-auto.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/disk-scsi-device-auto.x86_64-latest.args
@@ -14,7 +14,7 @@ QEMU_AUDIO_DRV=none \
 file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
 -machine pc,accel=tcg,usb=off,dump-guest-core=off \
 -m 214 \
--realtime mlock=off \
+-overcommit mem-lock=off \
 -smp 1,sockets=1,cores=1,threads=1 \
 -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
 -display none \
diff --git a/tests/qemuxml2argvdata/disk-scsi.x86_64-latest.args b/tests/qemuxml2argvdata/disk-scsi.x86_64-latest.args
index ca3d5c8a36..6c2618ed61 100644
--- a/tests/qemuxml2argvdata/disk-scsi.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/disk-scsi.x86_64-latest.args
@@ -14,7 +14,7 @@ QEMU_AUDIO_DRV=none \
 file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
 -machine pc,accel=tcg,usb=off,dump-guest-core=off \
 -m 214 \
--realtime mlock=off \
+-overcommit mem-lock=off \
 -smp 1,sockets=1,cores=1,threads=1 \
 -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
 -display none \
diff --git a/tests/qemuxml2argvdata/disk-shared.x86_64-latest.args b/tests/qemuxml2argvdata/disk-shared.x86_64-latest.args
index 227574012d..afc2549442 100644
--- a/tests/qemuxml2argvdata/disk-shared.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/disk-shared.x86_64-latest.args
@@ -14,7 +14,7 @@ QEMU_AUDIO_DRV=none \
 file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
 -machine pc,accel=tcg,usb=off,dump-guest-core=off \
 -m 214 \
--realtime mlock=off \
+-overcommit mem-lock=off \
 -smp 1,sockets=1,cores=1,threads=1 \
 -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
 -display none \
diff --git a/tests/qemuxml2argvdata/disk-virtio-scsi-reservations.x86_64-latest.args b/tests/qemuxml2argvdata/disk-virtio-scsi-reservations.x86_64-latest.args
index 0b1b83295c..746dbdedfe 100644
--- a/tests/qemuxml2argvdata/disk-virtio-scsi-reservations.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/disk-virtio-scsi-reservations.x86_64-latest.args
@@ -16,7 +16,7 @@ file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
 path=/tmp/lib/domain--1-QEMUGuest1/pr-helper0.sock \
 -machine pc,accel=tcg,usb=off,dump-guest-core=off \
 -m 214 \
--realtime mlock=off \
+-overcommit mem-lock=off \
 -smp 8,sockets=8,cores=1,threads=1 \
 -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
 -display none \
diff --git a/tests/qemuxml2argvdata/floppy-drive-fat.x86_64-latest.args b/tests/qemuxml2argvdata/floppy-drive-fat.x86_64-latest.args
index 102b13bf82..2e6f893fad 100644
--- a/tests/qemuxml2argvdata/floppy-drive-fat.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/floppy-drive-fat.x86_64-latest.args
@@ -14,7 +14,7 @@ QEMU_AUDIO_DRV=none \
 file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
 -machine pc,accel=tcg,usb=off,dump-guest-core=off \
 -m 214 \
--realtime mlock=off \
+-overcommit mem-lock=off \
 -smp 1,sockets=1,cores=1,threads=1 \
 -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
 -display none \
diff --git a/tests/qemuxml2argvdata/genid-auto.x86_64-latest.args b/tests/qemuxml2argvdata/genid-auto.x86_64-latest.args
index 63c4fd3d65..aa11b80dbc 100644
--- a/tests/qemuxml2argvdata/genid-auto.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/genid-auto.x86_64-latest.args
@@ -14,7 +14,7 @@ QEMU_AUDIO_DRV=none \
 file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
 -machine pc,accel=tcg,usb=off,dump-guest-core=off \
 -m 214 \
--realtime mlock=off \
+-overcommit mem-lock=off \
 -smp 1,sockets=1,cores=1,threads=1 \
 -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
 -device vmgenid,guid=00010203-0405-4607-8809-0a0b0c0d0e0f,id=vmgenid0 \
diff --git a/tests/qemuxml2argvdata/genid.x86_64-latest.args b/tests/qemuxml2argvdata/genid.x86_64-latest.args
index 5d73d78571..10641ff014 100644
--- a/tests/qemuxml2argvdata/genid.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/genid.x86_64-latest.args
@@ -14,7 +14,7 @@ QEMU_AUDIO_DRV=none \
 file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
 -machine pc,accel=tcg,usb=off,dump-guest-core=off \
 -m 214 \
--realtime mlock=off \
+-overcommit mem-lock=off \
 -smp 1,sockets=1,cores=1,threads=1 \
 -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
 -device vmgenid,guid=e9392370-2917-565e-692b-d057f46512d6,id=vmgenid0 \
diff --git a/tests/qemuxml2argvdata/graphics-egl-headless-rendernode.x86_64-latest.args b/tests/qemuxml2argvdata/graphics-egl-headless-rendernode.x86_64-latest.args
index 10b44d52d3..c78272eadc 100644
--- a/tests/qemuxml2argvdata/graphics-egl-headless-rendernode.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/graphics-egl-headless-rendernode.x86_64-latest.args
@@ -13,7 +13,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
 file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
 -machine pc,accel=tcg,usb=off,dump-guest-core=off \
 -m 214 \
--realtime mlock=off \
+-overcommit mem-lock=off \
 -smp 1,sockets=1,cores=1,threads=1 \
 -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
 -no-user-config \
diff --git a/tests/qemuxml2argvdata/graphics-egl-headless.x86_64-latest.args b/tests/qemuxml2argvdata/graphics-egl-headless.x86_64-latest.args
index 10b44d52d3..c78272eadc 100644
--- a/tests/qemuxml2argvdata/graphics-egl-headless.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/graphics-egl-headless.x86_64-latest.args
@@ -13,7 +13,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
 file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
 -machine pc,accel=tcg,usb=off,dump-guest-core=off \
 -m 214 \
--realtime mlock=off \
+-overcommit mem-lock=off \
 -smp 1,sockets=1,cores=1,threads=1 \
 -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
 -no-user-config \
diff --git a/tests/qemuxml2argvdata/graphics-spice-gl-auto-rendernode.x86_64-latest.args b/tests/qemuxml2argvdata/graphics-spice-gl-auto-rendernode.x86_64-latest.args
index cec5cbe71f..00057eb3e5 100644
--- a/tests/qemuxml2argvdata/graphics-spice-gl-auto-rendernode.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/graphics-spice-gl-auto-rendernode.x86_64-latest.args
@@ -14,7 +14,7 @@ QEMU_AUDIO_DRV=spice \
 file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
 -machine pc,accel=tcg,usb=off,dump-guest-core=off \
 -m 214 \
--realtime mlock=off \
+-overcommit mem-lock=off \
 -smp 1,sockets=1,cores=1,threads=1 \
 -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
 -no-user-config \
diff --git a/tests/qemuxml2argvdata/graphics-vnc-tls-secret.x86_64-latest.args b/tests/qemuxml2argvdata/graphics-vnc-tls-secret.x86_64-latest.args
index 3494eecbfe..4180df6b65 100644
--- a/tests/qemuxml2argvdata/graphics-vnc-tls-secret.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/graphics-vnc-tls-secret.x86_64-latest.args
@@ -15,7 +15,7 @@ QEMU_AUDIO_DRV=none \
 file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
 -machine pc,accel=tcg,usb=off,dump-guest-core=off \
 -m 214 \
--realtime mlock=off \
+-overcommit mem-lock=off \
 -smp 1,sockets=1,cores=1,threads=1 \
 -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
 -no-user-config \
diff --git a/tests/qemuxml2argvdata/graphics-vnc-tls.x86_64-latest.args b/tests/qemuxml2argvdata/graphics-vnc-tls.x86_64-latest.args
index 014230942c..78579e4dc2 100644
--- a/tests/qemuxml2argvdata/graphics-vnc-tls.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/graphics-vnc-tls.x86_64-latest.args
@@ -15,7 +15,7 @@ QEMU_AUDIO_DRV=none \
 file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
 -machine pc,accel=tcg,usb=off,dump-guest-core=off \
 -m 214 \
--realtime mlock=off \
+-overcommit mem-lock=off \
 -smp 1,sockets=1,cores=1,threads=1 \
 -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
 -no-user-config \
diff --git a/tests/qemuxml2argvdata/hostdev-mdev-display-spice-egl-headless.x86_64-latest.args b/tests/qemuxml2argvdata/hostdev-mdev-display-spice-egl-headless.x86_64-latest.args
index 40b4cca088..d15ffa6dc4 100644
--- a/tests/qemuxml2argvdata/hostdev-mdev-display-spice-egl-headless.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/hostdev-mdev-display-spice-egl-headless.x86_64-latest.args
@@ -14,7 +14,7 @@ QEMU_AUDIO_DRV=spice \
 file=/tmp/lib/domain--1-QEMUGuest2/master-key.aes \
 -machine pc,accel=tcg,usb=off,dump-guest-core=off \
 -m 214 \
--realtime mlock=off \
+-overcommit mem-lock=off \
 -smp 1,sockets=1,cores=1,threads=1 \
 -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
 -no-user-config \
diff --git a/tests/qemuxml2argvdata/hostdev-mdev-display-spice-opengl.x86_64-latest.args b/tests/qemuxml2argvdata/hostdev-mdev-display-spice-opengl.x86_64-latest.args
index da0aedca9b..5bda70c8e2 100644
--- a/tests/qemuxml2argvdata/hostdev-mdev-display-spice-opengl.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/hostdev-mdev-display-spice-opengl.x86_64-latest.args
@@ -14,7 +14,7 @@ QEMU_AUDIO_DRV=spice \
 file=/tmp/lib/domain--1-QEMUGuest2/master-key.aes \
 -machine pc,accel=tcg,usb=off,dump-guest-core=off \
 -m 214 \
--realtime mlock=off \
+-overcommit mem-lock=off \
 -smp 1,sockets=1,cores=1,threads=1 \
 -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
 -no-user-config \
diff --git a/tests/qemuxml2argvdata/hostdev-mdev-display-vnc-egl-headless.x86_64-latest.args b/tests/qemuxml2argvdata/hostdev-mdev-display-vnc-egl-headless.x86_64-latest.args
index d6f0f47ce8..9c5060cdb0 100644
--- a/tests/qemuxml2argvdata/hostdev-mdev-display-vnc-egl-headless.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/hostdev-mdev-display-vnc-egl-headless.x86_64-latest.args
@@ -14,7 +14,7 @@ QEMU_AUDIO_DRV=none \
 file=/tmp/lib/domain--1-QEMUGuest2/master-key.aes \
 -machine pc,accel=tcg,usb=off,dump-guest-core=off \
 -m 214 \
--realtime mlock=off \
+-overcommit mem-lock=off \
 -smp 1,sockets=1,cores=1,threads=1 \
 -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
 -no-user-config \
diff --git a/tests/qemuxml2argvdata/hostdev-mdev-display-vnc.x86_64-latest.args b/tests/qemuxml2argvdata/hostdev-mdev-display-vnc.x86_64-latest.args
index 3eef014f13..d8ba568145 100644
--- a/tests/qemuxml2argvdata/hostdev-mdev-display-vnc.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/hostdev-mdev-display-vnc.x86_64-latest.args
@@ -14,7 +14,7 @@ QEMU_AUDIO_DRV=none \
 file=/tmp/lib/domain--1-QEMUGuest2/master-key.aes \
 -machine pc,accel=tcg,usb=off,dump-guest-core=off \
 -m 214 \
--realtime mlock=off \
+-overcommit mem-lock=off \
 -smp 1,sockets=1,cores=1,threads=1 \
 -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
 -no-user-config \
diff --git a/tests/qemuxml2argvdata/hugepages-nvdimm.x86_64-latest.args b/tests/qemuxml2argvdata/hugepages-nvdimm.x86_64-latest.args
index f4b401ebdd..7f0a93cee4 100644
--- a/tests/qemuxml2argvdata/hugepages-nvdimm.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/hugepages-nvdimm.x86_64-latest.args
@@ -14,7 +14,7 @@ QEMU_AUDIO_DRV=none \
 file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
 -machine pc,accel=tcg,usb=off,dump-guest-core=off,nvdimm=on \
 -m size=1048576k,slots=16,maxmem=1099511627776k \
--realtime mlock=off \
+-overcommit mem-lock=off \
 -smp 2,sockets=2,cores=1,threads=1 \
 -object memory-backend-file,id=ram-node0,prealloc=yes,\
 mem-path=/dev/hugepages2M/libvirt/qemu/-1-QEMUGuest1,share=yes,size=1073741824 \
diff --git a/tests/qemuxml2argvdata/iothreads-virtio-scsi-pci.x86_64-latest.args b/tests/qemuxml2argvdata/iothreads-virtio-scsi-pci.x86_64-latest.args
index 6a153381be..bc66de1f76 100644
--- a/tests/qemuxml2argvdata/iothreads-virtio-scsi-pci.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/iothreads-virtio-scsi-pci.x86_64-latest.args
@@ -14,7 +14,7 @@ QEMU_AUDIO_DRV=none \
 file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
 -machine pc,accel=tcg,usb=off,dump-guest-core=off \
 -m 214 \
--realtime mlock=off \
+-overcommit mem-lock=off \
 -smp 2,sockets=2,cores=1,threads=1 \
 -object iothread,id=iothread1 \
 -object iothread,id=iothread2 \
diff --git a/tests/qemuxml2argvdata/memfd-memory-default-hugepage.x86_64-latest.args b/tests/qemuxml2argvdata/memfd-memory-default-hugepage.x86_64-latest.args
index c582878a12..998c9f98bd 100644
--- a/tests/qemuxml2argvdata/memfd-memory-default-hugepage.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/memfd-memory-default-hugepage.x86_64-latest.args
@@ -15,7 +15,7 @@ file=/tmp/lib/domain--1-instance-00000092/master-key.aes \
 -machine pc-i440fx-wily,accel=kvm,usb=off,dump-guest-core=off \
 -m 14336 \
 -mem-prealloc \
--realtime mlock=off \
+-overcommit mem-lock=off \
 -smp 8,sockets=1,cores=8,threads=1 \
 -object memory-backend-memfd,id=ram-node0,hugetlb=yes,hugetlbsize=2097152,\
 share=yes,size=15032385536,host-nodes=3,policy=preferred \
diff --git a/tests/qemuxml2argvdata/memfd-memory-numa.x86_64-latest.args b/tests/qemuxml2argvdata/memfd-memory-numa.x86_64-latest.args
index c582878a12..998c9f98bd 100644
--- a/tests/qemuxml2argvdata/memfd-memory-numa.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/memfd-memory-numa.x86_64-latest.args
@@ -15,7 +15,7 @@ file=/tmp/lib/domain--1-instance-00000092/master-key.aes \
 -machine pc-i440fx-wily,accel=kvm,usb=off,dump-guest-core=off \
 -m 14336 \
 -mem-prealloc \
--realtime mlock=off \
+-overcommit mem-lock=off \
 -smp 8,sockets=1,cores=8,threads=1 \
 -object memory-backend-memfd,id=ram-node0,hugetlb=yes,hugetlbsize=2097152,\
 share=yes,size=15032385536,host-nodes=3,policy=preferred \
diff --git a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-access.x86_64-latest.args b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-access.x86_64-latest.args
index 83905457ad..e694496b84 100644
--- a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-access.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-access.x86_64-latest.args
@@ -14,7 +14,7 @@ QEMU_AUDIO_DRV=none \
 file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
 -machine pc,accel=tcg,usb=off,dump-guest-core=off,nvdimm=on \
 -m size=219136k,slots=16,maxmem=1099511627776k \
--realtime mlock=off \
+-overcommit mem-lock=off \
 -smp 2,sockets=2,cores=1,threads=1 \
 -numa node,nodeid=0,cpus=0-1,mem=214 \
 -object memory-backend-file,id=memnvdimm0,prealloc=yes,mem-path=/tmp/nvdimm,\
diff --git a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-align.x86_64-latest.args b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-align.x86_64-latest.args
index 30838e13a9..3eef32b324 100644
--- a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-align.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-align.x86_64-latest.args
@@ -14,7 +14,7 @@ QEMU_AUDIO_DRV=none \
 file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
 -machine pc,accel=tcg,usb=off,dump-guest-core=off,nvdimm=on \
 -m size=219136k,slots=16,maxmem=1099511627776k \
--realtime mlock=off \
+-overcommit mem-lock=off \
 -smp 2,sockets=2,cores=1,threads=1 \
 -numa node,nodeid=0,cpus=0-1,mem=214 \
 -object memory-backend-file,id=memnvdimm0,prealloc=yes,mem-path=/tmp/nvdimm,\
diff --git a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-label.x86_64-latest.args b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-label.x86_64-latest.args
index e6738a5522..6217a27ad1 100644
--- a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-label.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-label.x86_64-latest.args
@@ -14,7 +14,7 @@ QEMU_AUDIO_DRV=none \
 file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
 -machine pc,accel=tcg,usb=off,dump-guest-core=off,nvdimm=on \
 -m size=219136k,slots=16,maxmem=1099511627776k \
--realtime mlock=off \
+-overcommit mem-lock=off \
 -smp 2,sockets=2,cores=1,threads=1 \
 -numa node,nodeid=0,cpus=0-1,mem=214 \
 -object memory-backend-file,id=memnvdimm0,prealloc=yes,mem-path=/tmp/nvdimm,\
diff --git a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-pmem.x86_64-latest.args b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-pmem.x86_64-latest.args
index 6ea83ad835..b2987205f3 100644
--- a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-pmem.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-pmem.x86_64-latest.args
@@ -14,7 +14,7 @@ QEMU_AUDIO_DRV=none \
 file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
 -machine pc,accel=tcg,usb=off,dump-guest-core=off,nvdimm=on \
 -m size=219136k,slots=16,maxmem=1099511627776k \
--realtime mlock=off \
+-overcommit mem-lock=off \
 -smp 2,sockets=2,cores=1,threads=1 \
 -numa node,nodeid=0,cpus=0-1,mem=214 \
 -object memory-backend-file,id=memnvdimm0,prealloc=yes,mem-path=/tmp/nvdimm,\
diff --git a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-readonly.x86_64-latest.args b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-readonly.x86_64-latest.args
index 974ec4c45c..498c13c50f 100644
--- a/tests/qemuxml2argvdata/memory-hotplug-nvdimm-readonly.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/memory-hotplug-nvdimm-readonly.x86_64-latest.args
@@ -14,7 +14,7 @@ QEMU_AUDIO_DRV=none \
 file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
 -machine pc,accel=tcg,usb=off,dump-guest-core=off,nvdimm=on \
 -m size=219136k,slots=16,maxmem=1099511627776k \
--realtime mlock=off \
+-overcommit mem-lock=off \
 -smp 2,sockets=2,cores=1,threads=1 \
 -numa node,nodeid=0,cpus=0-1,mem=214 \
 -object memory-backend-file,id=memnvdimm0,prealloc=yes,mem-path=/tmp/nvdimm,\
diff --git a/tests/qemuxml2argvdata/memory-hotplug-nvdimm.x86_64-latest.args b/tests/qemuxml2argvdata/memory-hotplug-nvdimm.x86_64-latest.args
index a1507f3851..87c928a540 100644
--- a/tests/qemuxml2argvdata/memory-hotplug-nvdimm.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/memory-hotplug-nvdimm.x86_64-latest.args
@@ -14,7 +14,7 @@ QEMU_AUDIO_DRV=none \
 file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
 -machine pc,accel=tcg,usb=off,dump-guest-core=off,nvdimm=on \
 -m size=1048576k,slots=16,maxmem=1099511627776k \
--realtime mlock=off \
+-overcommit mem-lock=off \
 -smp 2,sockets=2,cores=1,threads=1 \
 -numa node,nodeid=0,cpus=0-1,mem=1024 \
 -object memory-backend-file,id=memnvdimm0,prealloc=yes,mem-path=/tmp/nvdimm,\
diff --git a/tests/qemuxml2argvdata/mlock-off.args b/tests/qemuxml2argvdata/mlock-off.args
index aa41fb6eb8..c1ad530a3e 100644
--- a/tests/qemuxml2argvdata/mlock-off.args
+++ b/tests/qemuxml2argvdata/mlock-off.args
@@ -12,7 +12,7 @@ QEMU_AUDIO_DRV=none \
 -S \
 -machine pc,accel=tcg,usb=off,dump-guest-core=off \
 -m 214 \
--realtime mlock=off \
+-overcommit mem-lock=off \
 -smp 1,sockets=1,cores=1,threads=1 \
 -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
 -display none \
diff --git a/tests/qemuxml2argvdata/mlock-on.args b/tests/qemuxml2argvdata/mlock-on.args
index b9ad161ec2..0c1343ea05 100644
--- a/tests/qemuxml2argvdata/mlock-on.args
+++ b/tests/qemuxml2argvdata/mlock-on.args
@@ -12,7 +12,7 @@ QEMU_AUDIO_DRV=none \
 -S \
 -machine pc,accel=tcg,usb=off,dump-guest-core=off \
 -m 214 \
--realtime mlock=on \
+-overcommit mem-lock=on \
 -smp 1,sockets=1,cores=1,threads=1 \
 -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
 -display none \
diff --git a/tests/qemuxml2argvdata/net-vhostuser.x86_64-latest.args b/tests/qemuxml2argvdata/net-vhostuser.x86_64-latest.args
index 66c0fcd5bd..042d569385 100644
--- a/tests/qemuxml2argvdata/net-vhostuser.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/net-vhostuser.x86_64-latest.args
@@ -14,7 +14,7 @@ QEMU_AUDIO_DRV=none \
 file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
 -machine pc,accel=tcg,usb=off,dump-guest-core=off \
 -m 214 \
--realtime mlock=off \
+-overcommit mem-lock=off \
 -smp 1,sockets=1,cores=1,threads=1 \
 -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
 -display none \
diff --git a/tests/qemuxml2argvdata/os-firmware-bios.x86_64-latest.args b/tests/qemuxml2argvdata/os-firmware-bios.x86_64-latest.args
index 2dffbc73da..7d6108ec24 100644
--- a/tests/qemuxml2argvdata/os-firmware-bios.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/os-firmware-bios.x86_64-latest.args
@@ -15,7 +15,7 @@ file=/tmp/lib/domain--1-fedora/master-key.aes \
 -machine pc-q35-4.0,accel=kvm,usb=off,dump-guest-core=off \
 -bios /usr/share/seabios/bios-256k.bin \
 -m 8 \
--realtime mlock=off \
+-overcommit mem-lock=off \
 -smp 1,sockets=1,cores=1,threads=1 \
 -uuid 63840878-0deb-4095-97e6-fc444d9bc9fa \
 -display none \
diff --git a/tests/qemuxml2argvdata/os-firmware-efi-secboot.x86_64-latest.args b/tests/qemuxml2argvdata/os-firmware-efi-secboot.x86_64-latest.args
index 1aa4484148..d8f356ea07 100644
--- a/tests/qemuxml2argvdata/os-firmware-efi-secboot.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/os-firmware-efi-secboot.x86_64-latest.args
@@ -19,7 +19,7 @@ readonly=on \
 -drive file=/var/lib/libvirt/qemu/nvram/fedora_VARS.fd,if=pflash,format=raw,\
 unit=1 \
 -m 8 \
--realtime mlock=off \
+-overcommit mem-lock=off \
 -smp 1,sockets=1,cores=1,threads=1 \
 -uuid 63840878-0deb-4095-97e6-fc444d9bc9fa \
 -display none \
diff --git a/tests/qemuxml2argvdata/os-firmware-efi.x86_64-latest.args b/tests/qemuxml2argvdata/os-firmware-efi.x86_64-latest.args
index 7dc53166e7..e4dda734b0 100644
--- a/tests/qemuxml2argvdata/os-firmware-efi.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/os-firmware-efi.x86_64-latest.args
@@ -18,7 +18,7 @@ readonly=on \
 -drive file=/var/lib/libvirt/qemu/nvram/fedora_VARS.fd,if=pflash,format=raw,\
 unit=1 \
 -m 8 \
--realtime mlock=off \
+-overcommit mem-lock=off \
 -smp 1,sockets=1,cores=1,threads=1 \
 -uuid 63840878-0deb-4095-97e6-fc444d9bc9fa \
 -display none \
diff --git a/tests/qemuxml2argvdata/parallel-unix-chardev.x86_64-latest.args b/tests/qemuxml2argvdata/parallel-unix-chardev.x86_64-latest.args
index 79c2b5e52e..7519ecc742 100644
--- a/tests/qemuxml2argvdata/parallel-unix-chardev.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/parallel-unix-chardev.x86_64-latest.args
@@ -14,7 +14,7 @@ QEMU_AUDIO_DRV=none \
 file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
 -machine pc,accel=kvm,usb=off,dump-guest-core=off \
 -m 214 \
--realtime mlock=off \
+-overcommit mem-lock=off \
 -smp 1,sockets=1,cores=1,threads=1 \
 -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
 -display none \
diff --git a/tests/qemuxml2argvdata/ppc64-pseries-graphics.ppc64-latest.args b/tests/qemuxml2argvdata/ppc64-pseries-graphics.ppc64-latest.args
index 3a925744b9..2beec7109b 100644
--- a/tests/qemuxml2argvdata/ppc64-pseries-graphics.ppc64-latest.args
+++ b/tests/qemuxml2argvdata/ppc64-pseries-graphics.ppc64-latest.args
@@ -14,7 +14,7 @@ QEMU_AUDIO_DRV=none \
 file=/tmp/lib/domain--1-guest/master-key.aes \
 -machine pseries,accel=tcg,usb=off,dump-guest-core=off \
 -m 4096 \
--realtime mlock=off \
+-overcommit mem-lock=off \
 -smp 4,sockets=4,cores=1,threads=1 \
 -uuid b35969f7-e7cf-4d90-a9a0-4dd9000f9824 \
 -no-user-config \
diff --git a/tests/qemuxml2argvdata/ppc64-pseries-headless.ppc64-latest.args b/tests/qemuxml2argvdata/ppc64-pseries-headless.ppc64-latest.args
index 0d23710cf5..c84443c97f 100644
--- a/tests/qemuxml2argvdata/ppc64-pseries-headless.ppc64-latest.args
+++ b/tests/qemuxml2argvdata/ppc64-pseries-headless.ppc64-latest.args
@@ -14,7 +14,7 @@ QEMU_AUDIO_DRV=none \
 file=/tmp/lib/domain--1-guest/master-key.aes \
 -machine pseries,accel=tcg,usb=off,dump-guest-core=off \
 -m 1024 \
--realtime mlock=off \
+-overcommit mem-lock=off \
 -smp 1,sockets=1,cores=1,threads=1 \
 -uuid 1ccfd97d-5eb4-478a-bbe6-88d254c16db7 \
 -display none \
diff --git a/tests/qemuxml2argvdata/riscv64-virt-headless.riscv64-latest.args b/tests/qemuxml2argvdata/riscv64-virt-headless.riscv64-latest.args
index 53e6e3bf11..42b1ffc568 100644
--- a/tests/qemuxml2argvdata/riscv64-virt-headless.riscv64-latest.args
+++ b/tests/qemuxml2argvdata/riscv64-virt-headless.riscv64-latest.args
@@ -14,7 +14,7 @@ QEMU_AUDIO_DRV=none \
 file=/tmp/lib/domain--1-guest/master-key.aes \
 -machine virt,accel=tcg,usb=off,dump-guest-core=off \
 -m 1024 \
--realtime mlock=off \
+-overcommit mem-lock=off \
 -smp 1,sockets=1,cores=1,threads=1 \
 -uuid 1ccfd97d-5eb4-478a-bbe6-88d254c16db7 \
 -display none \
diff --git a/tests/qemuxml2argvdata/serial-unix-chardev.x86_64-latest.args b/tests/qemuxml2argvdata/serial-unix-chardev.x86_64-latest.args
index 881a0d417a..4c9b1fefea 100644
--- a/tests/qemuxml2argvdata/serial-unix-chardev.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/serial-unix-chardev.x86_64-latest.args
@@ -14,7 +14,7 @@ QEMU_AUDIO_DRV=none \
 file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
 -machine pc,accel=tcg,usb=off,dump-guest-core=off \
 -m 214 \
--realtime mlock=off \
+-overcommit mem-lock=off \
 -smp 1,sockets=1,cores=1,threads=1 \
 -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
 -display none \
diff --git a/tests/qemuxml2argvdata/smartcard-passthrough-unix.x86_64-latest.args b/tests/qemuxml2argvdata/smartcard-passthrough-unix.x86_64-latest.args
index 6cc68fb481..689333a22e 100644
--- a/tests/qemuxml2argvdata/smartcard-passthrough-unix.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/smartcard-passthrough-unix.x86_64-latest.args
@@ -14,7 +14,7 @@ QEMU_AUDIO_DRV=none \
 file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
 -machine pc,accel=kvm,usb=off,dump-guest-core=off \
 -m 214 \
--realtime mlock=off \
+-overcommit mem-lock=off \
 -smp 1,sockets=1,cores=1,threads=1 \
 -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
 -display none \
diff --git a/tests/qemuxml2argvdata/tpm-emulator-tpm2.x86_64-latest.args b/tests/qemuxml2argvdata/tpm-emulator-tpm2.x86_64-latest.args
index 356ede2367..3c8dc8e483 100644
--- a/tests/qemuxml2argvdata/tpm-emulator-tpm2.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/tpm-emulator-tpm2.x86_64-latest.args
@@ -14,7 +14,7 @@ QEMU_AUDIO_DRV=none \
 file=/tmp/lib/domain--1-TPM-VM/master-key.aes \
 -machine pc-i440fx-2.12,accel=tcg,usb=off,dump-guest-core=off \
 -m 2048 \
--realtime mlock=off \
+-overcommit mem-lock=off \
 -smp 1,sockets=1,cores=1,threads=1 \
 -uuid 11d7cd22-da89-3094-6212-079a48a309a1 \
 -display none \
diff --git a/tests/qemuxml2argvdata/tpm-emulator.x86_64-latest.args b/tests/qemuxml2argvdata/tpm-emulator.x86_64-latest.args
index 356ede2367..3c8dc8e483 100644
--- a/tests/qemuxml2argvdata/tpm-emulator.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/tpm-emulator.x86_64-latest.args
@@ -14,7 +14,7 @@ QEMU_AUDIO_DRV=none \
 file=/tmp/lib/domain--1-TPM-VM/master-key.aes \
 -machine pc-i440fx-2.12,accel=tcg,usb=off,dump-guest-core=off \
 -m 2048 \
--realtime mlock=off \
+-overcommit mem-lock=off \
 -smp 1,sockets=1,cores=1,threads=1 \
 -uuid 11d7cd22-da89-3094-6212-079a48a309a1 \
 -display none \
diff --git a/tests/qemuxml2argvdata/tseg-explicit-size.x86_64-latest.args b/tests/qemuxml2argvdata/tseg-explicit-size.x86_64-latest.args
index 4b69bdddbb..2fece310e7 100644
--- a/tests/qemuxml2argvdata/tseg-explicit-size.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/tseg-explicit-size.x86_64-latest.args
@@ -15,7 +15,7 @@ file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
 -machine pc-q35-2.10,accel=tcg,usb=off,smm=on,dump-guest-core=off \
 -global mch.extended-tseg-mbytes=48 \
 -m 214 \
--realtime mlock=off \
+-overcommit mem-lock=off \
 -smp 1,sockets=1,cores=1,threads=1 \
 -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
 -display none \
diff --git a/tests/qemuxml2argvdata/usb-redir-unix.x86_64-latest.args b/tests/qemuxml2argvdata/usb-redir-unix.x86_64-latest.args
index fe57b0142c..a08cbc0a28 100644
--- a/tests/qemuxml2argvdata/usb-redir-unix.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/usb-redir-unix.x86_64-latest.args
@@ -14,7 +14,7 @@ QEMU_AUDIO_DRV=none \
 file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
 -machine pc,accel=kvm,usb=off,dump-guest-core=off \
 -m 214 \
--realtime mlock=off \
+-overcommit mem-lock=off \
 -smp 1,sockets=1,cores=1,threads=1 \
 -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
 -display none \
diff --git a/tests/qemuxml2argvdata/vhost-vsock-auto.x86_64-latest.args b/tests/qemuxml2argvdata/vhost-vsock-auto.x86_64-latest.args
index 4b1c6aac7e..b5d3ff2204 100644
--- a/tests/qemuxml2argvdata/vhost-vsock-auto.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/vhost-vsock-auto.x86_64-latest.args
@@ -14,7 +14,7 @@ QEMU_AUDIO_DRV=none \
 file=/tmp/lib/domain--1-test/master-key.aes \
 -machine pc-i440fx-2.9,accel=tcg,usb=off,dump-guest-core=off \
 -m 1024 \
--realtime mlock=off \
+-overcommit mem-lock=off \
 -smp 1,sockets=1,cores=1,threads=1 \
 -uuid bba65c0e-c049-934f-b6aa-4e2c0582acdf \
 -display none \
diff --git a/tests/qemuxml2argvdata/vhost-vsock.x86_64-latest.args b/tests/qemuxml2argvdata/vhost-vsock.x86_64-latest.args
index 6701aaab12..76df9d2d4d 100644
--- a/tests/qemuxml2argvdata/vhost-vsock.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/vhost-vsock.x86_64-latest.args
@@ -14,7 +14,7 @@ QEMU_AUDIO_DRV=none \
 file=/tmp/lib/domain--1-test/master-key.aes \
 -machine pc-0.13,accel=tcg,usb=off,dump-guest-core=off \
 -m 1024 \
--realtime mlock=off \
+-overcommit mem-lock=off \
 -smp 1,sockets=1,cores=1,threads=1 \
 -uuid bba65c0e-c049-934f-b6aa-4e2c0582acdf \
 -display none \
diff --git a/tests/qemuxml2argvdata/video-qxl-device-vram64.x86_64-latest.args b/tests/qemuxml2argvdata/video-qxl-device-vram64.x86_64-latest.args
index a64cfe0102..296e7c1347 100644
--- a/tests/qemuxml2argvdata/video-qxl-device-vram64.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/video-qxl-device-vram64.x86_64-latest.args
@@ -14,7 +14,7 @@ QEMU_AUDIO_DRV=none \
 file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
 -machine pc,accel=tcg,usb=off,dump-guest-core=off \
 -m 1024 \
--realtime mlock=off \
+-overcommit mem-lock=off \
 -smp 1,sockets=1,cores=1,threads=1 \
 -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
 -display none \
diff --git a/tests/qemuxml2argvdata/video-qxl-sec-device-vram64.x86_64-latest.args b/tests/qemuxml2argvdata/video-qxl-sec-device-vram64.x86_64-latest.args
index d8026a0836..d814b11674 100644
--- a/tests/qemuxml2argvdata/video-qxl-sec-device-vram64.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/video-qxl-sec-device-vram64.x86_64-latest.args
@@ -14,7 +14,7 @@ QEMU_AUDIO_DRV=none \
 file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
 -machine pc,accel=tcg,usb=off,dump-guest-core=off \
 -m 1024 \
--realtime mlock=off \
+-overcommit mem-lock=off \
 -smp 1,sockets=1,cores=1,threads=1 \
 -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
 -display none \
diff --git a/tests/qemuxml2argvdata/virtio-non-transitional.x86_64-3.1.0.args b/tests/qemuxml2argvdata/virtio-non-transitional.x86_64-3.1.0.args
index 588f2e6d2a..82a977b731 100644
--- a/tests/qemuxml2argvdata/virtio-non-transitional.x86_64-3.1.0.args
+++ b/tests/qemuxml2argvdata/virtio-non-transitional.x86_64-3.1.0.args
@@ -14,7 +14,7 @@ QEMU_AUDIO_DRV=none \
 file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
 -machine pc-q35-3.1,accel=tcg,usb=off,dump-guest-core=off \
 -m 214 \
--realtime mlock=off \
+-overcommit mem-lock=off \
 -smp 1,sockets=1,cores=1,threads=1 \
 -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
 -display none \
diff --git a/tests/qemuxml2argvdata/virtio-non-transitional.x86_64-latest.args b/tests/qemuxml2argvdata/virtio-non-transitional.x86_64-latest.args
index 03da24b0e4..3688709092 100644
--- a/tests/qemuxml2argvdata/virtio-non-transitional.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/virtio-non-transitional.x86_64-latest.args
@@ -14,7 +14,7 @@ QEMU_AUDIO_DRV=none \
 file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
 -machine q35,accel=tcg,usb=off,dump-guest-core=off \
 -m 214 \
--realtime mlock=off \
+-overcommit mem-lock=off \
 -smp 1,sockets=1,cores=1,threads=1 \
 -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
 -display none \
diff --git a/tests/qemuxml2argvdata/virtio-rng-egd-unix.x86_64-latest.args b/tests/qemuxml2argvdata/virtio-rng-egd-unix.x86_64-latest.args
index 42719f870a..edcbddc333 100644
--- a/tests/qemuxml2argvdata/virtio-rng-egd-unix.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/virtio-rng-egd-unix.x86_64-latest.args
@@ -14,7 +14,7 @@ QEMU_AUDIO_DRV=none \
 file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
 -machine pc,accel=kvm,usb=off,dump-guest-core=off \
 -m 214 \
--realtime mlock=off \
+-overcommit mem-lock=off \
 -smp 1,sockets=1,cores=1,threads=1 \
 -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
 -display none \
diff --git a/tests/qemuxml2argvdata/virtio-transitional.x86_64-3.1.0.args b/tests/qemuxml2argvdata/virtio-transitional.x86_64-3.1.0.args
index 99d00c027c..ed810d5890 100644
--- a/tests/qemuxml2argvdata/virtio-transitional.x86_64-3.1.0.args
+++ b/tests/qemuxml2argvdata/virtio-transitional.x86_64-3.1.0.args
@@ -14,7 +14,7 @@ QEMU_AUDIO_DRV=none \
 file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
 -machine pc-q35-3.1,accel=tcg,usb=off,dump-guest-core=off \
 -m 214 \
--realtime mlock=off \
+-overcommit mem-lock=off \
 -smp 1,sockets=1,cores=1,threads=1 \
 -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
 -display none \
diff --git a/tests/qemuxml2argvdata/virtio-transitional.x86_64-latest.args b/tests/qemuxml2argvdata/virtio-transitional.x86_64-latest.args
index 0060b77ee4..9d4ec5f922 100644
--- a/tests/qemuxml2argvdata/virtio-transitional.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/virtio-transitional.x86_64-latest.args
@@ -14,7 +14,7 @@ QEMU_AUDIO_DRV=none \
 file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
 -machine q35,accel=tcg,usb=off,dump-guest-core=off \
 -m 214 \
--realtime mlock=off \
+-overcommit mem-lock=off \
 -smp 1,sockets=1,cores=1,threads=1 \
 -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
 -display none \
diff --git a/tests/qemuxml2argvdata/x86_64-pc-graphics.x86_64-latest.args b/tests/qemuxml2argvdata/x86_64-pc-graphics.x86_64-latest.args
index 7e3f5e2df3..4875a8799e 100644
--- a/tests/qemuxml2argvdata/x86_64-pc-graphics.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/x86_64-pc-graphics.x86_64-latest.args
@@ -14,7 +14,7 @@ QEMU_AUDIO_DRV=none \
 file=/tmp/lib/domain--1-guest/master-key.aes \
 -machine pc,accel=tcg,usb=off,dump-guest-core=off \
 -m 4096 \
--realtime mlock=off \
+-overcommit mem-lock=off \
 -smp 4,sockets=4,cores=1,threads=1 \
 -uuid 2c0abd3d-8f18-42c0-a132-9708213aaac9 \
 -no-user-config \
diff --git a/tests/qemuxml2argvdata/x86_64-pc-headless.x86_64-latest.args b/tests/qemuxml2argvdata/x86_64-pc-headless.x86_64-latest.args
index 08a990dbd5..1af229afa2 100644
--- a/tests/qemuxml2argvdata/x86_64-pc-headless.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/x86_64-pc-headless.x86_64-latest.args
@@ -14,7 +14,7 @@ QEMU_AUDIO_DRV=none \
 file=/tmp/lib/domain--1-guest/master-key.aes \
 -machine pc,accel=tcg,usb=off,dump-guest-core=off \
 -m 1024 \
--realtime mlock=off \
+-overcommit mem-lock=off \
 -smp 1,sockets=1,cores=1,threads=1 \
 -uuid 1ccfd97d-5eb4-478a-bbe6-88d254c16db7 \
 -display none \
diff --git a/tests/qemuxml2argvdata/x86_64-q35-graphics.x86_64-latest.args b/tests/qemuxml2argvdata/x86_64-q35-graphics.x86_64-latest.args
index ffe17c63aa..8e1f1cc865 100644
--- a/tests/qemuxml2argvdata/x86_64-q35-graphics.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/x86_64-q35-graphics.x86_64-latest.args
@@ -14,7 +14,7 @@ QEMU_AUDIO_DRV=none \
 file=/tmp/lib/domain--1-guest/master-key.aes \
 -machine q35,accel=tcg,usb=off,dump-guest-core=off \
 -m 4096 \
--realtime mlock=off \
+-overcommit mem-lock=off \
 -smp 4,sockets=4,cores=1,threads=1 \
 -uuid 61288c03-0b0d-4f1e-9496-0f0256f2e013 \
 -no-user-config \
diff --git a/tests/qemuxml2argvdata/x86_64-q35-headless.x86_64-latest.args b/tests/qemuxml2argvdata/x86_64-q35-headless.x86_64-latest.args
index 459e3229a6..68b984f2ca 100644
--- a/tests/qemuxml2argvdata/x86_64-q35-headless.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/x86_64-q35-headless.x86_64-latest.args
@@ -14,7 +14,7 @@ QEMU_AUDIO_DRV=none \
 file=/tmp/lib/domain--1-guest/master-key.aes \
 -machine q35,accel=tcg,usb=off,dump-guest-core=off \
 -m 1024 \
--realtime mlock=off \
+-overcommit mem-lock=off \
 -smp 1,sockets=1,cores=1,threads=1 \
 -uuid 1ccfd97d-5eb4-478a-bbe6-88d254c16db7 \
 -display none \
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index 8b517d83aa..5dbb0fc974 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -2399,8 +2399,8 @@ mymain(void)
             QEMU_CAPS_DEVICE_PCIE_ROOT_PORT,
             QEMU_CAPS_VIRTIO_PCI_DISABLE_LEGACY);
 
-    DO_TEST("mlock-on", NONE);
-    DO_TEST("mlock-off", NONE);
+    DO_TEST("mlock-on", QEMU_CAPS_OVERCOMMIT);
+    DO_TEST("mlock-off", QEMU_CAPS_OVERCOMMIT);
     DO_TEST("mlock-unsupported", NONE);
 
     DO_TEST_PARSE_ERROR("pci-bridge-negative-index-invalid", NONE);
-- 
2.21.0




More information about the libvir-list mailing list