Provide test data for checking that vlen can be set on RISC-V.

Signed-off-by: Heinrich Schuchardt <[email protected]>
---
 .../riscv64-virt-vlen.riscv64-latest.args     | 31 +++++++++++++++++++
 .../riscv64-virt-vlen.riscv64-latest.xml      | 26 ++++++++++++++++
 tests/qemuxmlconfdata/riscv64-virt-vlen.xml   | 26 ++++++++++++++++
 tests/qemuxmlconftest.c                       |  2 ++
 4 files changed, 85 insertions(+)
 create mode 100644 tests/qemuxmlconfdata/riscv64-virt-vlen.riscv64-latest.args
 create mode 100644 tests/qemuxmlconfdata/riscv64-virt-vlen.riscv64-latest.xml
 create mode 100644 tests/qemuxmlconfdata/riscv64-virt-vlen.xml

diff --git a/tests/qemuxmlconfdata/riscv64-virt-vlen.riscv64-latest.args 
b/tests/qemuxmlconfdata/riscv64-virt-vlen.riscv64-latest.args
new file mode 100644
index 0000000000..1f827b306c
--- /dev/null
+++ b/tests/qemuxmlconfdata/riscv64-virt-vlen.riscv64-latest.args
@@ -0,0 +1,31 @@
+LC_ALL=C \
+PATH=/bin \
+HOME=/var/lib/libvirt/qemu/domain--1-guest \
+USER=test \
+LOGNAME=test \
+XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-guest/.local/share \
+XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-guest/.cache \
+XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest/.config \
+/usr/bin/qemu-system-riscv64 \
+-name guest=guest,debug-threads=on \
+-S \
+-object 
'{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest/master-key.aes"}'
 \
+-machine 
virt,usb=off,dump-guest-core=off,memory-backend=riscv_virt_board.ram,acpi=off \
+-accel tcg \
+-cpu rv64,vlen=256,v=on \
+-m size=4194304k \
+-object 
'{"qom-type":"memory-backend-ram","id":"riscv_virt_board.ram","size":4294967296}'
 \
+-overcommit mem-lock=off \
+-smp 4,sockets=4,cores=1,threads=1 \
+-uuid 1ccfd97d-5eb4-478a-bbe6-88d254c16db7 \
+-display none \
+-no-user-config \
+-nodefaults \
+-chardev socket,id=charmonitor,fd=@mon-fd@,server=on,wait=off \
+-mon chardev=charmonitor,id=monitor,mode=control \
+-rtc base=utc \
+-no-shutdown \
+-boot strict=on \
+-audiodev '{"id":"audio1","driver":"none"}' \
+-sandbox 
on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
+-msg timestamp=on
diff --git a/tests/qemuxmlconfdata/riscv64-virt-vlen.riscv64-latest.xml 
b/tests/qemuxmlconfdata/riscv64-virt-vlen.riscv64-latest.xml
new file mode 100644
index 0000000000..67545ba8d4
--- /dev/null
+++ b/tests/qemuxmlconfdata/riscv64-virt-vlen.riscv64-latest.xml
@@ -0,0 +1,26 @@
+<domain type='qemu'>
+  <name>guest</name>
+  <uuid>1ccfd97d-5eb4-478a-bbe6-88d254c16db7</uuid>
+  <memory unit='KiB'>4194304</memory>
+  <currentMemory unit='KiB'>4194304</currentMemory>
+  <vcpu placement='static'>4</vcpu>
+  <os>
+    <type arch='riscv64' machine='virt'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <cpu mode='custom' match='exact' check='none'>
+    <model fallback='forbid'>rv64</model>
+    <vlen value='256'/>
+    <feature policy='require' name='v'/>
+  </cpu>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu-system-riscv64</emulator>
+    <controller type='pci' index='0' model='pcie-root'/>
+    <audio id='1' type='none'/>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuxmlconfdata/riscv64-virt-vlen.xml 
b/tests/qemuxmlconfdata/riscv64-virt-vlen.xml
new file mode 100644
index 0000000000..67545ba8d4
--- /dev/null
+++ b/tests/qemuxmlconfdata/riscv64-virt-vlen.xml
@@ -0,0 +1,26 @@
+<domain type='qemu'>
+  <name>guest</name>
+  <uuid>1ccfd97d-5eb4-478a-bbe6-88d254c16db7</uuid>
+  <memory unit='KiB'>4194304</memory>
+  <currentMemory unit='KiB'>4194304</currentMemory>
+  <vcpu placement='static'>4</vcpu>
+  <os>
+    <type arch='riscv64' machine='virt'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <cpu mode='custom' match='exact' check='none'>
+    <model fallback='forbid'>rv64</model>
+    <vlen value='256'/>
+    <feature policy='require' name='v'/>
+  </cpu>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu-system-riscv64</emulator>
+    <controller type='pci' index='0' model='pcie-root'/>
+    <audio id='1' type='none'/>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuxmlconftest.c b/tests/qemuxmlconftest.c
index a1389775b9..929c844e90 100644
--- a/tests/qemuxmlconftest.c
+++ b/tests/qemuxmlconftest.c
@@ -3166,6 +3166,8 @@ mymain(void)
 
     DO_TEST_CAPS_ARCH_LATEST("riscv64-virt-features-aia", "riscv64");
 
+    DO_TEST_CAPS_ARCH_LATEST("riscv64-virt-vlen", "riscv64");
+
     DO_TEST_CAPS_LATEST("virtio-9p-multidevs");
     DO_TEST_CAPS_LATEST("virtio-9p-createmode");
 
-- 
2.53.0

Reply via email to