x86: nSVM: Fix bugs in LBRV tests
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest6 patches 1 replyIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/6 | x86: nSVM: Set up a guest stack in LBRV testsx86/ x86/ x86/ | +11 | 0 replies | |
| 2/6 | lib: Expose a subset of VMX's assertion macroslib/ x86/ | +34 | 0 replies | |
| 3/6 | x86: Add defines for the various LBR record bit definitionslib/ | +11 | 0 replies | |
| 4/6 | x86: nSVM: Ignore mispredict bit in LBR recordsx86/ | +29 | 0 replies | |
| 5/6 | x86: nSVM: Replace check_dbgctl() with TEST_EXPECT_EQ() in LBRV testx86/ | +6 | 0 replies | |
| 6/6 | x86: nSVM: Print out RIP and LBRs from VMCB if LBRV guest test failsx86/ | +10 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [kvm-unit-tests PATCH 0/6] x86: nSVM: Fix bugs in LBRV tests
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
Signature · 1 line
2.41.0.162.gfafddb0af9-goog