summaryrefslogtreecommitdiffstats
path: root/arch/x86/boot/compressed/sev.c
diff options
context:
space:
mode:
authorMichael Roth <michael.roth@amd.com>2022-02-24 10:56:18 -0600
committerBorislav Petkov <bp@suse.de>2022-04-07 16:47:11 +0200
commitb190a043c49af4587f5e157053f909192820522a (patch)
tree1cb7b0e4fe544e2d9506fe8bad441bd535eea461 /arch/x86/boot/compressed/sev.c
parent76f61e1e89b32f3e5d639f1b57413a919066da06 (diff)
downloadlinux-stable-b190a043c49af4587f5e157053f909192820522a.tar.gz
linux-stable-b190a043c49af4587f5e157053f909192820522a.tar.bz2
linux-stable-b190a043c49af4587f5e157053f909192820522a.zip
x86/sev: Add SEV-SNP feature detection/setup
Initial/preliminary detection of SEV-SNP is done via the Confidential Computing blob. Check for it prior to the normal SEV/SME feature initialization, and add some sanity checks to confirm it agrees with SEV-SNP CPUID/MSR bits. 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-39-brijesh.singh@amd.com
Diffstat (limited to 'arch/x86/boot/compressed/sev.c')
-rw-r--r--arch/x86/boot/compressed/sev.c27
1 files changed, 0 insertions, 27 deletions
diff --git a/arch/x86/boot/compressed/sev.c b/arch/x86/boot/compressed/sev.c
index 1e4930ce2c95..82079ce7be06 100644
--- a/arch/x86/boot/compressed/sev.c
+++ b/arch/x86/boot/compressed/sev.c
@@ -352,33 +352,6 @@ static struct cc_blob_sev_info *find_cc_blob_efi(struct boot_params *bp)
EFI_CC_BLOB_GUID);
}
-struct cc_setup_data {
- struct setup_data header;
- u32 cc_blob_address;
-};
-
-/*
- * Search for a Confidential Computing blob passed in as a setup_data entry
- * via the Linux Boot Protocol.
- */
-static struct cc_blob_sev_info *find_cc_blob_setup_data(struct boot_params *bp)
-{
- struct cc_setup_data *sd = NULL;
- struct setup_data *hdr;
-
- hdr = (struct setup_data *)bp->hdr.setup_data;
-
- while (hdr) {
- if (hdr->type == SETUP_CC_BLOB) {
- sd = (struct cc_setup_data *)hdr;
- return (struct cc_blob_sev_info *)(unsigned long)sd->cc_blob_address;
- }
- hdr = (struct setup_data *)hdr->next;
- }
-
- return NULL;
-}
-
/*
* Initial set up of SNP relies on information provided by the
* Confidential Computing blob, which can be passed to the boot kernel