linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/6] KVM: my debug patch queue
@ 2021-08-11 12:29 Maxim Levitsky
  2021-08-11 12:29 ` [PATCH v3 1/6] KVM: SVM: split svm_handle_invalid_exit Maxim Levitsky
                   ` (6 more replies)
  0 siblings, 7 replies; 30+ messages in thread
From: Maxim Levitsky @ 2021-08-11 12:29 UTC (permalink / raw)
  To: kvm
  Cc: Kieran Bingham, Jan Kiszka, Andrew Jones, Jonathan Corbet,
	Maxim Levitsky, Vitaly Kuznetsov, Sean Christopherson,
	Ingo Molnar, Thomas Gleixner,
	maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT),
	Johannes Berg, Wanpeng Li, H. Peter Anvin, Jessica Yu,
	Jim Mattson, Paolo Bonzini, Joerg Roedel, Yang Weijiang,
	linux-kernel, Borislav Petkov,
	open list:KERNEL SELFTEST FRAMEWORK, open list:DOCUMENTATION,
	Shuah Khan, Andrew Morton

Hi!

I would like to publish two debug features which were needed for other stuff
I work on.

One is the reworked lx-symbols script which now actually works on at least
gdb 9.1 (gdb 9.2 was reported to fail to load the debug symbols from the kernel
for some reason, not related to this patch) and upstream qemu.

The other feature is the ability to trap all guest exceptions (on SVM for now)
and see them in kvmtrace prior to potential merge to double/triple fault.

This can be very useful and I already had to manually patch KVM a few
times for this.
I will, once time permits, implement this feature on Intel as well.

V2:

 * Some more refactoring and workarounds for lx-symbols script

 * added KVM_GUESTDBG_BLOCKIRQ flag to enable 'block interrupts on
   single step' together with KVM_CAP_SET_GUEST_DEBUG2 capability
   to indicate which guest debug flags are supported.

   This is a replacement for unconditional block of interrupts on single
   step that was done in previous version of this patch set.
   Patches to qemu to use that feature will be sent soon.

 * Reworked the the 'intercept all exceptions for debug' feature according
   to the review feedback:

   - renamed the parameter that enables the feature and
     moved it to common kvm module.
     (only SVM part is currently implemented though)

   - disable the feature for SEV guests as was suggested during the review
   - made the vmexit table const again, as was suggested in the review as well.

V3:
 * Modified a selftest to cover the KVM_GUESTDBG_BLOCKIRQ
 * Rebased on kvm/queue

Best regards,
        Maxim Levitsky

Maxim Levitsky (6):
  KVM: SVM: split svm_handle_invalid_exit
  KVM: x86: add force_intercept_exceptions_mask
  KVM: SVM: implement force_intercept_exceptions_mask
  scripts/gdb: rework lx-symbols gdb script
  KVM: x86: implement KVM_GUESTDBG_BLOCKIRQ
  KVM: selftests: test KVM_GUESTDBG_BLOCKIRQ

 Documentation/virt/kvm/api.rst                |   1 +
 arch/x86/include/asm/kvm_host.h               |   5 +-
 arch/x86/include/uapi/asm/kvm.h               |   1 +
 arch/x86/kvm/svm/svm.c                        |  87 +++++++-
 arch/x86/kvm/svm/svm.h                        |   6 +-
 arch/x86/kvm/x86.c                            |  12 +-
 arch/x86/kvm/x86.h                            |   2 +
 kernel/module.c                               |   8 +-
 scripts/gdb/linux/symbols.py                  | 203 ++++++++++++------
 .../testing/selftests/kvm/x86_64/debug_regs.c |  24 ++-
 10 files changed, 266 insertions(+), 83 deletions(-)

-- 
2.26.3



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

end of thread, other threads:[~2022-03-09 15:41 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-11 12:29 [PATCH v3 0/6] KVM: my debug patch queue Maxim Levitsky
2021-08-11 12:29 ` [PATCH v3 1/6] KVM: SVM: split svm_handle_invalid_exit Maxim Levitsky
2021-08-11 12:29 ` [PATCH v3 2/6] KVM: x86: add force_intercept_exceptions_mask Maxim Levitsky
2021-09-02 16:56   ` Sean Christopherson
2022-02-08 14:34     ` Maxim Levitsky
2022-03-08 23:37       ` Sean Christopherson
2022-03-09 12:31         ` Maxim Levitsky
2022-03-09 14:03           ` Paolo Bonzini
2022-03-09 15:40             ` Sean Christopherson
2021-08-11 12:29 ` [PATCH v3 3/6] KVM: SVM: implement force_intercept_exceptions_mask Maxim Levitsky
2021-08-11 14:26   ` Maxim Levitsky
2021-09-02 17:34     ` Sean Christopherson
2022-02-08 14:35       ` Maxim Levitsky
2021-08-11 12:29 ` [PATCH v3 4/6] scripts/gdb: rework lx-symbols gdb script Maxim Levitsky
2021-08-11 12:29 ` [PATCH v3 5/6] KVM: x86: implement KVM_GUESTDBG_BLOCKIRQ Maxim Levitsky
2021-08-11 12:29 ` [PATCH v3 6/6] KVM: selftests: test KVM_GUESTDBG_BLOCKIRQ Maxim Levitsky
2021-09-06 11:20   ` Paolo Bonzini
2021-09-06 21:03     ` Maxim Levitsky
2021-11-01 15:43     ` Vitaly Kuznetsov
2021-11-01 16:19       ` Maxim Levitsky
2021-11-01 23:21         ` Sean Christopherson
2021-11-02 10:46           ` Vitaly Kuznetsov
2021-11-02 15:53             ` Sean Christopherson
2021-11-02 16:18               ` Vitaly Kuznetsov
2021-11-02 18:45                 ` Sean Christopherson
2021-11-03  9:04                   ` Maxim Levitsky
2021-11-03  9:29                     ` [PATCH] KVM: x86: inhibit APICv when KVM_GUESTDBG_BLOCKIRQ active Maxim Levitsky
2021-11-03  9:31                       ` Maxim Levitsky
2021-08-11 13:10 ` [PATCH v3 0/6] KVM: my debug patch queue Paolo Bonzini
2021-08-11 13:22   ` Maxim Levitsky

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