]> xenbits.xensource.com Git - people/andrewcoop/xen-test-framework.git/commitdiff
Bare-bones in-development test for nested VT-x
authorAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 28 Jun 2017 12:17:41 +0000 (13:17 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 28 Jun 2017 12:32:03 +0000 (13:32 +0100)
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 <andrew.cooper3@citrix.com>
docs/all-tests.dox
tests/vvmx/Makefile [new file with mode: 0644]
tests/vvmx/extra.cfg.in [new file with mode: 0644]
tests/vvmx/main.c [new file with mode: 0644]

index 7a2da3d0814ef040336aceb86c34e046f034eebd..870ad0aa76c49fb57623ae747a8346703b1d4e7a 100644 (file)
@@ -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 (file)
index 0000000..eaa12d1
--- /dev/null
@@ -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 (file)
index 0000000..ae494f8
--- /dev/null
@@ -0,0 +1 @@
+nestedhvm = 1
diff --git a/tests/vvmx/main.c b/tests/vvmx/main.c
new file mode 100644 (file)
index 0000000..1e9edd6
--- /dev/null
@@ -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 <xtf.h>
+
+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:
+ */