Re: [PATCH v6 04/11] x86/tdx: Add protected guest support for TDX guest

From: Joerg Roedel
Date: Tue Sep 28 2021 - 07:46:16 EST


On Fri, Sep 03, 2021 at 10:28:05AM -0700, Kuppuswamy Sathyanarayanan wrote:
> static inline bool prot_guest_has(unsigned int attr)
> {
> if (sme_me_mask)
> return amd_prot_guest_has(attr);
> + else if (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL)
> + return intel_prot_guest_has(attr);

This causes a function call on every Intel machine this code runs. is
there an easier to check whether TDX is enabled, like the sme_me_mask
check on AMD?