From: "tip-bot2 for Borislav Petkov (AMD)" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: "Borislav Petkov (AMD)" <bp@alien8.de>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: x86/sev] x86/coco/sev: Convert has_cpuflag() to use cpu_feature_enabled()
Date: Tue, 11 Nov 2025 16:04:49 -0000 [thread overview]
Message-ID: <176287708918.498.7568806227528588666.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20251031122122.GKaQSpwhLvkinKKbjG@fat_crate.local>
The following commit has been merged into the x86/sev branch of tip:
Commit-ID: b2c1dd6c6f70a5a519532227358c82d4cfda5b36
Gitweb: https://git.kernel.org/tip/b2c1dd6c6f70a5a519532227358c82d4cfda5b36
Author: Borislav Petkov (AMD) <bp@alien8.de>
AuthorDate: Thu, 30 Oct 2025 17:59:11 +01:00
Committer: Borislav Petkov (AMD) <bp@alien8.de>
CommitterDate: Tue, 11 Nov 2025 16:42:31 +01:00
x86/coco/sev: Convert has_cpuflag() to use cpu_feature_enabled()
Drop one redundant definition, while at it.
There should be no functional changes.
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Link: https://patch.msgid.link/20251031122122.GKaQSpwhLvkinKKbjG@fat_crate.local
---
arch/x86/boot/startup/sev-shared.c | 2 +-
arch/x86/coco/sev/vc-handle.c | 1 -
arch/x86/coco/sev/vc-shared.c | 2 +-
arch/x86/lib/kaslr.c | 2 +-
4 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/arch/x86/boot/startup/sev-shared.c b/arch/x86/boot/startup/sev-shared.c
index 4e22ffd..a0fa8bb 100644
--- a/arch/x86/boot/startup/sev-shared.c
+++ b/arch/x86/boot/startup/sev-shared.c
@@ -12,7 +12,7 @@
#include <asm/setup_data.h>
#ifndef __BOOT_COMPRESSED
-#define has_cpuflag(f) boot_cpu_has(f)
+#define has_cpuflag(f) cpu_feature_enabled(f)
#else
#undef WARN
#define WARN(condition, format...) (!!(condition))
diff --git a/arch/x86/coco/sev/vc-handle.c b/arch/x86/coco/sev/vc-handle.c
index 7fc136a..f08c750 100644
--- a/arch/x86/coco/sev/vc-handle.c
+++ b/arch/x86/coco/sev/vc-handle.c
@@ -352,7 +352,6 @@ fault:
#define sev_printk(fmt, ...) printk(fmt, ##__VA_ARGS__)
#define error(v)
-#define has_cpuflag(f) boot_cpu_has(f)
#include "vc-shared.c"
diff --git a/arch/x86/coco/sev/vc-shared.c b/arch/x86/coco/sev/vc-shared.c
index e2ac95d..58b2f98 100644
--- a/arch/x86/coco/sev/vc-shared.c
+++ b/arch/x86/coco/sev/vc-shared.c
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-2.0
#ifndef __BOOT_COMPRESSED
-#define has_cpuflag(f) boot_cpu_has(f)
+#define has_cpuflag(f) cpu_feature_enabled(f)
#endif
static enum es_result vc_check_opcode_bytes(struct es_em_ctxt *ctxt,
diff --git a/arch/x86/lib/kaslr.c b/arch/x86/lib/kaslr.c
index b589392..8c7cd11 100644
--- a/arch/x86/lib/kaslr.c
+++ b/arch/x86/lib/kaslr.c
@@ -22,7 +22,7 @@
#include <asm/setup.h>
#define debug_putstr(v) early_printk("%s", v)
-#define has_cpuflag(f) boot_cpu_has(f)
+#define has_cpuflag(f) cpu_feature_enabled(f)
#define get_boot_seed() kaslr_offset()
#endif
prev parent reply other threads:[~2025-11-11 16:04 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-24 20:08 [PATCH v3 0/2] Support for SEV-ES guest shadow stack John Allen
2025-09-24 20:08 ` [PATCH v3 1/2] x86/boot: Move boot_*msr helpers to asm/shared/msr.h John Allen
2025-10-31 12:22 ` [tip: x86/sev] " tip-bot2 for John Allen
2025-09-24 20:08 ` [PATCH v3 2/2] x86/sev-es: Include XSS value in GHCB CPUID request John Allen
2025-09-24 23:02 ` Dave Hansen
2025-09-26 19:22 ` John Allen
2025-10-31 12:21 ` [PATCH] x86/coco/sev: Convert has_cpuflag() to use cpu_feature_enabled() Borislav Petkov
2025-11-11 16:04 ` tip-bot2 for Borislav Petkov (AMD) [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=176287708918.498.7568806227528588666.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=bp@alien8.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®