Use real caps and clear out flags for PCIe so that we have a real-ish
example of an aarch64 machine using mmio.
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
...ch64-virt-virtio-MMIO.aarch64.latest.args} | 20 ++++++++++---------
tests/qemuxml2argvtest.c | 12 +++++++----
2 files changed, 19 insertions(+), 13 deletions(-)
rename tests/qemuxml2argvdata/{aarch64-virt-virtio.args =>
aarch64-virt-virtio-MMIO.aarch64.latest.args} (58%)
diff --git a/tests/qemuxml2argvdata/aarch64-virt-virtio.args
b/tests/qemuxml2argvdata/aarch64-virt-virtio-MMIO.aarch64.latest.args
similarity index 58%
rename from tests/qemuxml2argvdata/aarch64-virt-virtio.args
rename to tests/qemuxml2argvdata/aarch64-virt-virtio-MMIO.aarch64.latest.args
index 65cf1f4c35..cfc3195d0f 100644
--- a/tests/qemuxml2argvdata/aarch64-virt-virtio.args
+++ b/tests/qemuxml2argvdata/aarch64-virt-virtio-MMIO.aarch64.latest.args
@@ -9,11 +9,12 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-aarch64test/.config \
/usr/bin/qemu-system-aarch64 \
-name guest=aarch64test,debug-threads=on \
-S \
--object
secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain--1-aarch64test/master-key.aes
\
--machine virt,usb=off,gic-version=2,dump-guest-core=off \
+-object
'{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-aarch64test/master-key.aes"}'
\
+-machine virt,usb=off,gic-version=2,dump-guest-core=off,memory-backend=mach-virt.ram \
-accel tcg \
-cpu cortex-a53 \
-m 1024 \
+-object
'{"qom-type":"memory-backend-ram","id":"mach-virt.ram","size":1073741824}'
\
-overcommit mem-lock=off \
-smp 1,sockets=1,cores=1,threads=1 \
-uuid 496d7ea8-9739-544b-4ebd-ef08be936e8b \
@@ -30,18 +31,19 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-aarch64test/.config \
-initrd /aarch64.initrd \
-append 'earlyprintk console=ttyAMA0,115200n8 rw root=/dev/vda rootwait' \
-dtb /aarch64.dtb \
--device virtio-serial-device,id=virtio-serial0 \
+-device
'{"driver":"virtio-serial-device","id":"virtio-serial0"}'
\
-blockdev
'{"driver":"file","filename":"/aarch64.raw","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}'
\
-blockdev
'{"node-name":"libvirt-1-format","read-only":false,"driver":"raw","file":"libvirt-1-storage"}'
\
--device virtio-blk-device,drive=libvirt-1-format,id=virtio-disk0,bootindex=1 \
+-device
'{"driver":"virtio-blk-device","drive":"libvirt-1-format","id":"virtio-disk0","bootindex":1}'
\
-netdev user,id=hostnet0 \
--device virtio-net-device,netdev=hostnet0,id=net0,mac=52:54:00:09:a4:37 \
+-device
'{"driver":"virtio-net-device","netdev":"hostnet0","id":"net0","mac":"52:54:00:09:a4:37"}'
\
-chardev pty,id=charserial0 \
-serial chardev:charserial0 \
-chardev pty,id=charconsole1 \
--device virtconsole,chardev=charconsole1,id=console1 \
+-device
'{"driver":"virtconsole","chardev":"charconsole1","id":"console1"}'
\
-audiodev
'{"id":"audio1","driver":"none"}' \
--device virtio-balloon-device,id=balloon0 \
--object rng-random,id=objrng0,filename=/dev/random \
--device virtio-rng-device,rng=objrng0,id=rng0 \
+-device
'{"driver":"virtio-balloon-device","id":"balloon0"}'
\
+-object
'{"qom-type":"rng-random","id":"objrng0","filename":"/dev/random"}'
\
+-device
'{"driver":"virtio-rng-device","rng":"objrng0","id":"rng0"}'
\
+-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index 044566426d..0bf5bf23b0 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -2348,10 +2348,14 @@ mymain(void)
DO_TEST_CAPS_ARCH_LATEST("arm-vexpressa9-virtio", "aarch64");
DO_TEST_CAPS_ARCH_LATEST("arm-virt-virtio", "aarch64");
- DO_TEST("aarch64-virt-virtio",
- QEMU_CAPS_DEVICE_VIRTIO_MMIO,
- QEMU_CAPS_DEVICE_PL011,
- QEMU_CAPS_DEVICE_VIRTIO_RNG, QEMU_CAPS_OBJECT_RNG_RANDOM);
+ /* test default config if pcie bus is not available */
+ DO_TEST_FULL("aarch64-virt-virtio", "-MMIO.aarch64.latest",
+ ARG_CAPS_ARCH, "aarch64",
+ ARG_CAPS_VER, "latest",
+ ARG_QEMU_CAPS_DEL,
+ QEMU_CAPS_OBJECT_GPEX, QEMU_CAPS_DEVICE_PCI_BRIDGE,
+ QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420,
+ QEMU_CAPS_LAST, ARG_END);
DO_TEST_CAPS_ARCH_VER("aarch64-virt-virtio", "aarch64",
"4.2.0");
DO_TEST_CAPS_ARCH_LATEST("aarch64-virt-virtio", "aarch64");
--
2.39.2