qemuxml2argv: Test default aarch64 cofig without PCIe support

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>
This commit is contained in:
Peter Krempa 2023-03-24 13:08:13 +01:00
parent 8d94853040
commit b7f0487184
2 changed files with 19 additions and 13 deletions

View File

@ -9,11 +9,12 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-aarch64test/.config \
/usr/bin/qemu-system-aarch64 \ /usr/bin/qemu-system-aarch64 \
-name guest=aarch64test,debug-threads=on \ -name guest=aarch64test,debug-threads=on \
-S \ -S \
-object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain--1-aarch64test/master-key.aes \ -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 \ -machine virt,usb=off,gic-version=2,dump-guest-core=off,memory-backend=mach-virt.ram \
-accel tcg \ -accel tcg \
-cpu cortex-a53 \ -cpu cortex-a53 \
-m 1024 \ -m 1024 \
-object '{"qom-type":"memory-backend-ram","id":"mach-virt.ram","size":1073741824}' \
-overcommit mem-lock=off \ -overcommit mem-lock=off \
-smp 1,sockets=1,cores=1,threads=1 \ -smp 1,sockets=1,cores=1,threads=1 \
-uuid 496d7ea8-9739-544b-4ebd-ef08be936e8b \ -uuid 496d7ea8-9739-544b-4ebd-ef08be936e8b \
@ -30,18 +31,19 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-aarch64test/.config \
-initrd /aarch64.initrd \ -initrd /aarch64.initrd \
-append 'earlyprintk console=ttyAMA0,115200n8 rw root=/dev/vda rootwait' \ -append 'earlyprintk console=ttyAMA0,115200n8 rw root=/dev/vda rootwait' \
-dtb /aarch64.dtb \ -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 '{"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"}' \ -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 \ -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 \ -chardev pty,id=charserial0 \
-serial chardev:charserial0 \ -serial chardev:charserial0 \
-chardev pty,id=charconsole1 \ -chardev pty,id=charconsole1 \
-device virtconsole,chardev=charconsole1,id=console1 \ -device '{"driver":"virtconsole","chardev":"charconsole1","id":"console1"}' \
-audiodev '{"id":"audio1","driver":"none"}' \ -audiodev '{"id":"audio1","driver":"none"}' \
-device virtio-balloon-device,id=balloon0 \ -device '{"driver":"virtio-balloon-device","id":"balloon0"}' \
-object rng-random,id=objrng0,filename=/dev/random \ -object '{"qom-type":"rng-random","id":"objrng0","filename":"/dev/random"}' \
-device virtio-rng-device,rng=objrng0,id=rng0 \ -device '{"driver":"virtio-rng-device","rng":"objrng0","id":"rng0"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on -msg timestamp=on

View File

@ -2348,10 +2348,14 @@ mymain(void)
DO_TEST_CAPS_ARCH_LATEST("arm-vexpressa9-virtio", "aarch64"); DO_TEST_CAPS_ARCH_LATEST("arm-vexpressa9-virtio", "aarch64");
DO_TEST_CAPS_ARCH_LATEST("arm-virt-virtio", "aarch64"); DO_TEST_CAPS_ARCH_LATEST("arm-virt-virtio", "aarch64");
DO_TEST("aarch64-virt-virtio", /* test default config if pcie bus is not available */
QEMU_CAPS_DEVICE_VIRTIO_MMIO, DO_TEST_FULL("aarch64-virt-virtio", "-MMIO.aarch64.latest",
QEMU_CAPS_DEVICE_PL011, ARG_CAPS_ARCH, "aarch64",
QEMU_CAPS_DEVICE_VIRTIO_RNG, QEMU_CAPS_OBJECT_RNG_RANDOM); 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_VER("aarch64-virt-virtio", "aarch64", "4.2.0");
DO_TEST_CAPS_ARCH_LATEST("aarch64-virt-virtio", "aarch64"); DO_TEST_CAPS_ARCH_LATEST("aarch64-virt-virtio", "aarch64");