summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Christopherson <seanjc@google.com>2026-06-12 17:03:09 -0700
committerPaolo Bonzini <pbonzini@redhat.com>2026-06-24 08:13:09 -0400
commit494c42a4097ca6b31a705fa2b433a427b298de2b (patch)
tree46e47c831849a421b5d8e60686e64cae58f477e3
parentcde542b6526639571a848e1d70f8ff6817e40e4e (diff)
downloadlinux-494c42a4097ca6b31a705fa2b433a427b298de2b.tar.gz
linux-494c42a4097ca6b31a705fa2b433a427b298de2b.zip
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>
-rw-r--r--arch/x86/kvm/cpuid.c1
-rw-r--r--arch/x86/kvm/hyperv.h3
2 files changed, 3 insertions, 1 deletions
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