14 return xtf_failure(
"Fail: Fault when reading MSR_FEATURE_CONTROL\n");
17 xtf_failure(
"Fail: FEATURE_CONTROL.VMXON_INSIDE_SMX is set but SMX is not supported\n");
20 xtf_failure(
"Fail: FEATURE_CONTROL.VMXON_OUTSIDE_SMX is not set\n");
24 xtf_failure(
"Fail: FEATURE_CONTROL.LOCK is not set\n");
28 xtf_failure(
"Fail: Successfully wrote to MSR_FEATURE_CONTROL\n");
36 return xtf_failure(
"Fail: Fault when reading MSR_VMX_BASIC\n");
44 xtf_failure(
"Fail: VMCS size (%u) exceeds 4096 limit\n",
48 xtf_failure(
"Fail: Physical address width limited to 32 bits\n");
51 xtf_failure(
"Fail: Successfully wrote to MSR_VMX_BASIC\n");
void printk(const char *fmt,...)
#define MSR_FEATURE_CONTROL
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].
void xtf_failure(const char *fmt,...)
Report a test failure.
static void test_msr_feature_control(void)
static void test_msr_vmx_basic(void)