]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemuxml2argv: Test default aarch64 cofig without PCIe support
authorPeter Krempa <pkrempa@redhat.com>
Fri, 24 Mar 2023 12:08:13 +0000 (13:08 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 11 Apr 2023 08:08:32 +0000 (10:08 +0200)
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@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
tests/qemuxml2argvdata/aarch64-virt-virtio-MMIO.aarch64.latest.args [new file with mode: 0644]
tests/qemuxml2argvdata/aarch64-virt-virtio.args [deleted file]
tests/qemuxml2argvtest.c

diff --git a/tests/qemuxml2argvdata/aarch64-virt-virtio-MMIO.aarch64.latest.args b/tests/qemuxml2argvdata/aarch64-virt-virtio-MMIO.aarch64.latest.args
new file mode 100644 (file)
index 0000000..cfc3195
--- /dev/null
@@ -0,0 +1,49 @@
+LC_ALL=C \
+PATH=/bin \
+HOME=/var/lib/libvirt/qemu/domain--1-aarch64test \
+USER=test \
+LOGNAME=test \
+XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-aarch64test/.local/share \
+XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-aarch64test/.cache \
+XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-aarch64test/.config \
+/usr/bin/qemu-system-aarch64 \
+-name guest=aarch64test,debug-threads=on \
+-S \
+-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 \
+-display none \
+-no-user-config \
+-nodefaults \
+-chardev socket,id=charmonitor,fd=1729,server=on,wait=off \
+-mon chardev=charmonitor,id=monitor,mode=control \
+-rtc base=utc \
+-no-shutdown \
+-no-acpi \
+-boot strict=on \
+-kernel /aarch64.kernel \
+-initrd /aarch64.initrd \
+-append 'earlyprintk console=ttyAMA0,115200n8 rw root=/dev/vda rootwait' \
+-dtb /aarch64.dtb \
+-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 '{"driver":"virtio-blk-device","drive":"libvirt-1-format","id":"virtio-disk0","bootindex":1}' \
+-netdev user,id=hostnet0 \
+-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 '{"driver":"virtconsole","chardev":"charconsole1","id":"console1"}' \
+-audiodev '{"id":"audio1","driver":"none"}' \
+-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/qemuxml2argvdata/aarch64-virt-virtio.args b/tests/qemuxml2argvdata/aarch64-virt-virtio.args
deleted file mode 100644 (file)
index 65cf1f4..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-LC_ALL=C \
-PATH=/bin \
-HOME=/var/lib/libvirt/qemu/domain--1-aarch64test \
-USER=test \
-LOGNAME=test \
-XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-aarch64test/.local/share \
-XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-aarch64test/.cache \
-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 \
--accel tcg \
--cpu cortex-a53 \
--m 1024 \
--overcommit mem-lock=off \
--smp 1,sockets=1,cores=1,threads=1 \
--uuid 496d7ea8-9739-544b-4ebd-ef08be936e8b \
--display none \
--no-user-config \
--nodefaults \
--chardev socket,id=charmonitor,fd=1729,server=on,wait=off \
--mon chardev=charmonitor,id=monitor,mode=control \
--rtc base=utc \
--no-shutdown \
--no-acpi \
--boot strict=on \
--kernel /aarch64.kernel \
--initrd /aarch64.initrd \
--append 'earlyprintk console=ttyAMA0,115200n8 rw root=/dev/vda rootwait' \
--dtb /aarch64.dtb \
--device 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 \
--netdev user,id=hostnet0 \
--device 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 \
--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 \
--msg timestamp=on
index 044566426db86fa7853f376b88bb9d5136d24ad1..0bf5bf23b081e3a81d5ed5ba26eb867bd211659d 100644 (file)
@@ -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");