All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/3] Add gdbstub support to HVF
@ 2022-11-16 17:47 francesco.cagnin
  2022-11-16 17:47 ` [PATCH v2 1/3] arm: move KVM breakpoints helpers francesco.cagnin
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: francesco.cagnin @ 2022-11-16 17:47 UTC (permalink / raw)
  To: qemu-devel
  Cc: mads, dirty, peter.maydell, qemu-arm, agraf, pbonzini,
	alex.bennee, Francesco Cagnin

From: Francesco Cagnin <fcagnin@quarkslab.com>

This patch series aims to add gdbstub support to HVF (the 'QEMU
accelerator on macOS that employs Hypervisor.framework') on Apple
Silicon hosts.

The proposed implementation, structured like the KVM counterpart,
handles single-stepping, software breakpoints, hardware breakpoints and
hardware watchpoints.

The patch has been most recently tested working on macOS Ventura 13.0
hosts and Linux kernel 5.19 guests with the test script
'tests/guest-debug/test-gdbstub.py' (slightly updated to make it work
with Linux kernels compiled on macOS).

If deemed useful, I can also submit an analogous patch targeting Intel
hosts.

v2:
* Move debug helpers to 'target/arm/hyp_gdbstub.c'
* Add support for SSTEP_NOIRQ and multi-core (thanks Mads Ynddal)
* Move calls to 'hv_vcpu_set_trap_debug_exceptions()' to
  'hvf_arch_update_guest_debug()'
* Use 'arm_num_brps()' and 'arm_num_wrps()' to compute the number of
  breakpoints and watchpoints available (thanks Peter Maydell)

Francesco Cagnin (3):
  arm: move KVM breakpoints helpers
  hvf: implement guest debugging on Apple Silicon hosts
  hvf: handle writes of MDSCR_EL1 and DBG*_EL1

 accel/hvf/hvf-accel-ops.c | 123 ++++++++++++++
 accel/hvf/hvf-all.c       |  24 +++
 cpu.c                     |   3 +
 include/sysemu/hvf.h      |  29 ++++
 include/sysemu/hvf_int.h  |   1 +
 target/arm/hvf/hvf.c      | 334 +++++++++++++++++++++++++++++++++++++-
 target/arm/hyp_gdbstub.c  | 242 +++++++++++++++++++++++++++
 target/arm/internals.h    |  50 ++++++
 target/arm/kvm64.c        | 276 -------------------------------
 target/arm/meson.build    |   3 +-
 10 files changed, 806 insertions(+), 279 deletions(-)
 create mode 100644 target/arm/hyp_gdbstub.c

-- 
2.38.1



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

end of thread, other threads:[~2022-12-20  8:43 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-16 17:47 [PATCH v2 0/3] Add gdbstub support to HVF francesco.cagnin
2022-11-16 17:47 ` [PATCH v2 1/3] arm: move KVM breakpoints helpers francesco.cagnin
2022-11-22 10:06   ` Alex Bennée
2022-11-16 17:47 ` [PATCH v2 2/3] hvf: implement guest debugging on Apple Silicon hosts francesco.cagnin
2022-11-17 14:01   ` Mads Ynddal
2022-12-12 16:16   ` Peter Maydell
2022-12-20  7:22     ` Francesco Cagnin
2022-12-20  8:31       ` Alex Bennée
2022-11-16 17:47 ` [PATCH v2 3/3] hvf: handle writes of MDSCR_EL1 and DBG*_EL1 francesco.cagnin
2022-11-17 14:01   ` Mads Ynddal

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.