Xen Test Framework
msr-index.h
Go to the documentation of this file.
1 
6 #ifndef XTF_X86_MSR_INDEX_H
7 #define XTF_X86_MSR_INDEX_H
8 
9 #include <xtf/numbers.h>
10 
11 #define MSR_APICBASE 0x0000001b
12 #define APICBASE_BSP (_AC(1, ULL) << 8)
13 #define APICBASE_EXTD (_AC(1, ULL) << 10)
14 #define APICBASE_ENABLE (_AC(1, ULL) << 11)
15 
16 #define MSR_FEATURE_CONTROL 0x0000003a
17 
18 #define MSR_PMC(n) (0x000000c1 + (n))
19 
20 #define MSR_INTEL_PLATFORM_INFO 0x000000ce
21 #define PLATFORM_INFO_CPUID_FAULTING (_AC(1, ULL) << 31)
22 
23 #define MSR_INTEL_MISC_FEATURES_ENABLES 0x00000140
24 #define MISC_FEATURES_CPUID_FAULTING (_AC(1, ULL) << 0)
25 
26 #define MSR_PERFEVTSEL(n) (0x00000186 + (n))
27 
28 #define MSR_MISC_ENABLE 0x000001a0
29 
30 #define MSR_DEBUGCTL 0x000001d9
31 #define DEBUGCTL_LBR (_AC(1, ULL) << 0) /* Last Branch Record */
32 #define DEBUGCTL_TR (_AC(1, ULL) << 6) /* Trace Message Enable */
33 #define DEBUGCTL_BTS (_AC(1, ULL) << 7) /* Branch Trace Store */
34 #define DEBUGCTL_BTINT (_AC(1, ULL) << 8) /* Branch Trace Interrupt */
35 
36 #define MSR_FIXED_CTR(n) (0x00000309 + (n))
37 #define MSR_PERF_CAPABILITIES 0x00000345
38 #define MSR_FIXED_CTR_CTRL 0x0000038d
39 #define MSR_PERF_GLOBAL_STATUS 0x0000038e
40 #define MSR_PERF_GLOBAL_CTRL 0x0000038f
41 #define MSR_PERF_GLOBAL_OVF_CTRL 0x00000390
42 
43 #define MSR_VMX_BASIC 0x00000480
44 
45 #define MSR_A_PMC(n) (0x000004c1 + (n))
46 
47 #define MSR_X2APIC_REGS 0x00000800
48 
49 #define MSR_EFER 0xc0000080 /* Extended Feature Enable Register */
50 #define EFER_SCE (_AC(1, ULL) << 0) /* SYSCALL Enable */
51 #define EFER_LME (_AC(1, ULL) << 8) /* Long Mode Enable */
52 #define EFER_LMA (_AC(1, ULL) << 10) /* Long Mode Active */
53 #define EFER_NXE (_AC(1, ULL) << 11) /* No Execute Enable */
54 #define EFER_SVME (_AC(1, ULL) << 12) /* Secure Virtual Machine Enable */
55 #define EFER_LMSLE (_AC(1, ULL) << 13) /* Long Mode Segment Limit Enable */
56 #define EFER_FFXSR (_AC(1, ULL) << 14) /* Fast FXSAVE/FXRSTOR */
57 #define EFER_TCE (_AC(1, ULL) << 15) /* Translation Cache Extension */
58 
59 #define MSR_STAR 0xc0000081
60 #define MSR_LSTAR 0xc0000082
61 #define MSR_CSTAR 0xc0000083
62 #define MSR_FMASK 0xc0000084
63 
64 #define MSR_FS_BASE 0xc0000100
65 #define MSR_GS_BASE 0xc0000101
66 #define MSR_SHADOW_GS_BASE 0xc0000102
67 
68 #define MSR_DR0_ADDR_MASK 0xc0011027
69 #define MSR_DR1_ADDR_MASK 0xc0011019
70 #define MSR_DR2_ADDR_MASK 0xc001101a
71 #define MSR_DR3_ADDR_MASK 0xc001101b
72 
73 #endif /* XTF_X86_MSR_INDEX_H */
74 
75 /*
76  * Local variables:
77  * mode: C
78  * c-file-style: "BSD"
79  * c-basic-offset: 4
80  * tab-width: 4
81  * indent-tabs-mode: nil
82  * End:
83  */
Primatives for number manipulation.