]> xenbits.xensource.com Git - people/andrewcoop/xen-test-framework.git/commitdiff
vvmx: Test vmxon with bit 31 of VMCS revision ID set
authorHaozhong Zhang <haozhong.zhang@intel.com>
Fri, 16 Dec 2016 13:43:43 +0000 (21:43 +0800)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 30 Jun 2017 09:21:43 +0000 (10:21 +0100)
VMfailInvalid is expected in this test.

Signed-off-by: Haozhong Zhang <haozhong.zhang@intel.com>
Rebase and cleanup.
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
tests/vvmx/vmxon.c

index 4fe68e26367f5023728826646d8c615fc3fc4168..8b92d5d0daa833d6f9585aac1c452cea2bf939c4 100644 (file)
@@ -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();
 }
 
 /*