mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] x86/coco: Replace cc_attr_flags with a bool
@ 2026-09-02  0:06 Thorsten Blum
  2026-09-02  0:57 ` Borislav Petkov
  0 siblings, 1 reply; 4+ messages in thread
From: Thorsten Blum @ 2026-09-02  0:06 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86,
	H. Peter Anvin
  Cc: Thorsten Blum, linux-kernel

The cc_attr_flags structure contains only the host_sev_snp bit. Replace
the structure with a bool.

No functional change.

Signed-off-by: Thorsten Blum <blum@kernel.org>
---
 arch/x86/coco/core.c | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/arch/x86/coco/core.c b/arch/x86/coco/core.c
index 418ec77bbe3a..8c1842a29f44 100644
--- a/arch/x86/coco/core.c
+++ b/arch/x86/coco/core.c
@@ -22,10 +22,7 @@ SYM_PIC_ALIAS(cc_vendor);
 u64 cc_mask __ro_after_init;
 SYM_PIC_ALIAS(cc_mask);
 
-static struct cc_attr_flags {
-	__u64 host_sev_snp	: 1,
-	      __resv		: 63;
-} cc_flags;
+static bool cc_host_sev_snp;
 
 static bool noinstr intel_cc_platform_has(enum cc_attr attr)
 {
@@ -103,7 +100,7 @@ static bool noinstr amd_cc_platform_has(enum cc_attr attr)
 		return sev_status & MSR_AMD64_SNP_SECURE_TSC;
 
 	case CC_ATTR_HOST_SEV_SNP:
-		return cc_flags.host_sev_snp;
+		return cc_host_sev_snp;
 
 	case CC_ATTR_SNP_SECURE_AVIC:
 		return sev_status & MSR_AMD64_SNP_SECURE_AVIC;
@@ -169,7 +166,7 @@ static void amd_cc_platform_clear(enum cc_attr attr)
 {
 	switch (attr) {
 	case CC_ATTR_HOST_SEV_SNP:
-		cc_flags.host_sev_snp = 0;
+		cc_host_sev_snp = false;
 		break;
 	default:
 		break;
@@ -191,7 +188,7 @@ static void amd_cc_platform_set(enum cc_attr attr)
 {
 	switch (attr) {
 	case CC_ATTR_HOST_SEV_SNP:
-		cc_flags.host_sev_snp = 1;
+		cc_host_sev_snp = true;
 		break;
 	default:
 		break;

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-09-02 15:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-02  0:06 [PATCH] x86/coco: Replace cc_attr_flags with a bool Thorsten Blum
2026-09-02  0:57 ` Borislav Petkov
2026-09-02  9:53   ` Thorsten Blum
2026-09-02 15:37     ` Borislav Petkov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®