Firmware 20260310 patches
The following changes since commit de61484ec39f418e5c0d4603017695f9ffb8fe24:
Merge tag 'linux-user-for-v11-pull-request' of https://github.com/hdeller/qemu-hppa into staging (2026-03-09 14:53:42 +0000)
are available in the Git repository at:
https://gitlab.com/kraxel/qemu.git tags/firmware-20260310-pull-request
for you to fetch changes up to 470ccb470b33bedede0100fdb703228a3f2683a5:
i386/sev/igvm: do not reset guest policy if IGVM does not set it (2026-03-10 14:20:41 +0100)
----------------------------------------------------------------
- firmware.json spec update for svsm.
- igvm bugfixes.
----------------------------------------------------------------
Ani Sinha (1):
i386/sev/igvm: do not reset guest policy if IGVM does not set it
Luigi Leonardi (1):
igvm: fix build when igvm is not installed in a well known path
Oliver Steffen (1):
docs/interop: Add AMD SEV-SNP SVSM interface to firmware.json
include/qemu/typedefs.h | 1 + include/system/igvm-internal.h | 9 ++------- include/system/igvm.h | 5 +++++ stubs/igvm.c | 1 - target/i386/sev.c | 12 ++++++++++-- docs/interop/firmware.json | 4 +++- 6 files changed, 21 insertions(+), 11 deletions(-)
Signature · 1 line
2.53.0
[PULL 1/3] docs/interop: Add AMD SEV-SNP SVSM interface to firmware.json
From: Oliver Steffen <[email protected]>
AMD SEV-SNP defines a guest to Secure VM Service Module (SVSM) firmware
[1] interface. Add a corresponding item to the FirmwareOSInterface enum.
[1]
https://docs.amd.com/api/khub/documents/Al5Q~fSl~kWKkJ3zC0vk_g/content
Message-ID: <[email protected]>
--- docs/interop/firmware.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
docs/interop/firmware.json +3 -1
@@ -40,10 +40,12 @@ # example, firmware built from the edk2 (EFI Development Kit II) # project usually provides this interface. # +# @svsm: AMD SEV-SNP Secure VM Service Module (SVSM) guest protocol. +# # Since: 3.0 ## { 'enum' : 'FirmwareOSInterface', - 'data' : [ 'bios', 'openfirmware', 'uboot', 'uefi' ] } + 'data' : [ 'bios', 'openfirmware', 'svsm', 'uboot', 'uefi' ] } ## # @FirmwareDevice:
Signature · 1 line
2.53.0
[PULL 2/3] igvm: fix build when igvm is not installed in a well known path
In reply to Gerd HoffmannFrom: Luigi Leonardi <[email protected]>
stubs/igvm.c includes igvm-internal.h, that in turn includes the igvm library. This is required just for the QIgvm declaration and creates an unnecessary dependency on the library.
Since igvm is not listed as a dependency of stubs, this results in build failing when the library is not installed in a "well known" path of the system.
Add a forward declaration for QIgvm and move the definition of qigvm_directive_madt to igvm.h so that we can drop igvm-internal.h from stubs/igvm.c.
Message-ID: <[email protected]>
--- include/qemu/typedefs.h | 1 + include/system/igvm-internal.h | 9 ++------- include/system/igvm.h | 5 +++++ stubs/igvm.c | 1 - 4 files changed, 8 insertions(+), 8 deletions(-)
include/qemu/typedefs.h +1 -0
@@ -102,6 +102,7 @@ typedef struct QEMUSGList QEMUSGList;typedef struct QemuSpin QemuSpin ;typedef struct QEMUTimer QEMUTimer ;typedef struct QEMUTimerListGroup QEMUTimerListGroup ; +typedef struct QIgvm QIgvm ;typedef struct QList QList ;typedef struct QNull QNull ;typedef struct QNum QNum ;
include/system/igvm-internal.h +2 -7
@@ -42,7 +42,7 @@ typedef struct QIgvmParameterData {* QIgvm contains the information required during processing of a single IGVM * file. */ -typedef struct QIgvm { +struct QIgvm {IgvmHandle file;MachineState *machine_state;ConfidentialGuestSupportClass *cgsc;
@@ -67,16 +67,11 @@ typedef struct QIgvm {unsigned region_start_index;unsigned region_last_index; unsigned region_page_count; -} QIgvm; +};IgvmHandle qigvm_file_init (char *filename,Error **errp);QIgvmParameterData *qigvm_find_param_entry (QIgvm *igvm,uint32_t parameter_area_index); -/* -* IGVM parameter handlers -*/ -int qigvm_directive_madt (QIgvm *ctx,const uint8_t *header_data,Error **errp); -#endif
include/system/igvm.h +5 -0
@@ -27,4 +27,9 @@ int qigvm_x86_get_mem_map_entry(int index,int qigvm_x86_set_vp_context (void *data,int index,Error **errp); +/* +* IGVM parameter handlers +*/ +int qigvm_directive_madt (QIgvm *ctx,const uint8_t *header_data,Error **errp); +#endif
stubs/igvm.c +0 -1
@@ -12,7 +12,6 @@#include "qemu/osdep.h" #include "system/igvm.h" -#include "system/igvm-internal.h" int qigvm_x86_get_mem_map_entry(int index, ConfidentialGuestMemoryMapEntry *entry,
Signature · 1 line
2.53.0
[PULL 3/3] i386/sev/igvm: do not reset guest policy if IGVM does not set it
In reply to Gerd HoffmannFrom: Ani Sinha <[email protected]>
The guest policy is set either through command-line or through IGVM. If none of the above applies, default guest policy applies. However, if IGVM does not set the guest policy, currently the policy gets set to 0 regardless of whether it was previously set to default value or command line. This change fixes this by checking if IGVM indeed has set a policy value. If not, do not reset existing value.
This avoids guest crashes such as the following during reset when the IGVM has not explicitly set any guest policies:
qemu-system-x86_64: sev_snp_launch_start: SNP_LAUNCH_START ret=-22 fw_error=0 ''
qemu-system-x86_64: sev_common_kvm_init: failed to create encryption context
qemu-system-x86_64: unable to rebuild guest: Operation not permitted(-1)
Message-ID: <[email protected]>
--- target/i386/sev.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-)
target/i386/sev.c +10 -2
@@ -2760,7 +2760,11 @@ static int cgs_set_guest_policy(ConfidentialGuestPolicyType policy_type, id_auth->author_key[0 ] ?1 :0 ; finish->id_block_en =1 ; } - sev_snp_guest->kvm_start_conf.policy = policy; + +/* do not reset existing policy if policy was not set in IGVM */ +if (policy !=0 ) { + sev_snp_guest->kvm_start_conf.policy = policy; + } }else {SevGuestState *sev_guest =SEV_GUEST (MACHINE (qdev_get_machine ())->cgs);/* Only the policy flags are supported for SEV and SEV-ES */
@@ -2769,7 +2773,11 @@ static int cgs_set_guest_policy(ConfidentialGuestPolicyType policy_type, "but SEV-SNP is not enabled", __func__);return -1 ; } - sev_guest->policy = policy; + +/* do not reset existing policy if policy was not set in IGVM */ +if (policy !=0 ) { + sev_guest->policy = policy; + } }return 0 ; }
Signature · 1 line
2.53.0
Peter Maydell
AppliedQuoted 11 lines · Gerd Hoffmann
The following changes since commit
de61484ec39f418e5c0d4603017695f9ffb8fe24:Merge tag 'linux-user-for-v11-pull-request' of https://github.com/hdeller/qemu-hppa into staging (2026-03-09 14:53:42 +0000)
are available in the Git repository at:
https://gitlab.com/kraxel/qemu.git tags/firmware-20260310-pull-request
for you to fetch changes up to
470ccb470b33bedede0100fdb703228a3f2683a5:
Quoted 7 lines
i386/sev/igvm: do not reset guest policy if IGVM does not set it (2026-03-10 14:20:41 +0100)
----------------------------------------------------------------
- firmware.json spec update for svsm.
- igvm bugfixes.----------------------------------------------------------------
Applied, thanks.
Please update the changelog at https://wiki.qemu.org/ChangeLog/11.0
for any user-visible changes.
-- PMM