Skip to content

Rework guest debug interface

Jan Kiszka kvm 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3KVM: Rework guest debugging interfacearch/ia64/kvm/kvm-ia64.c arch/powerpc/kvm/powerpc.c arch/s390/kvm/kvm-s390.c +11 more+168 -1020 replies
2/3qemu-kvm: Introduce single vcpu pause/resumeqemu/qemu-kvm.c+22 -71 reply
3/3kvm-userspace: Switch to KVM_SET_GUEST_DEBUGlibkvm/kvm-common.h libkvm/libkvm-x86.c libkvm/libkvm.c +7 more+268 -410 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/3] Rework guest debug interface

The existing guest debugging interface of kvm is limited in several ways:

- depends on hardware breakpoints, thus suffers from running out of this scarce resource.
- assumes that there are only 4 hardware breakpoints (even if some archs may once provide more)
- doesn't support watchpoint or additional arch-specific debugging features

This patch series reworks the interface, providing usable software-based breakpoint support, but also laying the ground for patches under development that will add full hardware debugging features.

Content:
Patch 1 - Replace KVM_DEBUG_GUEST with KVM_SET_GUEST_DEBUG interface,
implement kernel side support
Patch 2 - Tiny helper that allows pause and resume for a single vcpu Patch 3 - Userland changes that adopt KVM_SET_GUEST_DEBUG and switch to
software breakpoints

Depends on:
- "Fix monitor and gdbstub deadlocks v2" [1]
- "Proper vm_stop on debug events" [2]

It's late here and the series is still fresh, but everything seems to works nicely - even using gdb inside the guest while the host has active breakpoints on the guest as well.

Looking forward to feedback and review.

Jan

[1] http://permalink.gmane.org/gmane.comp.emulators.kvm.devel/17444
[2] http://permalink.gmane.org/gmane.comp.emulators.kvm.devel/17775