Re: [PATCH v7 05/22] x86/sev: Move GHCB page based HV communication out of startup code

Borislav Petkov
2025-08-31T10:50:09Z

On Thu, Aug 28, 2025 at 12:22:08PM +0200, Ard Biesheuvel wrote:
> diff --git a/arch/x86/boot/startup/sev-shared.c b/arch/x86/boot/startup/sev-shared.c
> index 83c222a4f1fa..24cbeaf7ff4f 100644
> --- a/arch/x86/boot/startup/sev-shared.c
> +++ b/arch/x86/boot/startup/sev-shared.c
> @@ -13,12 +13,9 @@
>
> #ifndef __BOOT_COMPRESSED
> #define error(v) pr_err(v)
> -#define has_cpuflag(f) boot_cpu_has(f)

In file included from arch/x86/boot/startup/sev-startup.c:106:
arch/x86/boot/startup/sev-shared.c: In function ‘pvalidate_4k_page’:
arch/x86/boot/startup/sev-shared.c:661:26: error: implicit declaration of function ‘has_cpuflag’ [-Wimplicit-function-declaration]
661 | if (validate && !has_cpuflag(X86_FEATURE_COHERENCY_SFW_NO))
| ^~~~~~~~~~~
make[3]: *** [scripts/Makefile.build:287: arch/x86/boot/startup/sev-startup.o] Error 1
make[2]: *** [scripts/Makefile.build:556: arch/x86/boot/startup] Error 2
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [/mnt/kernel/kernel/linux/Makefile:2011: .] Error 2
make: *** [Makefile:248: __sub-make] Error 2

We probably will have to use the CPUID MSR protocol thing here or so...

--
Regards/Gruss,
Boris.