]> xenbits.xensource.com Git - libvirt.git/commitdiff
tests: Add coverage for pauth Arm CPU feature
authorAndrea Bolognani <abologna@redhat.com>
Fri, 12 Jul 2024 13:04:27 +0000 (15:04 +0200)
committerAndrea Bolognani <abologna@redhat.com>
Mon, 15 Jul 2024 11:08:15 +0000 (13:08 +0200)
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
tests/qemuxmlconfdata/aarch64-features-pauth.aarch64-latest.args [new file with mode: 0644]
tests/qemuxmlconfdata/aarch64-features-pauth.aarch64-latest.xml [new file with mode: 0644]
tests/qemuxmlconfdata/aarch64-features-pauth.xml [new file with mode: 0644]
tests/qemuxmlconftest.c

diff --git a/tests/qemuxmlconfdata/aarch64-features-pauth.aarch64-latest.args b/tests/qemuxmlconfdata/aarch64-features-pauth.aarch64-latest.args
new file mode 100644 (file)
index 0000000..41714ae
--- /dev/null
@@ -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-aarch64 \
+-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,gic-version=3,dump-guest-core=off,memory-backend=mach-virt.ram,acpi=off \
+-accel kvm \
+-cpu host,pauth=off \
+-m size=1048576k \
+-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 1ccfd97d-5eb4-478a-bbe6-88d254c16db7 \
+-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 \
+-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/aarch64-features-pauth.aarch64-latest.xml b/tests/qemuxmlconfdata/aarch64-features-pauth.aarch64-latest.xml
new file mode 100644 (file)
index 0000000..be7676b
--- /dev/null
@@ -0,0 +1,28 @@
+<domain type='kvm'>
+  <name>guest</name>
+  <uuid>1ccfd97d-5eb4-478a-bbe6-88d254c16db7</uuid>
+  <memory unit='KiB'>1048576</memory>
+  <currentMemory unit='KiB'>1048576</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='aarch64' machine='virt'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <features>
+    <gic version='3'/>
+  </features>
+  <cpu mode='host-passthrough' check='none'>
+    <feature policy='disable' name='pauth'/>
+  </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-aarch64</emulator>
+    <controller type='usb' index='0' model='none'/>
+    <controller type='pci' index='0' model='pcie-root'/>
+    <audio id='1' type='none'/>
+    <memballoon model='none'/>
+  </devices>
+</domain>
diff --git a/tests/qemuxmlconfdata/aarch64-features-pauth.xml b/tests/qemuxmlconfdata/aarch64-features-pauth.xml
new file mode 100644 (file)
index 0000000..5dcede8
--- /dev/null
@@ -0,0 +1,17 @@
+<domain type='kvm'>
+  <name>guest</name>
+  <uuid>1ccfd97d-5eb4-478a-bbe6-88d254c16db7</uuid>
+  <memory unit='KiB'>1048576</memory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='aarch64' machine='virt'>hvm</type>
+  </os>
+  <cpu mode='host-passthrough'>
+    <feature policy='disable' name='pauth'/>
+  </cpu>
+  <devices>
+    <emulator>/usr/bin/qemu-system-aarch64</emulator>
+    <controller type='usb' model='none'/>
+    <memballoon model='none'/>
+  </devices>
+</domain>
index 389d31800b07f7cee56737b42fa7b23743a0274c..392bb6c0fff4871f65d16de9b8c90273c024714c 100644 (file)
@@ -2601,6 +2601,7 @@ mymain(void)
     DO_TEST_CAPS_ARCH_LATEST("aarch64-features-sve", "aarch64");
 
     DO_TEST_CAPS_ARCH_LATEST("aarch64-features-ras", "aarch64");
+    DO_TEST_CAPS_ARCH_LATEST("aarch64-features-pauth", "aarch64");
 
     DO_TEST_CAPS_ARCH_LATEST("clock-timer-armvtimer", "aarch64");