Re: [PATCH v4 10/30] KVM: x86/hyperv: Eliminate an unnecessary include of x86.h in hyperv.h
From: Binbin Wu
Date: Mon Jun 15 2026 - 04:02:13 EST
On 6/13/2026 8:03 AM, Sean Christopherson wrote:
> Drop an mostly unused include of x86.h from hyperv.h, and instead pull in
^
a> regs.h, which is need for at least is_guest_mode(). This eliminates the
^
needed> last include of x86.h from a common x86 header, i.e. solidifies that x86.h
> is the top of the pyramid.
>
> Add a missing x86.h include in cpuid.c to avoid build breakage.
>
> No functional change intended.
>
> Reviewed-by: Kai Huang <kai.huang@xxxxxxxxx>
> Signed-off-by: Sean Christopherson <seanjc@xxxxxxxxxx>
Reviewed-by: Binbin Wu <binbin.wu@xxxxxxxxxxxxxxx>
> ---
> arch/x86/kvm/cpuid.c | 1 +
> arch/x86/kvm/hyperv.h | 3 ++-
> 2 files changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c
> index 591d2294acd7..2698fa42cd97 100644
> --- a/arch/x86/kvm/cpuid.c
> +++ b/arch/x86/kvm/cpuid.c
> @@ -28,6 +28,7 @@
> #include "trace.h"
> #include "pmu.h"
> #include "xen.h"
> +#include "x86.h"
>
> /*
> * Unlike "struct cpuinfo_x86.x86_capability", kvm_cpu_caps doesn't need to be
> diff --git a/arch/x86/kvm/hyperv.h b/arch/x86/kvm/hyperv.h
> index 65e89ed65349..1c8f7aaab063 100644
> --- a/arch/x86/kvm/hyperv.h
> +++ b/arch/x86/kvm/hyperv.h
> @@ -22,7 +22,8 @@
> #define __ARCH_X86_KVM_HYPERV_H__
>
> #include <linux/kvm_host.h>
> -#include "x86.h"
> +
> +#include "regs.h"
>
> #ifdef CONFIG_KVM_HYPERV
>