[kvm-unit-tests PATCH 0/6] x86: nSVM: Fix bugs in LBRV tests

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Fix bugs in the LBRV tests, and try to make them a bit less painful to
debug (goes from "excruitating" to just "awful").  The tests have been
failing on our Milan systems for quite some time, but debugging them was
painful and I wasn't sufficiently motivated until I wanted to clean up
KVM's code :-/

The Milan failures are due to AMD shoving a "mispredict" bit in the LBR
records, i.e. the tests fail if the CPU mispredicts the branch being
tested.  Debug was especially difficult because the tests also neglected
to setup a guest stack, i.e. adding debug code created a completely
different failure that looked similar at first glance.

Sean Christopherson (6):
  x86: nSVM: Set up a guest stack in LBRV tests
  lib: Expose a subset of VMX's assertion macros
  x86: Add defines for the various LBR record bit definitions
  x86: nSVM: Ignore mispredict bit in LBR records
  x86: nSVM: Replace check_dbgctl() with TEST_EXPECT_EQ() in LBRV test
  x86: nSVM: Print out RIP and LBRs from VMCB if LBRV guest test fails

 lib/util.h      |  31 ++++++++++++++
 lib/x86/msr.h   |  11 +++++
 x86/svm.c       |   7 +++-
 x86/svm.h       |   2 +-
 x86/svm_tests.c | 108 +++++++++++++++++++++---------------------------
 x86/vmx.h       |  32 ++------------
 6 files changed, 99 insertions(+), 92 deletions(-)


base-commit: 02d8befe99f8205d4caea402d8b0800354255681
-- 
2.41.0.162.gfafddb0af9-goog




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux