From: Akio Kakuno <fj3333bs@fujitsu.com>
- 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: Kazuhiro Abe <fj1078ii@aa.jp.fujitsu.com>
---
.../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 1f31ec810c..f48cd96828 100644
--- a/tests/qemuxmlconftest.c
+++ b/tests/qemuxmlconftest.c
@@ -2863,6 +2863,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.43.5
On Tue, May 20, 2025 at 17:28:28 +0900, Kazuhiro Abe wrote: > From: Akio Kakuno <fj3333bs@fujitsu.com> > > - 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: Kazuhiro Abe <fj1078ii@aa.jp.fujitsu.com> > --- > .../launch-security-cca.aarch64-latest.args | 30 +++++++++++++++++++ > .../launch-security-cca.aarch64-latest.xml | 24 +++++++++++++++ This test file doesn't use the capability dump you've added but instead uses the one generated from qemu-10.0 > 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
© 2016 - 2025 Red Hat, Inc.