On 8/1/25 03:14, Andrea Bolognani wrote:
On Fri, Aug 01, 2025 at 02:06:44AM -0700, Andrea Bolognani wrote:
> On Thu, Jul 31, 2025 at 11:33:08AM -0600, Jim Fehlig wrote:
>> Apologies for not having time to look at this in more detail today, but I
>> quickly tried these patches and now see
>>
>> operation failed: unable to find any master var store for loader:
>> /usr/share/qemu/ovmf-x86_64-sev.bin
>
> This happens at domain start time, right?
>
> Looking at the test case I added, the <nvram> element somehow is
> getting filled in even though it obviously shouldn't be.
>
> Additionally, I noticed that the stateless=yes attribute is not added
> either, so that's another detail that will to be sorted out.
>
> I'll look into it.
Can you please try squashing in the diff below (and regenerating test
data of course)?
diff --git a/src/qemu/qemu_firmware.c b/src/qemu/qemu_firmware.c
index 0fb954993a..502988d8ff 100644
--- a/src/qemu/qemu_firmware.c
+++ b/src/qemu/qemu_firmware.c
@@ -1444,6 +1444,9 @@ qemuFirmwareEnableFeaturesModern(virDomainDef *def,
else
loader->readonly = VIR_TRISTATE_BOOL_YES;
+ if (flash->mode == QEMU_FIRMWARE_FLASH_MODE_STATELESS)
+ loader->stateless = VIR_TRISTATE_BOOL_YES;
+
VIR_FREE(loader->path);
loader->path = g_strdup(flash->executable.filename);
With this addition, the correct firmware is detected, but it's not properly
provided to qemu
internal error: QEMU unexpectedly closed the monitor (vm='sles15sp7-snp'):
2025-08-01T17:11:20.589614Z qemu-system-x86_64: pflash with kvm requires KVM
readonly memory support
The pertinent command line pieces being
-blockdev
'{"driver":"file","filename":"/usr/share/qemu/ovmf-x86_64-sev.bin","node-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":
"unmap"}'
-blockdev
'{"node-name":"libvirt-pflash0-format","read-only":true,"driver":"raw","file":"libvirt-pflash0-storage"}'
But for SNP, it needs to be provided as bios, e.g.
-bios /usr/share/qemu/ovmf-x86_64-sev.bin
Are we correctly identifying this firmware in the descriptor file? It's
advertised as a "flash" device, although I'm not sure if any of the other
"FirmwareDevice" options [1] are appropriate. Perhaps the
"FirmwareOSInterface"
should be 'bios'?
Regards,
Jim
[1]
https://gitlab.com/qemu/qemu/-/blob/master/docs/interop/firmware.json?ref...