i386/sev/igvm: do not reset guest policy if IGVM does not set it
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) Reported-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Ani Sinha <anisinha@redhat.com> Message-ID: <20260310094450.35861-3-anisinha@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>