Re: [PATCH 5/6] x86/hyperv: Support hypercalls for TDX guests

From: Dave Hansen
Date: Mon Nov 21 2022 - 15:05:12 EST


> #ifdef CONFIG_X86_64
> +#if CONFIG_INTEL_TDX_GUEST
> + if (hv_isolation_type_tdx()) {

> #ifdef CONFIG_X86_64
> +#if CONFIG_INTEL_TDX_GUEST
> + if (hv_isolation_type_tdx())

> #ifdef CONFIG_X86_64
> +#if CONFIG_INTEL_TDX_GUEST
> + if (hv_isolation_type_tdx())
> + return __tdx_ms_hv_hypercall(control, input2, input1);

See any common patterns there?

The "no #ifdef's in C files" rule would be good to apply here. Please
do one #ifdef in a header.