Re: [PATCH v5 09/12] x86/tdx: Wire up KVM hypercalls
From: Borislav Petkov
Date: Tue Aug 24 2021 - 15:38:49 EST
On Tue, Aug 24, 2021 at 12:11:00PM -0700, Kuppuswamy, Sathyanarayanan wrote:
> If the TDX code is complied for another hypervior, we need some config to
> disable above the above code.
Isn't that what CONFIG_KVM_GUEST is for?
Also, if they don't get used anywhere, the compiler will simply discard
them. I still don't see the need for the ifdeffery.
> Following is the error info.
>
> WARNING: modpost: EXPORT symbol "__tdx_hypercall" [vmlinux] version
> generation failed, symbol will not be versioned.
>
> So to fix the above issue, added tdx.h in arch/x86/include/asm/asm-prototypes.h
You need the C-style declaration of __tdx_hypercall, see
334bb7738764 ("x86/kbuild: enable modversions for symbols exported from asm")
and you can do the include without the ifdeffery.
And also state in the commit message why you're including it.
Thx.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette