From: Haozhong Zhang Date: Fri, 16 Dec 2016 13:43:40 +0000 (+0800) Subject: vvmx: Test vmxon with invalidly wide VMXON region address X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=8d66f9b256e86e5a8ac395681d297af8300e278e;p=people%2Fandrewcoop%2Fxen-test-framework.git vvmx: Test vmxon with invalidly wide VMXON region address 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 aa65aa2..3fe40a6 100644 --- a/tests/vvmx/vmxon.c +++ b/tests/vvmx/vmxon.c @@ -47,6 +47,18 @@ static void test_vmxon_in_user(void) check(__func__, ex, EXINFO_SYM(GP, 0)); } +/** + * vmxon with a physical address that exceeds the maximum address width + * + * Expect: VMfailInvalid + */ +static void test_vmxon_overly_wide_paddr(void) +{ + exinfo_t ex = stub_vmxon(1ULL << maxphysaddr); + + check(__func__, ex, VMERR_INVALID); +} + void test_vmxon(void) { unsigned long cr4 = read_cr4(); @@ -62,6 +74,7 @@ void test_vmxon(void) write_cr4(cr4 |= X86_CR4_VMXE); test_vmxon_in_user(); + test_vmxon_overly_wide_paddr(); } /*