diff mbox series

[v2,8/9] x86/HVM: reduce hvm.h include dependencies

Message ID f84b99c1-3b9c-2886-5733-845b19c0c1e4@suse.com (mailing list archive)
State Superseded
Headers show
Series x86: reduce include dependencies | expand

Commit Message

Jan Beulich March 10, 2020, 3:51 p.m. UTC
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>
---
v2: Also make things build with PV_SHIM_EXCLUSIVE=y.

Comments

Paul Durrant March 10, 2020, 4:13 p.m. UTC | #1
> -----Original Message-----
> From: Jan Beulich <jbeulich@suse.com>
> Sent: 10 March 2020 15:52
> To: xen-devel@lists.xenproject.org
> Cc: Andrew Cooper <andrew.cooper3@citrix.com>; Wei Liu <wl@xen.org>; Roger Pau Monné
> <roger.pau@citrix.com>; Paul Durrant <paul@xen.org>; Kevin Tian <kevin.tian@intel.com>; Jun Nakajima
> <jun.nakajima@intel.com>
> Subject: [PATCH v2 8/9] x86/HVM: reduce hvm.h include dependencies
> 
> 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>
Tian, Kevin March 13, 2020, 1:48 a.m. UTC | #2
> From: Jan Beulich <jbeulich@suse.com>
> Sent: Tuesday, March 10, 2020 11:52 PM
> 
> 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: Kevin Tian <kevin.tian@intel.com>
diff mbox series

Patch

--- a/xen/include/asm-x86/hvm/emulate.h
+++ b/xen/include/asm-x86/hvm/emulate.h
@@ -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>
 
--- a/xen/include/asm-x86/hvm/hvm.h
+++ b/xen/include/asm-x86/hvm/hvm.h
@@ -20,12 +20,11 @@ 
 #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
 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);
 
--- a/xen/include/asm-x86/hvm/vmx/vmcs.h
+++ b/xen/include/asm-x86/hvm/vmx/vmcs.h
@@ -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);
--- a/xen/include/asm-x86/hvm/vpt.h
+++ b/xen/include/asm-x86/hvm/vpt.h
@@ -21,6 +21,7 @@ 
 
 #include <xen/timer.h>
 #include <xen/list.h>
+#include <xen/rwlock.h>
 #include <asm/hvm/hvm.h>
 
 /*