In a previous series testing was added to verify that when a #PF occured in L2 the exception was routed to the correct place. In this series other exceptions are tested (ie: #GP, #UD, #DE, #DB, #BP, #AC). The first two commits in this series are bug fixes that were discovered while making these changes. The last two implement the tests. v1 -> v2: - Add guest_stack_top and guest_syscall_stack_top for aligning L2's stacks. - Refactor test to make it more extensible (ie: Added vmx_exception_tests array and framework around it). - Split test into 2 commits: 1. Test infrustructure. 2. Test cases. Aaron Lewis (4): x86: Fix a #GP from occurring in usermode library's exception handlers x86: Align L2's stacks x86: Add a test framework for nested_vmx_reflect_vmexit() testing x86: Add test coverage for nested_vmx_reflect_vmexit() testing lib/x86/desc.c | 2 +- lib/x86/desc.h | 5 ++ lib/x86/usermode.c | 3 + x86/unittests.cfg | 7 ++ x86/vmx.c | 28 ++++++-- x86/vmx.h | 2 + x86/vmx_tests.c | 161 +++++++++++++++++++++++++++++++++++++++++++++ 7 files changed, 201 insertions(+), 7 deletions(-) -- 2.34.1.173.g76aa8bc2d0-goog