Re: [PATCH v8 04/11] x86/tdx: Add Intel ARCH support to cc_platform_has()

From: Josh Poimboeuf
Date: Tue Oct 05 2021 - 17:16:25 EST


On Mon, Oct 04, 2021 at 07:51:58PM -0700, Kuppuswamy Sathyanarayanan wrote:
> +#if defined(CONFIG_CPU_SUP_INTEL) && defined(CONFIG_ARCH_HAS_CC_PLATFORM)
> +bool intel_cc_platform_has(enum cc_attr attr);
> +#else
> +static inline bool intel_cc_platform_has(enum cc_attr attr) { return false; }
> +#endif
> +

I assume this needs a rebase on -tip since cc_platform.c already has an
empty version of this function (and it's static so it doesn't need to be
declared in a header).

> #endif /* __ASSEMBLY__ */
>
> #endif /* __X86_MEM_ENCRYPT_H__ */
> diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile
> index 159fccfece65..8e5b49be65bd 100644
> --- a/arch/x86/kernel/Makefile
> +++ b/arch/x86/kernel/Makefile
> @@ -28,6 +28,7 @@ KASAN_SANITIZE_dumpstack.o := n
> KASAN_SANITIZE_dumpstack_$(BITS).o := n
> KASAN_SANITIZE_stacktrace.o := n
> KASAN_SANITIZE_paravirt.o := n
> +KASAN_SANITIZE_cc_platform.o := n
> KASAN_SANITIZE_sev.o := n
> KASAN_SANITIZE_tdx.o := n

This change is already in -tip as well.

> + /**
> + * @CC_ATTR_GUEST_TDX: Trusted Domain Extension Support
> + *
> + * The platform/OS is running as a TDX guest/virtual machine.
> + *
> + * Examples include Intel TDX.
> + */
> + CC_ATTR_GUEST_TDX,

Examples of TDX include TDX? :-)

--
Josh