diff mbox series

[v3,09/14] x86/vmx: remove unused included headers from vmx.h

Message ID 20230224185010.3692754-10-burzalodowa@gmail.com (mailing list archive)
State New, archived
Headers show
Series x86/hvm: {svm,vmx} {c,h} cleanup | expand

Commit Message

Xenia Ragiadakou Feb. 24, 2023, 6:50 p.m. UTC
Do not include the headers:
  asm/i387.h
  asm/hvm/trace.h
  asm/processor.h
  asm/regs.h
because none of the declarations and macro definitions in them is used in
this file. Sort the rest of the headers alphabetically.
Include asm/i387.h in vmx.c, needed for vcpu_restore_fpu_lazy().

Take the opportunity to include xen/types.h in the place of asm/types.h and
replace u* with uint*_t and bool_t with bool.

No functional change intended.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
---

Changes in v3:
  - reword the commit message to not look like a bug fix, reported by JAn
  - include xen/types.h instead of asm/types.h and use uint*_t instead of u*,
    suggested by Jan

 xen/arch/x86/hvm/vmx/vmx.c             |  1 +
 xen/arch/x86/include/asm/hvm/vmx/vmx.h | 15 ++++++---------
 2 files changed, 7 insertions(+), 9 deletions(-)
diff mbox series

Patch

diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c
index 294c8490b4..232107bd79 100644
--- a/xen/arch/x86/hvm/vmx/vmx.c
+++ b/xen/arch/x86/hvm/vmx/vmx.c
@@ -43,6 +43,7 @@ 
 #include <asm/hvm/vmx/vmcs.h>
 #include <public/sched.h>
 #include <public/hvm/ioreq.h>
+#include <asm/i387.h>
 #include <asm/hvm/vpic.h>
 #include <asm/hvm/vlapic.h>
 #include <asm/x86_emulate.h>
diff --git a/xen/arch/x86/include/asm/hvm/vmx/vmx.h b/xen/arch/x86/include/asm/hvm/vmx/vmx.h
index 82a9487b40..f5720c393c 100644
--- a/xen/arch/x86/include/asm/hvm/vmx/vmx.h
+++ b/xen/arch/x86/include/asm/hvm/vmx/vmx.h
@@ -19,20 +19,17 @@ 
 #define __ASM_X86_HVM_VMX_VMX_H__
 
 #include <xen/sched.h>
-#include <asm/types.h>
-#include <asm/regs.h>
+#include <xen/types.h>
+
 #include <asm/asm_defns.h>
-#include <asm/processor.h>
-#include <asm/p2m.h>
-#include <asm/i387.h>
-#include <asm/hvm/trace.h>
 #include <asm/hvm/vmx/vmcs.h>
+#include <asm/p2m.h>
 
 extern int8_t opt_ept_exec_sp;
 
 typedef union {
     struct {
-        u64 r       :   1,  /* bit 0 - Read permission */
+        uint64_t r  :   1,  /* bit 0 - Read permission */
         w           :   1,  /* bit 1 - Write permission */
         x           :   1,  /* bit 2 - Execute permission */
         emt         :   3,  /* bits 5:3 - EPT Memory type */
@@ -49,7 +46,7 @@  typedef union {
         _rsvd       :   1,  /* bit 62 - reserved */
         suppress_ve :   1;  /* bit 63 - suppress #VE */
     };
-    u64 epte;
+    uint64_t epte;
 } ept_entry_t;
 
 typedef struct {
@@ -595,7 +592,7 @@  void vmx_inject_extint(int trap, uint8_t source);
 void vmx_inject_nmi(void);
 
 void ept_walk_table(struct domain *d, unsigned long gfn);
-bool_t ept_handle_misconfig(uint64_t gpa);
+bool ept_handle_misconfig(uint64_t gpa);
 int epte_get_entry_emt(struct domain *d, gfn_t gfn, mfn_t mfn,
                        unsigned int order, bool *ipat, p2m_type_t type);
 void setup_ept_dump(void);