tests: Add firmware-auto-efi-enrolled-keys-aarch64

This test case demonstrates how to automatically configure an
aarch64 guest so that Secure Boot support is available and only
signed operating systems are allowed to boot.

It currently fails because there is no firmware descriptor that
describes a suitable firmware build yet. That will change in a
future commit.

In addition to the latest version, the test case is also executed
against QEMU 8.2.0 specifically. This version of the test case is
intended to fail, because the uefi-vars device that we need to
support Secure Boot on aarch64 was not yet available in that
version of QEMU. The exact error message will change down the
line.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
Andrea Bolognani committed 2026-02-24 11:29:06 +01:00
1 parent 0653a2eae2
commit 38c4c3f654
6 files changed
+84

No files matched your search

@@ -0,0 +1 @@
operation failed: Unable to find 'efi' firmware that is compatible with the current configuration
@@ -0,0 +1,30 @@
<domain type='kvm'>
<name>guest</name>
<uuid>63840878-0deb-4095-97e6-fc444d9bc9fa</uuid>
<memory unit='KiB'>1048576</memory>
<currentMemory unit='KiB'>1048576</currentMemory>
<vcpu placement='static'>1</vcpu>
<os firmware='efi'>
<type arch='aarch64' machine='virt-8.2'>hvm</type>
<firmware>
<feature enabled='yes' name='enrolled-keys'/>
</firmware>
<loader format='raw'/>
<boot dev='hd'/>
</os>
<features>
<acpi/>
<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='usb' index='0' model='none'/>
<controller type='pci' index='0' model='pcie-root'/>
<audio id='1' type='none'/>
<memballoon model='none'/>
</devices>
</domain>
@@ -0,0 +1 @@
operation failed: Unable to find 'efi' firmware that is compatible with the current configuration
@@ -0,0 +1,30 @@
<domain type='kvm'>
<name>guest</name>
<uuid>63840878-0deb-4095-97e6-fc444d9bc9fa</uuid>
<memory unit='KiB'>1048576</memory>
<currentMemory unit='KiB'>1048576</currentMemory>
<vcpu placement='static'>1</vcpu>
<os firmware='efi'>
<type arch='aarch64' machine='virt-8.2'>hvm</type>
<firmware>
<feature enabled='yes' name='enrolled-keys'/>
</firmware>
<loader format='raw'/>
<boot dev='hd'/>
</os>
<features>
<acpi/>
<gic version='2'/>
</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='usb' index='0' model='none'/>
<controller type='pci' index='0' model='pcie-root'/>
<audio id='1' type='none'/>
<memballoon model='none'/>
</devices>
</domain>
@@ -0,0 +1,20 @@
<domain type='kvm'>
<name>guest</name>
<uuid>63840878-0deb-4095-97e6-fc444d9bc9fa</uuid>
<memory unit='KiB'>1048576</memory>
<vcpu placement='static'>1</vcpu>
<os firmware='efi'>
<type arch='aarch64' machine='virt-8.2'>hvm</type>
<firmware>
<feature enabled='yes' name='enrolled-keys'/>
</firmware>
</os>
<features>
<acpi/>
</features>
<devices>
<emulator>/usr/bin/qemu-system-aarch64</emulator>
<controller type='usb' model='none'/>
<memballoon model='none'/>
</devices>
</domain>
+2
View File
@@ -1657,6 +1657,8 @@ mymain(void)
DO_TEST_CAPS_LATEST("firmware-auto-efi-secboot");
DO_TEST_CAPS_LATEST("firmware-auto-efi-no-secboot");
DO_TEST_CAPS_LATEST("firmware-auto-efi-enrolled-keys");
DO_TEST_CAPS_ARCH_LATEST_FAILURE("firmware-auto-efi-enrolled-keys-aarch64", "aarch64");
DO_TEST_CAPS_ARCH_VER_FAILURE("firmware-auto-efi-enrolled-keys-aarch64", "aarch64", "8.2.0");
DO_TEST_CAPS_LATEST("firmware-auto-efi-no-enrolled-keys");
DO_TEST_CAPS_LATEST_PARSE_ERROR("firmware-auto-efi-enrolled-keys-no-secboot");
DO_TEST_CAPS_LATEST("firmware-auto-efi-smm-off");