From: Haozhong Zhang Date: Fri, 16 Dec 2016 13:43:43 +0000 (+0800) Subject: vvmx: Test vmxon with bit 31 of VMCS revision ID set X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=b7972eae5aa91c72c3db2ac991b9317c88f30ff5;p=people%2Fandrewcoop%2Fxen-test-framework.git vvmx: Test vmxon with bit 31 of VMCS revision ID set VMfailInvalid is expected in this test. Signed-off-by: Haozhong Zhang Rebase and cleanup. Signed-off-by: Andrew Cooper --- diff --git a/tests/vvmx/vmxon.c b/tests/vvmx/vmxon.c index 4fe68e2..8b92d5d 100644 --- a/tests/vvmx/vmxon.c +++ b/tests/vvmx/vmxon.c @@ -84,6 +84,19 @@ static void test_vmxon_mismatched_revid(void) check(__func__, ex, VMERR_INVALID); } +/** + * vmxon with VMCS revision ID[31] set + * + * Expect: VMfailInvalid + */ +static void test_vmxon_revid_bit31(void) +{ + clear_vmcs(vmxon_region_unused, vmcs_revid | (1UL << 31)); + exinfo_t ex = stub_vmxon(_u(vmxon_region_unused)); + + check(__func__, ex, VMERR_INVALID); +} + void test_vmxon(void) { unsigned long cr4 = read_cr4(); @@ -102,6 +115,7 @@ void test_vmxon(void) test_vmxon_overly_wide_paddr(); test_vmxon_unaligned_paddr(); test_vmxon_mismatched_revid(); + test_vmxon_revid_bit31(); } /*