On 5/12/21 7:10 AM, Kuppuswamy, Sathyanarayanan wrote:
On 5/12/21 6:00 AM, Kirill A. Shutemov wrote:
This has to be compiled only for TDX+KVM.
Got it. So if we want to remove the "C" file include, we will have to
add #ifdef CONFIG_KVM_GUEST in Makefile.
ifdef CONFIG_KVM_GUEST
obj-$(CONFIG_INTEL_TDX_GUEST) += tdx-kvm.o
#endif
Is there truly no dependency between CONFIG_KVM_GUEST and
CONFIG_INTEL_TDX_GUEST?
If there isn't, then the way we do it is adding another (invisible)
Kconfig variable to express the dependency for tdx-kvm.o:
config INTEL_TDX_GUEST_KVM
bool
depends on KVM_GUEST && INTEL_TDX_GUEST