On Tue, Nov 18, 2025 at 02:37:57AM +0000, Kazuhiro Abe (Fujitsu) wrote:
To clarify, the dependency on UEFI for ACPI is correct, at least to the best of my knowledge. The problem is that libvirt doesn't realize that edk2 loaded via -bios is still UEFI, so the check fails.
For this specific case, it would probably be enough to ensure that the edk2 package installs a firmware descriptor along the lines of
{ "interface-types": [ "uefi" ], "mapping": { "device": "memory", "filename": "/usr/share/qemu-efi-aarch64/QEMU_EFI.fd" }, "targets": [ { "architecture": "aarch64", "machines": [ "virt-*" ] } ] }
This should allow libvirt to automatically set <os firmware='efi'>, at which point the check will pass. This is exactly what happens for e.g. the SEV-SNP firmware builds.
Note that I haven't actually tried the above, so there might be other lingering issues that I'm not aware of. I am currently working on some changes of my own in the area in order to enable the uefi-vars QEMU devices, which also expect edk2 to be loaded via -bios; so if there is anything else missing, I expect that I will run into it and fix it shortly.
I understand your suggested approach. My understanding is that this is the case where autoselection is enabled and the JSON file in /usr/share/qemu/firmware is referenced.
In a CCA environment, I think the common approach is to enable autoselection and reference the JSON file in /usr/share/qemu/firmware. However, there are cases where autoselection is disabled, such as when using <os> <loader type='rom'>, the JSON file will not be referenced. In such scenarios, your proposed method fails to allow libvirt to automatically set <os firmware='efi'>, and the issue still persists.
You've just identified one of those issues that I predicted I would run into and have to fix :) I already have a patch addressing that, among other things, in my local branch. I expect to be able to post the whole series shortly, probably next week. -- Andrea Bolognani / Red Hat / Virtualization