Lines Matching refs:msr
19 struct msr reg;
20 struct msr __percpu *msrs;
66 extern void do_trace_write_msr(unsigned int msr, u64 val, int failed);
67 extern void do_trace_read_msr(unsigned int msr, u64 val, int failed);
68 extern void do_trace_rdpmc(unsigned int msr, u64 val, int failed);
70 static inline void do_trace_write_msr(unsigned int msr, u64 val, int failed) {} in do_trace_write_msr() argument
71 static inline void do_trace_read_msr(unsigned int msr, u64 val, int failed) {} in do_trace_read_msr() argument
72 static inline void do_trace_rdpmc(unsigned int msr, u64 val, int failed) {} in do_trace_rdpmc() argument
82 static __always_inline unsigned long long __rdmsr(unsigned int msr) in __rdmsr() argument
89 : EAX_EDX_RET(val, low, high) : "c" (msr)); in __rdmsr()
94 static __always_inline void __wrmsr(unsigned int msr, u32 low, u32 high) in __wrmsr() argument
99 : : "c" (msr), "a"(low), "d" (high) : "memory"); in __wrmsr()
102 #define native_rdmsr(msr, val1, val2) \ argument
104 u64 __val = __rdmsr((msr)); \
109 #define native_wrmsr(msr, low, high) \ argument
110 __wrmsr(msr, low, high)
112 #define native_wrmsrl(msr, val) \ argument
113 __wrmsr((msr), (u32)((u64)(val)), \
116 static inline unsigned long long native_read_msr(unsigned int msr) in native_read_msr() argument
120 val = __rdmsr(msr); in native_read_msr()
123 do_trace_read_msr(msr, val, 0); in native_read_msr()
128 static inline unsigned long long native_read_msr_safe(unsigned int msr, in native_read_msr_safe() argument
137 : "c" (msr)); in native_read_msr_safe()
139 do_trace_read_msr(msr, EAX_EDX_VAL(val, low, high), *err); in native_read_msr_safe()
145 native_write_msr(unsigned int msr, u32 low, u32 high) in native_write_msr() argument
147 __wrmsr(msr, low, high); in native_write_msr()
150 do_trace_write_msr(msr, ((u64)high << 32 | low), 0); in native_write_msr()
155 native_write_msr_safe(unsigned int msr, u32 low, u32 high) in native_write_msr_safe() argument
163 : "c" (msr), "0" (low), "d" (high) in native_write_msr_safe()
166 do_trace_write_msr(msr, ((u64)high << 32 | low), err); in native_write_msr_safe()
247 #define rdmsr(msr, low, high) \ argument
249 u64 __val = native_read_msr((msr)); \
254 static inline void wrmsr(unsigned int msr, u32 low, u32 high) in wrmsr() argument
256 native_write_msr(msr, low, high); in wrmsr()
259 #define rdmsrl(msr, val) \ argument
260 ((val) = native_read_msr((msr)))
262 static inline void wrmsrl(unsigned int msr, u64 val) in wrmsrl() argument
264 native_write_msr(msr, (u32)(val & 0xffffffffULL), (u32)(val >> 32)); in wrmsrl()
268 static inline int wrmsr_safe(unsigned int msr, u32 low, u32 high) in wrmsr_safe() argument
270 return native_write_msr_safe(msr, low, high); in wrmsr_safe()
274 #define rdmsr_safe(msr, low, high) \ argument
277 u64 __val = native_read_msr_safe((msr), &__err); \
283 static inline int rdmsrl_safe(unsigned int msr, unsigned long long *p) in rdmsrl_safe() argument
287 *p = native_read_msr_safe(msr, &err); in rdmsrl_safe()
306 static __always_inline void wrmsrns(u32 msr, u64 val) in wrmsrns() argument
314 : : "c" (msr), "a" ((u32)val), "d" ((u32)(val >> 32))); in wrmsrns()
320 static inline int wrmsrl_safe(u32 msr, u64 val) in wrmsrl_safe() argument
322 return wrmsr_safe(msr, (u32)val, (u32)(val >> 32)); in wrmsrl_safe()
325 struct msr __percpu *msrs_alloc(void);
326 void msrs_free(struct msr __percpu *msrs);
327 int msr_set_bit(u32 msr, u8 bit);
328 int msr_clear_bit(u32 msr, u8 bit);
335 void rdmsr_on_cpus(const struct cpumask *mask, u32 msr_no, struct msr __percpu *msrs);
336 void wrmsr_on_cpus(const struct cpumask *mask, u32 msr_no, struct msr __percpu *msrs);
365 struct msr __percpu *msrs) in rdmsr_on_cpus()
370 struct msr __percpu *msrs) in wrmsr_on_cpus()