KVM: x86/hyperv: Eliminate an unnecessary include of x86.h in hyperv.h

Drop an mostly unused include of x86.h from hyperv.h, and instead pull in
regs.h, which is need for at least is_guest_mode().  This eliminates the
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@intel.com>
Signed-off-by: Sean Christopherson <seanjc@google.com>
Reviewed-by: Binbin Wu <binbin.wu@linux.intel.com>
Message-ID: <20260613000329.732085-11-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Sean Christopherson 2026-06-12 17:03:09 -07:00 committed by Paolo Bonzini
parent cde542b652
commit 494c42a409
2 changed files with 3 additions and 1 deletions

View File

@ -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

View File

@ -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