23 asm volatile (
"rdmsr":
"=a" (lo),
"=d" (hi):
"c" (idx));
39 asm volatile (
"1: rdmsr; 2:"
41 :
"=a" (lo),
"=d" (hi),
"=c" (new_idx)
44 bool fault = idx != new_idx;
57 asm volatile (
"wrmsr":
73 asm volatile (
"1: wrmsr; 2:"
80 return idx != new_idx;
bool ex_wrmsr_safe(struct cpu_regs *regs, const struct extable_entry *ex)
Fixup from a wrmsr fault.
bool ex_rdmsr_safe(struct cpu_regs *regs, const struct extable_entry *ex)
Fixup from a rdmsr fault.
#define _ASM_EXTABLE_HANDLER(fault, fixup, handler)
Create an exception table entry with custom handler.
union msr_vmx_basic msr_vmx_basic_t
union msr_feature_control msr_feature_control_t
static uint64_t rdmsr(uint32_t idx)
Thin wrapper around an rdmsr instruction.
void xtf_msr_consistency_test(const struct xtf_msr_consistency_test_data *t)
Run consistency tests as described by t.
static void wrmsr(uint32_t idx, uint64_t val)
Thin wrapper around an wrmsr instruction.
static bool wrmsr_safe(uint32_t idx, uint64_t val)
Wrapper around wrmsr which safely catches #GP[0].
static bool rdmsr_safe(uint32_t idx, uint64_t *val)
Wrapper around rdmsr which safely catches #GP[0].
const struct xtf_msr_consistency_test_data::xtf_msr_consistency_test_vals * vals
Common declarations for all tests.