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
This commit is contained in:
Borislav Petkov (AMD) 2025-10-30 17:59:11 +01:00
parent 92ad6505a4
commit b2c1dd6c6f
4 changed files with 3 additions and 4 deletions

View File

@ -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))

View File

@ -352,7 +352,6 @@ static enum es_result vc_read_mem(struct es_em_ctxt *ctxt,
#define sev_printk(fmt, ...) printk(fmt, ##__VA_ARGS__)
#define error(v)
#define has_cpuflag(f) boot_cpu_has(f)
#include "vc-shared.c"

View File

@ -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,

View File

@ -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