Some guest debuggers use the value of CR3 to attribute a debug event to
a guest process. Providing CR3 in the debug info makes this
significantly faster than doing KVM_GET_SREGS every time, so add support
for that. Also extend the debug_regs selftest to cover this.
Yosry Ahmed (3):
KVM: x86: Add CR3 to guest debug info
KVM: selftests: Use TEST_ASSERT_EQ() in debug_regs
KVM: selftests: Verify CR3 in debug_regs
arch/x86/include/uapi/asm/kvm.h | 1 +
arch/x86/kvm/svm/svm.c | 2 +
arch/x86/kvm/vmx/vmx.c | 2 +
arch/x86/kvm/x86.c | 3 +
include/uapi/linux/kvm.h | 1 +
tools/testing/selftests/kvm/x86/debug_regs.c | 82 ++++++++++----------
6 files changed, 48 insertions(+), 43 deletions(-)
base-commit: d209f1ea367750edfcba7db8d199a856e4186511
--
2.52.0.rc2.455.g230fcf2819-goog