Xen Test Framework
tests
nested-vmx
main.c
Go to the documentation of this file.
1
11
#include "
test.h
"
12
13
const
char
test_title
[] =
"Nested VT-x testing"
;
14
15
void
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
23
test_msr_vmx
();
24
25
if
(
xtf_status_reported
() )
26
return
;
/* No point continuing if the basic MSRs aren't working. */
27
28
vmx_collect_data
();
29
30
test_vmxon
();
31
32
xtf_success
(
NULL
);
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
*/
cpu_has_vmx
#define cpu_has_vmx
Definition:
cpuid.h:78
vendor_is_intel
#define vendor_is_intel
Definition:
cpuid.h:33
test_main
void test_main(void)
To be implemented by each test, as its entry point.
Definition:
main.c:110
test_title
const char test_title[]
The title of the test.
Definition:
main.c:24
xtf_skip
void xtf_skip(const char *fmt,...)
Report a test skip.
Definition:
report.c:66
xtf_status_reported
bool xtf_status_reported(void)
Query whether a status has already been reported.
Definition:
report.c:119
xtf_warning
void xtf_warning(const char *fmt,...)
Report a test warning.
Definition:
report.c:52
xtf_success
void xtf_success(const char *fmt,...)
Report test success.
Definition:
report.c:38
NULL
#define NULL
Definition:
stddef.h:12
test_msr_vmx
void test_msr_vmx(void)
Definition:
msr.c:54
test.h
test_vmxon
void test_vmxon(void)
Definition:
vmxon.c:171
vmx_collect_data
void vmx_collect_data(void)
Collect real information about the VT-x environment, for use by test.
Definition:
util.c:55
Generated by
1.9.4