]> xenbits.xensource.com Git - people/andrewcoop/xen-test-framework.git/commitdiff
vvmx: Test vmxon with unaligned VMXON region address
authorHaozhong Zhang <haozhong.zhang@intel.com>
Fri, 16 Dec 2016 13:43:41 +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 case.

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 3fe40a6c82a0d98e326a331be94128ff1e9f155d..fcd0869f1f7b4577c79d1f091ddf7fb36eed6e28 100644 (file)
@@ -59,6 +59,18 @@ static void test_vmxon_overly_wide_paddr(void)
     check(__func__, ex, VMERR_INVALID);
 }
 
+/**
+ * vmxon with an unaligned physical address
+ *
+ * Expect: VMfailInvalid
+ */
+static void test_vmxon_unaligned_paddr(void)
+{
+    exinfo_t ex = stub_vmxon(_u(vmxon_region_unused) | 0xff);
+
+    check(__func__, ex, VMERR_INVALID);
+}
+
 void test_vmxon(void)
 {
     unsigned long cr4 = read_cr4();
@@ -75,6 +87,7 @@ void test_vmxon(void)
 
     test_vmxon_in_user();
     test_vmxon_overly_wide_paddr();
+    test_vmxon_unaligned_paddr();
 }
 
 /*