i386/sev: Add a sev_snp_enabled() helper
authorMichael Roth <michael.roth@amd.com>
Thu, 30 May 2024 11:16:20 +0000 (06:16 -0500)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 5 Jun 2024 09:01:06 +0000 (11:01 +0200)
commit99190f805dca9475fe244fbd8041961842657dc2
treeb890697a0edf5fa7c2f2618ca86b816ce888736e
parent7b34df44260b391e33bc3acf1ced30019d9aadf1
i386/sev: Add a sev_snp_enabled() helper

Add a simple helper to check if the current guest type is SNP. Also have
SNP-enabled imply that SEV-ES is enabled as well, and fix up any places
where the sev_es_enabled() check is expecting a pure/non-SNP guest.

Signed-off-by: Michael Roth <michael.roth@amd.com>
Signed-off-by: Pankaj Gupta <pankaj.gupta@amd.com>
Message-ID: <20240530111643.1091816-9-pankaj.gupta@amd.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
target/i386/sev.c
target/i386/sev.h