Skip to content

Commit

Permalink
x86/HVM: reduce hvm.h include dependencies
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Paul Durrant <[email protected]>
Reviewed-by: Kevin Tian <[email protected]>
Acked-by: Andrew Cooper <[email protected]>
  • Loading branch information
jbeulich committed Mar 17, 2020
1 parent 169e8ec commit 12f0c69
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions xen/include/asm-x86/hvm/emulate.h
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down
6 changes: 3 additions & 3 deletions xen/include/asm-x86/hvm/hvm.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down Expand Up @@ -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);

Expand Down
2 changes: 2 additions & 0 deletions xen/include/asm-x86/hvm/vmx/vmcs.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 1 addition & 0 deletions xen/include/asm-x86/hvm/vpt.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

#include <xen/timer.h>
#include <xen/list.h>
#include <xen/rwlock.h>
#include <asm/hvm/hvm.h>

/*
Expand Down

0 comments on commit 12f0c69

Please sign in to comment.