From: Haozhong Zhang Date: Fri, 16 Dec 2016 13:43:41 +0000 (+0800) Subject: vvmx: Test vmxon with unaligned VMXON region address X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=22ab93d80656d22ebe61ec953ddb07d19003d9c1;p=people%2Fandrewcoop%2Fxen-test-framework.git vvmx: Test vmxon with unaligned VMXON region address VMfailInvalid is expected in this case. 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 3fe40a6..fcd0869 100644 --- a/tests/vvmx/vmxon.c +++ b/tests/vvmx/vmxon.c @@ -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(); } /*