[PATCH v6 35/42] x86/compressed/64: store Confidential Computing blob address in bootparams

From: Brijesh Singh
Date: Fri Oct 08 2021 - 14:08:19 EST


From: Michael Roth <michael.roth@xxxxxxx>

When the Confidential Computing blob is located by the boot/compressed
kernel, store a pointer to it in bootparams->cc_blob_address to avoid
the need for the run-time kernel to rescan the EFI config table to find
it again.

Signed-off-by: Michael Roth <michael.roth@xxxxxxx>
Signed-off-by: Brijesh Singh <brijesh.singh@xxxxxxx>
---
arch/x86/boot/compressed/sev.c | 7 +++++++
1 file changed, 7 insertions(+)

diff --git a/arch/x86/boot/compressed/sev.c b/arch/x86/boot/compressed/sev.c
index 60885d80bf5f..9d6a2ecb609f 100644
--- a/arch/x86/boot/compressed/sev.c
+++ b/arch/x86/boot/compressed/sev.c
@@ -375,4 +375,11 @@ void snp_cpuid_init_boot(struct boot_params *bp)
/* It should be safe to read SEV MSR and check features now. */
if (!sev_snp_enabled())
sev_es_terminate(1, GHCB_TERM_CPUID);
+
+ /*
+ * Pass run-time kernel a pointer to CC info via boot_params so EFI
+ * config table doesn't need to be searched again during early startup
+ * phase.
+ */
+ bp->cc_blob_address = (u32)(unsigned long)cc_info;
}
--
2.25.1