[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220211210255.9820-2-mario.limonciello@amd.com>
Date: Fri, 11 Feb 2022 15:02:52 -0600
From: Mario Limonciello <mario.limonciello@....com>
To: Borislav Petkov <bp@...en8.de>,
"maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" <x86@...nel.org>
CC: Kees Cook <keescook@...omium.org>,
Thomas Lendacky <Thomas.Lendacky@....com>,
<hughsient@...il.com>,
Martin Fernandez <martin.fernandez@...ypsium.com>,
<linux-kernel@...r.kernel.org>,
"Brijesh Singh" <brijesh.singh@....com>,
Mario Limonciello <mario.limonciello@....com>
Subject: [PATCH v2 1/4] crypto: ccp: Use cc_platform_has to determine SEV presence
The CPU feature flag shouldn't be used to determine if SEV is active,
that's what `cc_platform_has` is for.
Signed-off-by: Mario Limonciello <mario.limonciello@....com>
---
drivers/crypto/ccp/sev-dev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/crypto/ccp/sev-dev.c b/drivers/crypto/ccp/sev-dev.c
index 8fd774a10edc..e061eb6a039c 100644
--- a/drivers/crypto/ccp/sev-dev.c
+++ b/drivers/crypto/ccp/sev-dev.c
@@ -1148,7 +1148,7 @@ int sev_dev_init(struct psp_device *psp)
struct sev_device *sev;
int ret = -ENOMEM;
- if (!boot_cpu_has(X86_FEATURE_SEV)) {
+ if (!cc_platform_has(CC_ATTR_GUEST_MEM_ENCRYPT)) {
dev_info_once(dev, "SEV: memory encryption not enabled by BIOS\n");
return 0;
}
--
2.34.1
Powered by blists - more mailing lists