Patches 1-6 split out the VMX tests into their own unit tests. Patches 7-12 add new VMX unit tests. Patches 13-17 implement a new VMX test framework ("v2"). Instead of registering a main function and an exit handler, entering and exiting guest mode is accomplished by calling a function, enter_guest(). Patches 18-22 add some assert and printf enhancements to lib/. Patches 23-32 add EPT access tests, using the v2 framework. 4 of the EPT access tests reveal KVM bugs (4.11-rc6, on a Haswell CPU): vmx_ept_access_test_execute_only vmx_ept_access_test_paddr_not_present_ad_disabled vmx_ept_access_test_paddr_read_only_ad_disabled vmx_ept_access_test_paddr_read_execute_ad_disabled The rest of the new tests in this series pass. David Matlack (8): x86: move basic vmx tests into separate test cases x86: add missing vmx test cases to unittests.cfg x86: vmx: filter exit_monitor_from_l2_test from full vmx test x86: basic vmwrite/vmread test x86: vmcs lifecycle test x86: test VMCS in memory after VMCLEAR x86: test VMPTRLD does not drop VMWRITEs lib: add report_pass GanShun (1): x86: Adding gtest to check correct instruction error is returned Peter Feiner (23): x86: add test filter to vmx.flat. x86: add config for each vmx unit test case lib: better test name filtering x86: test exit while vmcs02 is loaded x86: don't special case vmx null test x86: factor out vmx_enter_guest x86: binstr utility function x86: vmx exit reason descriptions x86: v2 vmx test framework lib: provide stdio.h lib: added assert_msg macro lib: fix *printf return value lib: printf-style report prefixes lib: add newline to assert_msg lib: x86: store free pages in ascending order lib: x86: multi-page allocator x86: ept assertions x86: setup_ept code motion x86: 2GiB RAM for vmx tests x86: ept capability utilities lib: x86: page table utilities x86: ept access tests x86: force ept 2m test lib/libcflat.h | 21 ++ lib/printf.c | 31 +- lib/report.c | 45 ++- lib/stdio.h | 4 + lib/string.c | 41 +++ lib/x86/asm/page.h | 2 + lib/x86/vm.c | 183 ++++++++-- lib/x86/vm.h | 28 ++ x86/unittests.cfg | 291 +++++++++++++++- x86/vmx.c | 833 +++++++++++++++++++++++++++++++++++++++----- x86/vmx.h | 151 +++++++- x86/vmx_tests.c | 989 ++++++++++++++++++++++++++++++++++++++++++++++++++++- 12 files changed, 2493 insertions(+), 126 deletions(-) create mode 100644 lib/stdio.h -- 2.12.2.816.g2cccc81164-goog