[RFC PATCH v2 6/6] qemuxmlconftest: Adds Arm CCA support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



- This test was added to check the xml used to launch the VM
  for Arm CCA support.
  This test was created using the method described in the
  documentation.

Signed-off-by: Akio Kakuno <fj3333bs@xxxxxxxxxxx>
---
 .../launch-security-cca.aarch64-latest.args   | 30 +++++++++++++++++++
 .../launch-security-cca.aarch64-latest.xml    | 24 +++++++++++++++
 tests/qemuxmlconfdata/launch-security-cca.xml | 16 ++++++++++
 tests/qemuxmlconftest.c                       |  2 ++
 4 files changed, 72 insertions(+)
 create mode 100644 tests/qemuxmlconfdata/launch-security-cca.aarch64-latest.args
 create mode 100644 tests/qemuxmlconfdata/launch-security-cca.aarch64-latest.xml
 create mode 100644 tests/qemuxmlconfdata/launch-security-cca.xml

diff --git a/tests/qemuxmlconfdata/launch-security-cca.aarch64-latest.args b/tests/qemuxmlconfdata/launch-security-cca.aarch64-latest.args
new file mode 100644
index 0000000000..ea8c46735b
--- /dev/null
+++ b/tests/qemuxmlconfdata/launch-security-cca.aarch64-latest.args
@@ -0,0 +1,30 @@
+LC_ALL=C \
+PATH=/bin \
+HOME=/var/lib/libvirt/qemu/domain--1-cca_test \
+USER=test \
+LOGNAME=test \
+XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-cca_test/.local/share \
+XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-cca_test/.cache \
+XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-cca_test/.config \
+/usr/bin/qemu-system-aarch64 \
+-name guest=cca_test,debug-threads=on \
+-S \
+-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-cca_test/master-key.aes"}' \
+-machine virt,usb=off,gic-version=3,dump-guest-core=off,memory-backend=mach-virt.ram,confidential-guest-support=rme0,acpi=off \
+-accel kvm \
+-m size=219136k \
+-object '{"qom-type":"memory-backend-ram","id":"mach-virt.ram","size":224395264}' \
+-overcommit mem-lock=off \
+-smp 1,sockets=1,cores=1,threads=1 \
+-uuid 00010203-0405-4607-8809-0a0b0c0d0e0f \
+-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"}' \
+-object '{"qom-type":"rme-guest","id":"rme0","measurement-algorithm":"sha256"}' \
+-msg timestamp=on
diff --git a/tests/qemuxmlconfdata/launch-security-cca.aarch64-latest.xml b/tests/qemuxmlconfdata/launch-security-cca.aarch64-latest.xml
new file mode 100644
index 0000000000..382313472b
--- /dev/null
+++ b/tests/qemuxmlconfdata/launch-security-cca.aarch64-latest.xml
@@ -0,0 +1,24 @@
+<domain type='kvm'>
+  <name>cca_test</name>
+  <uuid>00010203-0405-4607-8809-0a0b0c0d0e0f</uuid>
+  <memory unit='KiB'>219100</memory>
+  <currentMemory unit='KiB'>219100</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='aarch64' machine='virt'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <features>
+    <gic version='3'/>
+  </features>
+  <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='pci' index='0' model='pcie-root'/>
+    <audio id='1' type='none'/>
+  </devices>
+  <launchSecurity type='cca'/>
+</domain>
diff --git a/tests/qemuxmlconfdata/launch-security-cca.xml b/tests/qemuxmlconfdata/launch-security-cca.xml
new file mode 100644
index 0000000000..dccd67f8a5
--- /dev/null
+++ b/tests/qemuxmlconfdata/launch-security-cca.xml
@@ -0,0 +1,16 @@
+<domain type='kvm'>
+  <name>cca_test</name>
+  <uuid>00010203-0405-4607-8809-0a0b0c0d0e0f</uuid>
+  <memory unit='KiB'>219100</memory>
+  <currentMemory unit='KiB'>219100</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='aarch64' machine='virt'>hvm</type>
+  </os>
+  <devices>
+    <emulator>/usr/bin/qemu-system-aarch64</emulator>
+  </devices>
+  <launchSecurity type='cca'>
+    <measurement-algo>sha256</measurement-algo>
+  </launchSecurity>
+</domain>
diff --git a/tests/qemuxmlconftest.c b/tests/qemuxmlconftest.c
index 6a46bfc7a3..babe658359 100644
--- a/tests/qemuxmlconftest.c
+++ b/tests/qemuxmlconftest.c
@@ -2877,6 +2877,8 @@ mymain(void)
 
     DO_TEST_CAPS_ARCH_LATEST("launch-security-s390-pv", "s390x");
 
+    DO_TEST_CAPS_ARCH_LATEST("launch-security-cca", "aarch64");
+
     DO_TEST_CAPS_LATEST("vhost-user-fs-fd-memory");
     DO_TEST_CAPS_LATEST("vhost-user-fs-fd-openfiles");
     DO_TEST_CAPS_LATEST("vhost-user-fs-hugepages");
-- 
2.34.1



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux