x86/sev: Use firmware-validated CPUID for SEV-SNP guests
authorMichael Roth <michael.roth@amd.com>
Mon, 7 Mar 2022 21:33:49 +0000 (15:33 -0600)
committerBorislav Petkov <bp@suse.de>
Thu, 7 Apr 2022 14:47:12 +0000 (16:47 +0200)
commit30612045e69d088f1effd748048ebb0e282984ec
treec1850648503433661069afacecf19a747adbad4b
parentb190a043c49af4587f5e157053f909192820522a
x86/sev: Use firmware-validated CPUID for SEV-SNP guests

SEV-SNP guests will be provided the location of special 'secrets' and
'CPUID' pages via the Confidential Computing blob. This blob is
provided to the run-time kernel either through a boot_params field that
was initialized by the boot/compressed kernel, or via a setup_data
structure as defined by the Linux Boot Protocol.

Locate the Confidential Computing blob from these sources and, if found,
use the provided CPUID page/table address to create a copy that the
run-time kernel will use when servicing CPUID instructions via a #VC
handler.

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-40-brijesh.singh@amd.com
arch/x86/boot/compressed/sev.c
arch/x86/kernel/sev-shared.c
arch/x86/kernel/sev.c