kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [kvm-unit-tests PATCH 00/14] x86: MSR_GS_BASE and friends
@ 2021-04-22  3:04 Sean Christopherson
  2021-04-22  3:04 ` [kvm-unit-tests PATCH 01/14] x86/cstart: Don't use MSR_GS_BASE in 32-bit boot code Sean Christopherson
                   ` (13 more replies)
  0 siblings, 14 replies; 21+ messages in thread
From: Sean Christopherson @ 2021-04-22  3:04 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: kvm, Sean Christopherson

Fix unit tests on 32-bit SVM, and on VMX if/when 32-bit VMX starts
rejecting MSR_GS_BASE accesses.

Fix a variety of semi-related bugs in the MSR test, rework the test to
make the code maintainable, and expand its test coverage.

Sean Christopherson (14):
  x86/cstart: Don't use MSR_GS_BASE in 32-bit boot code
  x86: msr: Exclude GS/FS_BASE MSRs from 32-bit builds
  x86: msr: Advertise GenuineIntel as vendor to play nice with SYSENTER
  x86: msr: Restore original MSR value after writing arbitrary test
    value
  x86: Force the compiler to retrieve exception info from per-cpu area
  x86: msr: Replace spaces with tabs in all of msr.c
  x86: msr: Use ARRAY_SIZE() instead of open coded equivalent
  x86: msr: Use the #defined MSR indices in favor of open coding the
    values
  x86: msr: Drop the explicit expected value
  x86: msr: Add builder macros to define MSR entries
  x86: msr: Pass msr_info instead of doing a lookup at runtime
  x86: msr: Verify 64-bit only MSRs fault on 32-bit hosts
  x86: msr: Test that always-canonical MSRs #GP on non-canonical value
  x86: msr: Verify that EFER.SCE can be written on 32-bit vCPUs

 lib/x86/desc.c      |   6 +-
 lib/x86/processor.h |  24 +++++++
 x86/cstart.S        |  28 ++++++--
 x86/msr.c           | 163 +++++++++++++++++++++-----------------------
 x86/unittests.cfg   |   5 ++
 x86/vmx_tests.c     |   2 -
 6 files changed, 131 insertions(+), 97 deletions(-)

-- 
2.31.1.498.g6c1eba8ee3d-goog


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

end of thread, other threads:[~2021-04-23  6:57 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-22  3:04 [kvm-unit-tests PATCH 00/14] x86: MSR_GS_BASE and friends Sean Christopherson
2021-04-22  3:04 ` [kvm-unit-tests PATCH 01/14] x86/cstart: Don't use MSR_GS_BASE in 32-bit boot code Sean Christopherson
2021-04-22  9:44   ` Paolo Bonzini
2021-04-22 10:02   ` Paolo Bonzini
2021-04-22 17:57     ` Sean Christopherson
2021-04-23  6:57       ` Paolo Bonzini
2021-04-22  3:04 ` [kvm-unit-tests PATCH 02/14] x86: msr: Exclude GS/FS_BASE MSRs from 32-bit builds Sean Christopherson
2021-04-22  3:04 ` [kvm-unit-tests PATCH 03/14] x86: msr: Advertise GenuineIntel as vendor to play nice with SYSENTER Sean Christopherson
2021-04-22 10:11   ` Paolo Bonzini
2021-04-22  3:04 ` [kvm-unit-tests PATCH 04/14] x86: msr: Restore original MSR value after writing arbitrary test value Sean Christopherson
2021-04-22  3:04 ` [kvm-unit-tests PATCH 05/14] x86: Force the compiler to retrieve exception info from per-cpu area Sean Christopherson
2021-04-22  3:04 ` [kvm-unit-tests PATCH 06/14] x86: msr: Replace spaces with tabs in all of msr.c Sean Christopherson
2021-04-22  3:04 ` [kvm-unit-tests PATCH 07/14] x86: msr: Use ARRAY_SIZE() instead of open coded equivalent Sean Christopherson
2021-04-22  3:04 ` [kvm-unit-tests PATCH 08/14] x86: msr: Use the #defined MSR indices in favor of open coding the values Sean Christopherson
2021-04-22  3:04 ` [kvm-unit-tests PATCH 09/14] x86: msr: Drop the explicit expected value Sean Christopherson
2021-04-22  3:05 ` [kvm-unit-tests PATCH 10/14] x86: msr: Add builder macros to define MSR entries Sean Christopherson
2021-04-22  3:05 ` [kvm-unit-tests PATCH 11/14] x86: msr: Pass msr_info instead of doing a lookup at runtime Sean Christopherson
2021-04-22  3:05 ` [kvm-unit-tests PATCH 12/14] x86: msr: Verify 64-bit only MSRs fault on 32-bit hosts Sean Christopherson
2021-04-22 10:32   ` Paolo Bonzini
2021-04-22  3:05 ` [kvm-unit-tests PATCH 13/14] x86: msr: Test that always-canonical MSRs #GP on non-canonical value Sean Christopherson
2021-04-22  3:05 ` [kvm-unit-tests PATCH 14/14] x86: msr: Verify that EFER.SCE can be written on 32-bit vCPUs Sean Christopherson

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).