x86/HVM: reduce hvm.h include dependencies
authorJan Beulich <jbeulich@suse.com>
Tue, 17 Mar 2020 15:17:20 +0000 (16:17 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 17 Mar 2020 15:17:20 +0000 (16:17 +0100)
Drop #include-s not needed by the header itself, and add smaller scope
ones instead. Put the ones needed into whichever other files actually
need them.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Paul Durrant <paul@xen.org>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/include/asm-x86/hvm/emulate.h
xen/include/asm-x86/hvm/hvm.h
xen/include/asm-x86/hvm/vmx/vmcs.h
xen/include/asm-x86/hvm/vpt.h

index b39a1a033135bcd4f3e71b4f4c9eb09a5d85c410..2bdddef730f2872a8b0982e64c9fc972adb4ecb1 100644 (file)
@@ -13,6 +13,7 @@
 #define __ASM_X86_HVM_EMULATE_H__
 
 #include <xen/err.h>
+#include <xen/mm.h>
 #include <asm/hvm/hvm.h>
 #include <asm/x86_emulate.h>
 
index aae00a78606585b76a54405fbbd8484c8c7249ed..b007b2e343fa484f884a853471fbb08f7d2a658e 100644 (file)
 #ifndef __ASM_X86_HVM_HVM_H__
 #define __ASM_X86_HVM_HVM_H__
 
+#include <asm/alternative.h>
+#include <asm/asm_defns.h>
 #include <asm/current.h>
 #include <asm/x86_emulate.h>
 #include <asm/hvm/asid.h>
-#include <public/domctl.h>
-#include <public/hvm/save.h>
-#include <xen/mm.h>
 
 #ifdef CONFIG_HVM_FEP
 /* Permit use of the Forced Emulation Prefix in HVM guests */
@@ -326,6 +325,7 @@ int hvm_debug_op(struct vcpu *v, int32_t op);
 void hvm_toggle_singlestep(struct vcpu *v);
 void hvm_fast_singlestep(struct vcpu *v, uint16_t p2midx);
 
+struct npfec;
 int hvm_hap_nested_page_fault(paddr_t gpa, unsigned long gla,
                               struct npfec npfec);
 
index ccbe1a01cf153c012d02dea68c2ef094e2d91a4d..95c1dea7b858a10842437d0978a34c1dac3fc96e 100644 (file)
@@ -18,6 +18,8 @@
 #ifndef __ASM_X86_HVM_VMX_VMCS_H__
 #define __ASM_X86_HVM_VMX_VMCS_H__
 
+#include <xen/mm.h>
+
 extern void vmcs_dump_vcpu(struct vcpu *v);
 extern void setup_vmcs_dump(void);
 extern int  vmx_cpu_up_prepare(unsigned int cpu);
index e1114c34c5914f32a6c14f4b75914e7486d176b1..f0e0eaec8352a52aa13427db5a07e9a61d9e46cf 100644 (file)
@@ -21,6 +21,7 @@
 
 #include <xen/timer.h>
 #include <xen/list.h>
+#include <xen/rwlock.h>
 #include <asm/hvm/hvm.h>
 
 /*