Signed-off-by: Andrea Bolognani <abologna@xxxxxxxxxx> --- Aggressively snipped to avoid ending up in the moderation queue. Director's Cut available at https://github.com/andreabolognani/libvirt/tree/riscv-pci .../caps_4.0.0.riscv32.replies | 17625 ++++++++++++++++ .../caps_4.0.0.riscv32.xml | 180 + .../caps_4.0.0.riscv64.replies | 17625 ++++++++++++++++ .../caps_4.0.0.riscv64.xml | 180 + tests/qemucapabilitiestest.c | 2 + .../caps_4.0.0.riscv32.xml | 25 + .../caps_4.0.0.riscv64.xml | 25 + tests/qemucaps2xmltest.c | 2 + .../riscv64-virt-headless.riscv64-latest.args | 3 +- 9 files changed, 35666 insertions(+), 1 deletion(-) create mode 100644 tests/qemucapabilitiesdata/caps_4.0.0.riscv32.replies create mode 100644 tests/qemucapabilitiesdata/caps_4.0.0.riscv32.xml create mode 100644 tests/qemucapabilitiesdata/caps_4.0.0.riscv64.replies create mode 100644 tests/qemucapabilitiesdata/caps_4.0.0.riscv64.xml create mode 100644 tests/qemucaps2xmloutdata/caps_4.0.0.riscv32.xml create mode 100644 tests/qemucaps2xmloutdata/caps_4.0.0.riscv64.xml diff --git a/tests/qemucapabilitiesdata/caps_4.0.0.riscv32.replies b/tests/qemucapabilitiesdata/caps_4.0.0.riscv32.replies new file mode 100644 index 0000000000..2d3f2fbcc6 --- /dev/null +++ b/tests/qemucapabilitiesdata/caps_4.0.0.riscv32.replies @@ -0,0 +1,17625 @@ +{ + "execute": "qmp_capabilities", + "id": "libvirt-1" +} + +{ + "return": { + }, + "id": "libvirt-1" +} + +{ + "execute": "query-version", + "id": "libvirt-2" +} + +{ + "return": { + "qemu": { + "micro": 50, + "minor": 1, + "major": 3 + }, + "package": "v3.1.0-1281-g006dce5f8f" + }, + "id": "libvirt-2" +} [...] diff --git a/tests/qemucapabilitiesdata/caps_4.0.0.riscv32.xml b/tests/qemucapabilitiesdata/caps_4.0.0.riscv32.xml new file mode 100644 index 0000000000..15e447742d --- /dev/null +++ b/tests/qemucapabilitiesdata/caps_4.0.0.riscv32.xml @@ -0,0 +1,180 @@ +<qemuCaps> [...] + <version>3001050</version> + <kvmVersion>0</kvmVersion> + <microcodeVersion>0</microcodeVersion> + <package>v3.1.0-1281-g006dce5f8f</package> + <arch>riscv32</arch> + <machine name='spike_v1.10' maxCpus='1' default='yes'/> + <machine name='virt' maxCpus='8'/> + <machine name='sifive_u' maxCpus='1'/> + <machine name='sifive_e' maxCpus='1'/> + <machine name='spike_v1.9.1' maxCpus='1'/> +</qemuCaps> diff --git a/tests/qemucapabilitiesdata/caps_4.0.0.riscv64.replies b/tests/qemucapabilitiesdata/caps_4.0.0.riscv64.replies new file mode 100644 index 0000000000..97d92290f6 --- /dev/null +++ b/tests/qemucapabilitiesdata/caps_4.0.0.riscv64.replies @@ -0,0 +1,17625 @@ +{ + "execute": "qmp_capabilities", + "id": "libvirt-1" +} + +{ + "return": { + }, + "id": "libvirt-1" +} + +{ + "execute": "query-version", + "id": "libvirt-2" +} + +{ + "return": { + "qemu": { + "micro": 50, + "minor": 1, + "major": 3 + }, + "package": "v3.1.0-1281-g006dce5f8f" + }, + "id": "libvirt-2" +} [...] diff --git a/tests/qemucapabilitiesdata/caps_4.0.0.riscv64.xml b/tests/qemucapabilitiesdata/caps_4.0.0.riscv64.xml new file mode 100644 index 0000000000..066c892eaa --- /dev/null +++ b/tests/qemucapabilitiesdata/caps_4.0.0.riscv64.xml @@ -0,0 +1,180 @@ +<qemuCaps> [...] + <version>3001050</version> + <kvmVersion>0</kvmVersion> + <microcodeVersion>0</microcodeVersion> + <package>v3.1.0-1281-g006dce5f8f</package> + <arch>riscv64</arch> + <machine name='spike_v1.10' maxCpus='1' default='yes'/> + <machine name='virt' maxCpus='8'/> + <machine name='sifive_u' maxCpus='1'/> + <machine name='sifive_e' maxCpus='1'/> + <machine name='spike_v1.9.1' maxCpus='1'/> +</qemuCaps> diff --git a/tests/qemucapabilitiestest.c b/tests/qemucapabilitiestest.c index 00137bb415..379a0986a6 100644 --- a/tests/qemucapabilitiestest.c +++ b/tests/qemucapabilitiestest.c @@ -197,7 +197,9 @@ mymain(void) DO_TEST("s390x", "caps_2.12.0"); DO_TEST("s390x", "caps_3.0.0"); DO_TEST("riscv32", "caps_3.0.0"); + DO_TEST("riscv32", "caps_4.0.0"); DO_TEST("riscv64", "caps_3.0.0"); + DO_TEST("riscv64", "caps_4.0.0"); /* * Run "tests/qemucapsprobe /path/to/qemu/binary >foo.replies" diff --git a/tests/qemucaps2xmloutdata/caps_4.0.0.riscv32.xml b/tests/qemucaps2xmloutdata/caps_4.0.0.riscv32.xml new file mode 100644 index 0000000000..63c374da7f --- /dev/null +++ b/tests/qemucaps2xmloutdata/caps_4.0.0.riscv32.xml @@ -0,0 +1,25 @@ +<capabilities> + + <host> + <cpu> + <arch>riscv32</arch> + </cpu> + <power_management/> + <iommu support='no'/> + </host> + + <guest> + <os_type>hvm</os_type> + <arch name='riscv32'> + <wordsize>32</wordsize> + <emulator>/usr/bin/qemu-system-riscv32</emulator> + <domain type='qemu'/> + </arch> + <features> + <cpuselection/> + <deviceboot/> + <disksnapshot default='on' toggle='no'/> + </features> + </guest> + +</capabilities> diff --git a/tests/qemucaps2xmloutdata/caps_4.0.0.riscv64.xml b/tests/qemucaps2xmloutdata/caps_4.0.0.riscv64.xml new file mode 100644 index 0000000000..09b7eb7f2f --- /dev/null +++ b/tests/qemucaps2xmloutdata/caps_4.0.0.riscv64.xml @@ -0,0 +1,25 @@ +<capabilities> + + <host> + <cpu> + <arch>riscv64</arch> + </cpu> + <power_management/> + <iommu support='no'/> + </host> + + <guest> + <os_type>hvm</os_type> + <arch name='riscv64'> + <wordsize>64</wordsize> + <emulator>/usr/bin/qemu-system-riscv64</emulator> + <domain type='qemu'/> + </arch> + <features> + <cpuselection/> + <deviceboot/> + <disksnapshot default='on' toggle='no'/> + </features> + </guest> + +</capabilities> diff --git a/tests/qemucaps2xmltest.c b/tests/qemucaps2xmltest.c index dd9fc6917a..150273f67a 100644 --- a/tests/qemucaps2xmltest.c +++ b/tests/qemucaps2xmltest.c @@ -215,7 +215,9 @@ mymain(void) DO_TEST("s390x", "caps_2.12.0"); DO_TEST("s390x", "caps_3.0.0"); DO_TEST("riscv32", "caps_3.0.0"); + DO_TEST("riscv32", "caps_4.0.0"); DO_TEST("riscv64", "caps_3.0.0"); + DO_TEST("riscv64", "caps_4.0.0"); return (ret == 0) ? EXIT_SUCCESS : EXIT_FAILURE; } diff --git a/tests/qemuxml2argvdata/riscv64-virt-headless.riscv64-latest.args b/tests/qemuxml2argvdata/riscv64-virt-headless.riscv64-latest.args index 191550e36b..8a28c035d7 100644 --- a/tests/qemuxml2argvdata/riscv64-virt-headless.riscv64-latest.args +++ b/tests/qemuxml2argvdata/riscv64-virt-headless.riscv64-latest.args @@ -25,7 +25,8 @@ file=/tmp/lib/domain--1-guest/master-key.aes \ -device virtio-serial-device,id=virtio-serial0 \ -drive file=/var/lib/libvirt/images/guest.qcow2,format=qcow2,if=none,\ id=drive-virtio-disk0 \ --device virtio-blk-device,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 \ +-device virtio-blk-device,scsi=off,drive=drive-virtio-disk0,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 \ -- 2.20.1 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list