Xen Test Framework
main.c
Go to the documentation of this file.
1
11#include "test.h"
12
13const char test_title[] = "Nested VT-x testing";
14
15void test_main(void)
16{
17 if ( !cpu_has_vmx )
18 return xtf_skip("Skip: VT-x not available\n");
19
20 if ( !vendor_is_intel )
21 xtf_warning("Warning: VT-x found on non-Intel processor\n");
22
24
25 if ( xtf_status_reported() )
26 return; /* No point continuing if the basic MSRs aren't working. */
27
29
30 test_vmxon();
31
33}
34
35/*
36 * Local variables:
37 * mode: C
38 * c-file-style: "BSD"
39 * c-basic-offset: 4
40 * tab-width: 4
41 * indent-tabs-mode: nil
42 * End:
43 */
#define cpu_has_vmx
Definition: cpuid.h:78
#define vendor_is_intel
Definition: cpuid.h:33
void test_main(void)
To be implemented by each test, as its entry point.
Definition: main.c:110
const char test_title[]
The title of the test.
Definition: main.c:24
void xtf_skip(const char *fmt,...)
Report a test skip.
Definition: report.c:66
bool xtf_status_reported(void)
Query whether a status has already been reported.
Definition: report.c:119
void xtf_warning(const char *fmt,...)
Report a test warning.
Definition: report.c:52
void xtf_success(const char *fmt,...)
Report test success.
Definition: report.c:38
#define NULL
Definition: stddef.h:12
void test_msr_vmx(void)
Definition: msr.c:54
void test_vmxon(void)
Definition: vmxon.c:171
void vmx_collect_data(void)
Collect real information about the VT-x environment, for use by test.
Definition: util.c:55