mbox series

[kvm-unit-tests,v2,0/4] Add additional testing for routing L2 exceptions

Message ID 20211214011823.3277011-1-aaronlewis@google.com (mailing list archive)
Headers show
Series Add additional testing for routing L2 exceptions | expand

Message

Aaron Lewis Dec. 14, 2021, 1:18 a.m. UTC
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(-)

Comments

Paolo Bonzini Dec. 14, 2021, 12:19 p.m. UTC | #1
On 12/14/21 02:18, Aaron Lewis wrote:
> 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(-)
> 

Queued patches 1-2 for now, thanks.

Paolo