OSDN Git Service

x86/compressed/64: Add support for SEV-SNP CPUID table in #VC handlers
authorMichael Roth <michael.roth@amd.com>
Thu, 24 Feb 2022 16:56:12 +0000 (10:56 -0600)
committerBorislav Petkov <bp@suse.de>
Thu, 7 Apr 2022 14:47:11 +0000 (16:47 +0200)
commitee0bfa08a345370df28c07288e886abcbaac481f
tree671581997cc19cd6d43041c12fb3713de66976e0
parent801baa693c1f6d7327475c39100c456db340cd3e
x86/compressed/64: Add support for SEV-SNP CPUID table in #VC handlers

CPUID instructions generate a #VC exception for SEV-ES/SEV-SNP guests,
for which early handlers are currently set up to handle. In the case
of SEV-SNP, guests can use a configurable location in guest memory
that has been pre-populated with a firmware-validated CPUID table to
look up the relevant CPUID values rather than requesting them from
hypervisor via a VMGEXIT. Add the various hooks in the #VC handlers to
allow CPUID instructions to be handled via the table. The code to
actually configure/enable the table will be added in a subsequent
commit.

Signed-off-by: Michael Roth <michael.roth@amd.com>
Signed-off-by: Brijesh Singh <brijesh.singh@amd.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lore.kernel.org/r/20220307213356.2797205-33-brijesh.singh@amd.com
arch/x86/include/asm/sev-common.h
arch/x86/kernel/sev-shared.c