summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Lendacky2021-01-26 18:36:49 +0100
committerPaolo Bonzini2021-02-16 17:15:39 +0100
commit027b524d6a427d7c89f4e8af44c49d96796adab5 (patch)
tree3d338f7b5af18ccb5acf442f101ecc78fc580190
parentkvm/i386: Use a per-VM check for SMM capability (diff)
downloadqemu-027b524d6a427d7c89f4e8af44c49d96796adab5.tar.gz
qemu-027b524d6a427d7c89f4e8af44c49d96796adab5.tar.xz
qemu-027b524d6a427d7c89f4e8af44c49d96796adab5.zip
sev/i386: Enable an SEV-ES guest based on SEV policy
Update the sev_es_enabled() function return value to be based on the SEV policy that has been specified. SEV-ES is enabled if SEV is enabled and the SEV-ES policy bit is set in the policy object. Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Richard Henderson <richard.henderson@linaro.org> Cc: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com> Reviewed-by: Venu Busireddy <venu.busireddy@oracle.com> Message-Id: <c69f81c6029f31fc4c52a9f35f1bd704362476a5.1611682609.git.thomas.lendacky@amd.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r--target/i386/sev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/target/i386/sev.c b/target/i386/sev.c
index 4b70d4284f..0f414df02f 100644
--- a/target/i386/sev.c
+++ b/target/i386/sev.c
@@ -356,7 +356,7 @@ sev_enabled(void)
bool
sev_es_enabled(void)
{
- return false;
+ return sev_enabled() && (sev_guest->policy & SEV_POLICY_ES);
}
uint64_t