[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen staging] x86: move INVPCID_TYPE_* to x86-defns.h



commit 6e2ea60524b51b1eacff38d15c49efc5e7f2c3b4
Author:     Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Fri Aug 30 15:21:54 2019 +0200
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Fri Aug 30 15:21:54 2019 +0200

    x86: move INVPCID_TYPE_* to x86-defns.h
    
    This way the insn emulator can then too use the #define-s. In place of
    the TYPE infix add an X86 prefix.
    
    Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
    Reviewed-by: Paul Durrant <paul.durrant@xxxxxxxxxx>
    Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
 xen/include/asm-x86/invpcid.h   | 13 ++++---------
 xen/include/asm-x86/x86-defns.h |  8 ++++++++
 2 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/xen/include/asm-x86/invpcid.h b/xen/include/asm-x86/invpcid.h
index edd8b68706..bf5c30313a 100644
--- a/xen/include/asm-x86/invpcid.h
+++ b/xen/include/asm-x86/invpcid.h
@@ -5,11 +5,6 @@
 
 extern bool use_invpcid;
 
-#define INVPCID_TYPE_INDIV_ADDR      0
-#define INVPCID_TYPE_SINGLE_CTXT     1
-#define INVPCID_TYPE_ALL_INCL_GLOBAL 2
-#define INVPCID_TYPE_ALL_NON_GLOBAL  3
-
 #define INVPCID_OPCODE ".byte 0x66, 0x0f, 0x38, 0x82\n"
 #define MODRM_ECX_01   ".byte 0x01\n"
 
@@ -38,25 +33,25 @@ static inline void invpcid(unsigned int pcid, unsigned long 
addr,
 /* Flush all mappings for a given PCID and addr, not including globals */
 static inline void invpcid_flush_one(unsigned int pcid, unsigned long addr)
 {
-    invpcid(pcid, addr, INVPCID_TYPE_INDIV_ADDR);
+    invpcid(pcid, addr, X86_INVPCID_INDIV_ADDR);
 }
 
 /* Flush all mappings for a given PCID, not including globals */
 static inline void invpcid_flush_single_context(unsigned int pcid)
 {
-    invpcid(pcid, 0, INVPCID_TYPE_SINGLE_CTXT);
+    invpcid(pcid, 0, X86_INVPCID_SINGLE_CTXT);
 }
 
 /* Flush all mappings, including globals, for all PCIDs */
 static inline void invpcid_flush_all(void)
 {
-    invpcid(0, 0, INVPCID_TYPE_ALL_INCL_GLOBAL);
+    invpcid(0, 0, X86_INVPCID_ALL_INCL_GLOBAL);
 }
 
 /* Flush all mappings for all PCIDs, excluding globals */
 static inline void invpcid_flush_all_nonglobals(void)
 {
-    invpcid(0, 0, INVPCID_TYPE_ALL_NON_GLOBAL);
+    invpcid(0, 0, X86_INVPCID_ALL_NON_GLOBAL);
 }
 
 #endif /* _ASM_X86_INVPCID_H_ */
diff --git a/xen/include/asm-x86/x86-defns.h b/xen/include/asm-x86/x86-defns.h
index 193997bd02..55c0f06ab8 100644
--- a/xen/include/asm-x86/x86-defns.h
+++ b/xen/include/asm-x86/x86-defns.h
@@ -108,4 +108,12 @@
  */
 #define X86_DR7_DEFAULT         0x00000400  /* Default %dr7 value. */
 
+/*
+ * Invalidation types for the INVPCID instruction.
+ */
+#define X86_INVPCID_INDIV_ADDR      0
+#define X86_INVPCID_SINGLE_CTXT     1
+#define X86_INVPCID_ALL_INCL_GLOBAL 2
+#define X86_INVPCID_ALL_NON_GLOBAL  3
+
 #endif /* __XEN_X86_DEFNS_H__ */
--
generated by git-patchbot for /home/xen/git/xen.git#staging

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.