kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/4] Test MSR exits to userspace
@ 2020-10-12 19:47 Aaron Lewis
  2020-10-12 19:47 ` [PATCH v3 1/4] selftests: kvm: Fix the segment descriptor layout to match the actual layout Aaron Lewis
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Aaron Lewis @ 2020-10-12 19:47 UTC (permalink / raw)
  To: graf; +Cc: pshier, jmattson, kvm, Aaron Lewis

This patchset adds additional testing to the series ("Allow user space to
restrict and augment MSR emulation") by Alexander Graf <graf@amazon.com>,
and supliments the selftest in that series.

This patchset introduces exception handling into the kvm selftest framework
which is then used in the test to be able to handle #GPs that are injected
into the guest from userspace.

The test focuses on two main areas:
  1) It tests the MSR filter API.
  2) It tests MSR permission bitmaps.

v1 -> v2:

  - Use exception_handlers instead of gs base to pass table to the guest.
  - Move unexpected vector assert to processor.c.

v2 -> v3:

  - Add stubs for assert_on_unhandled_exception() in aarch64 and s390x.

Aaron Lewis (4):
  selftests: kvm: Fix the segment descriptor layout to match the actual
    layout
  selftests: kvm: Clear uc so UCALL_NONE is being properly reported
  selftests: kvm: Add exception handling to selftests
  selftests: kvm: Test MSR exiting to userspace

 tools/testing/selftests/kvm/.gitignore        |   1 +
 tools/testing/selftests/kvm/Makefile          |  20 +-
 .../testing/selftests/kvm/include/kvm_util.h  |   2 +
 .../selftests/kvm/include/x86_64/processor.h  |  26 +-
 .../selftests/kvm/lib/aarch64/processor.c     |   4 +
 .../testing/selftests/kvm/lib/aarch64/ucall.c |   3 +
 tools/testing/selftests/kvm/lib/kvm_util.c    |   5 +
 .../selftests/kvm/lib/kvm_util_internal.h     |   2 +
 .../selftests/kvm/lib/s390x/processor.c       |   4 +
 tools/testing/selftests/kvm/lib/s390x/ucall.c |   3 +
 .../selftests/kvm/lib/x86_64/handlers.S       |  81 +++
 .../selftests/kvm/lib/x86_64/processor.c      | 117 +++-
 .../testing/selftests/kvm/lib/x86_64/ucall.c  |   3 +
 .../kvm/x86_64/userspace_msr_exit_test.c      | 560 ++++++++++++++++++
 14 files changed, 820 insertions(+), 11 deletions(-)
 create mode 100644 tools/testing/selftests/kvm/lib/x86_64/handlers.S
 create mode 100644 tools/testing/selftests/kvm/x86_64/userspace_msr_exit_test.c

-- 
2.28.0.1011.ga647a8990f-goog


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2020-12-03 22:13 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-12 19:47 [PATCH v3 0/4] Test MSR exits to userspace Aaron Lewis
2020-10-12 19:47 ` [PATCH v3 1/4] selftests: kvm: Fix the segment descriptor layout to match the actual layout Aaron Lewis
2020-10-12 19:47 ` [PATCH v3 2/4] selftests: kvm: Clear uc so UCALL_NONE is being properly reported Aaron Lewis
2020-10-12 19:47 ` [PATCH v3 3/4] selftests: kvm: Add exception handling to selftests Aaron Lewis
2020-10-13  7:42   ` Alexander Graf
2020-10-12 19:47 ` [PATCH v3 4/4] selftests: kvm: Test MSR exiting to userspace Aaron Lewis
2020-11-09 16:58   ` Aaron Lewis
2020-11-09 17:09     ` Paolo Bonzini
2020-12-02 15:31       ` Aaron Lewis
2020-12-03 17:48         ` Paolo Bonzini
2020-12-03 21:47           ` Aaron Lewis
2020-12-03 22:05             ` Alexander Graf
2020-12-03 22:12               ` Aaron Lewis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).