This source file includes following definitions.
- __invpcid
- invpcid_flush_one
- invpcid_flush_single_context
- invpcid_flush_all
- invpcid_flush_all_nonglobals
1
2 #ifndef _ASM_X86_INVPCID
3 #define _ASM_X86_INVPCID
4
5 static inline void __invpcid(unsigned long pcid, unsigned long addr,
6 unsigned long type)
7 {
8 struct { u64 d[2]; } desc = { { pcid, addr } };
9
10
11
12
13
14
15
16
17
18
19 asm volatile (".byte 0x66, 0x0f, 0x38, 0x82, 0x01"
20 : : "m" (desc), "a" (type), "c" (&desc) : "memory");
21 }
22
23 #define INVPCID_TYPE_INDIV_ADDR 0
24 #define INVPCID_TYPE_SINGLE_CTXT 1
25 #define INVPCID_TYPE_ALL_INCL_GLOBAL 2
26 #define INVPCID_TYPE_ALL_NON_GLOBAL 3
27
28
29 static inline void invpcid_flush_one(unsigned long pcid,
30 unsigned long addr)
31 {
32 __invpcid(pcid, addr, INVPCID_TYPE_INDIV_ADDR);
33 }
34
35
36 static inline void invpcid_flush_single_context(unsigned long pcid)
37 {
38 __invpcid(pcid, 0, INVPCID_TYPE_SINGLE_CTXT);
39 }
40
41
42 static inline void invpcid_flush_all(void)
43 {
44 __invpcid(0, 0, INVPCID_TYPE_ALL_INCL_GLOBAL);
45 }
46
47
48 static inline void invpcid_flush_all_nonglobals(void)
49 {
50 __invpcid(0, 0, INVPCID_TYPE_ALL_NON_GLOBAL);
51 }
52
53 #endif