]> xenbits.xensource.com Git - people/iwj/xen.git/commitdiff
x86: move INVPCID_TYPE_* to x86-defns.h
authorJan Beulich <jbeulich@suse.com>
Fri, 30 Aug 2019 13:21:54 +0000 (15:21 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 30 Aug 2019 13:21:54 +0000 (15:21 +0200)
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@suse.com>
Reviewed-by: Paul Durrant <paul.durrant@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/include/asm-x86/invpcid.h
xen/include/asm-x86/x86-defns.h

index edd8b68706d24eed51a9495afd7b1bcdff1af493..bf5c30313a831324af2204ebc33eef5d6781612b 100644 (file)
@@ -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_ */
index 193997bd026ba60303cce5b21520a4baff9d1416..55c0f06ab887d4c00162b2292fce51f437549b96 100644 (file)
  */
 #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__ */