From: Andrew Cooper Date: Wed, 28 Jun 2017 12:17:41 +0000 (+0100) Subject: Bare-bones in-development test for nested VT-x X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=b8021169a0a8611d9552b6b24e3250769e5064eb;p=people%2Fandrewcoop%2Fxen-test-framework.git Bare-bones in-development test for nested VT-x Based loosely on previous work from Haozhong Zhang, but rebased over substantial upstream development work, altered to be more consistent with existing tests, and extended to all HVM environments (rather than just hvm64) to cover more test scenarios. Signed-off-by: Andrew Cooper --- diff --git a/docs/all-tests.dox b/docs/all-tests.dox index 7a2da3d..870ad0a 100644 --- a/docs/all-tests.dox +++ b/docs/all-tests.dox @@ -102,4 +102,9 @@ guest breakout. @subpage test-fep - Test availability of HVM Forced Emulation Prefix. @subpage test-msr - Print MSR information. + + +@section index-in-development In Development + +@subpage test-vvmx - Nested VT-x tests. */ diff --git a/tests/vvmx/Makefile b/tests/vvmx/Makefile new file mode 100644 index 0000000..eaa12d1 --- /dev/null +++ b/tests/vvmx/Makefile @@ -0,0 +1,11 @@ +include $(ROOT)/build/common.mk + +NAME := vvmx +CATEGORY := in-development +TEST-ENVS := $(HVM_ENVIRONMENTS) + +TEST-EXTRA-CFG := extra.cfg.in + +obj-perenv += main.o + +include $(ROOT)/build/gen.mk diff --git a/tests/vvmx/extra.cfg.in b/tests/vvmx/extra.cfg.in new file mode 100644 index 0000000..ae494f8 --- /dev/null +++ b/tests/vvmx/extra.cfg.in @@ -0,0 +1 @@ +nestedhvm = 1 diff --git a/tests/vvmx/main.c b/tests/vvmx/main.c new file mode 100644 index 0000000..1e9edd6 --- /dev/null +++ b/tests/vvmx/main.c @@ -0,0 +1,34 @@ +/** + * @file tests/vvmx/main.c + * @ref test-vvmx + * + * @page test-vvmx vvmx + * + * Functional testing of the VMX features in a nested-virt environment. + * + * @see tests/vvmx/main.c + */ +#include + +const char test_title[] = "Test vvmx"; + +void test_main(void) +{ + if ( !cpu_has_vmx ) + return xtf_skip("Skip: VT-x not available\n"); + + if ( !vendor_is_intel ) + xtf_warning("Warning: VT-x found on non-Intel processor\n"); + + xtf_success(NULL); +} + +/* + * Local variables: + * mode: C + * c-file-style: "BSD" + * c-basic-offset: 4 + * tab-width: 4 + * indent-tabs-mode: nil + * End: + */