Skip to content

Rework guest debug interface / x86 debug register support -v2

Jan Kiszka kvm 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest11 patches 9 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/11QEMU/KVM: Fix deadlocks in monitor and debuggerqemu/qemu-kvm.c qemu/vl.c+28 -153 replies
2/11QEMU/KVM: Cleanup and improve kvm_load/save_registers usageqemu/gdbstub.c qemu/monitor.c+6 -102 replies
3/11QEMU/KVM: Proper vm_stop on debug eventsqemu/qemu-kvm.c+8 -10 replies
4/11QEMU: Enhance cpu_break/watchpoint API and gdbstub integrationqemu/cpu-all.h qemu/cpu-defs.h qemu/exec.c +1 more+75 -370 replies
5/11QEMU: Improve SMP debugging supportqemu/cpu-defs.h qemu/exec.c qemu/gdbstub.c +3 more+57 -290 replies
6/11QEMU/KVM: Introduce single vcpu pause/resumeqemu/qemu-kvm.c+22 -70 replies
7/11QEMU/KVM: New guest debugging interfacelibkvm/libkvm.c libkvm/libkvm.h qemu/exec.c +6 more+442 -421 reply
8/11QEMU/KVM: Support for SMP guest debuggingqemu/qemu-kvm.c+18 -60 replies
9/11KVM: New guest debugging interfacearch/ia64/kvm/kvm-ia64.c arch/powerpc/kvm/powerpc.c arch/s390/kvm/kvm-s390.c +11 more+168 -1020 replies
10/11KVM-x86: Properly virtualize debug registersarch/x86/kvm/kvm_svm.h arch/x86/kvm/svm.c arch/x86/kvm/vmx.c +3 more+200 -1010 replies
11/11KVM-x86: Wire up host-managed debug registersarch/x86/kvm/svm.c arch/x86/kvm/vmx.c arch/x86/kvm/x86.c+23 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/11] Rework guest debug interface / x86 debug register support -v2

Hi,

here comes the full series of patches to fix and enhance debugging support of KVM. After completing hardware breakpoint support and reorganizing the patches, I felt like I should post them all in a single series, because my queue became quite long and potentially confusing in the meantime.

The major changes or this revision are full hardware-assisted guest debugging and a lot of refactoring on the userspace side. The latter was motivated by an increasing inconsistency regarding which arch-specific part should be handled in libkvm and which by qemu. I decided to push everything into qemu, keeping the lib small (and easier to overcome one day :->).

When I was trying to test the hardware breakpoint/watchpoint support with gdb, the first result with quite disappointing: current gdb is unable to handle such breakpoint remotely. There is hope, latest cvs has it fixed - but suffers from other regressions which make it unusable for kernel debugging. In the meantime, you can still write your own "maintenance packet Z2,..." requests. :p

To give an overview of the series:
Patch 1..3 - Critical debugger fixes for KVM (should be merge in any
case)
Patch 4..5 - QEMU refactoring, required for following KVM patches, but
also of generic use for QEMU (rebase and feature enhancements are required to get them in shape for upstream)
Patch 6..8 - New guest debugging interface and SMP support Patch 9..11 - Kernel-side changes for new guest debugging interface and
proper x86 debug register virtualization

Jan

PS: If anyone wants to be dropped from CC, just let me know.