x86/cc: Add cc_platform_set/_clear() helpers
authorBorislav Petkov (AMD) <bp@alien8.de>
Wed, 27 Mar 2024 15:43:16 +0000 (16:43 +0100)
committerBorislav Petkov (AMD) <bp@alien8.de>
Thu, 4 Apr 2024 08:40:27 +0000 (10:40 +0200)
commitbc6f707fc0feec72acc2f49c312eb31d257363a3
tree055067786022d9a19eaf61eaa4b9a0a2a46992bd
parent54f5f47b6055c6b57cbc41a440f8ca8b2ec4275a
x86/cc: Add cc_platform_set/_clear() helpers

Add functionality to set and/or clear different attributes of the
machine as a confidential computing platform. Add the first one too:
whether the machine is running as a host for SEV-SNP guests.

Fixes: 216d106c7ff7 ("x86/sev: Add SEV-SNP host initialization support")
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com>
Tested-by: Srikanth Aithal <sraithal@amd.com>
Link: https://lore.kernel.org/r/20240327154317.29909-5-bp@alien8.de
arch/x86/coco/core.c
include/linux/cc_platform.h