check(__func__, ex, VMERR_SUCCESS);
}
+/**
+ * vmxon in VMX root w/ CPL = 0 and w/o current VMCS
+ *
+ * Expect: VMfailInvalid
+ */
+static void test_vmxon_novmcs_in_root_cpl0(void)
+{
+ clear_vmcs(vmxon_region_unused, vmcs_revid);
+ exinfo_t ex = stub_vmxon(_u(vmxon_region_unused));
+
+ check(__func__, ex, VMERR_INVALID);
+}
+
void test_vmxon(void)
{
unsigned long cr4 = read_cr4();
test_vmxon_correct();
/* Test should now be operating in VMX Root mode. */
+
+ test_vmxon_novmcs_in_root_cpl0();
}
/*