qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/2] Add gdbstub support to HVF
@ 2023-04-03 19:15 francesco.cagnin
  2023-04-03 19:15 ` [PATCH v4 1/2] arm: move KVM breakpoints helpers francesco.cagnin
  2023-04-03 19:16 ` [PATCH v4 2/2] hvf: implement guest debugging on Apple Silicon hosts francesco.cagnin
  0 siblings, 2 replies; 7+ messages in thread
From: francesco.cagnin @ 2023-04-03 19:15 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.3
hosts and single-core 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, see
https://gitlab.com/qemu-project/qemu/-/issues/1489).

The patch still has uninvestigated issues with multi-cores guests (see
thread https://www.mail-archive.com/qemu-devel@nongnu.org/msg932884.html).

v4:
* Add license and copyright comment in 'hyp_gdbstub.c'
* Fix build on x86 macos
* Add architecture specific functions to check guest debug support
* Move include to the top of the file in 'hvf.h'
* Merge patches 2 and 3 from previous patch series
* Re-inject EC_AA64_BKPT into the guest if unhandled
* Add comments explaining how debug registers are handled
* Minor refactor around debug registers for readability
* Other minor changes

Francesco Cagnin (2):
  arm: move KVM breakpoints helpers
  hvf: implement guest debugging on Apple Silicon hosts

 accel/hvf/hvf-accel-ops.c | 115 +++++++
 accel/hvf/hvf-all.c       |  23 ++
 include/sysemu/hvf.h      |  34 ++
 include/sysemu/hvf_int.h  |   1 +
 target/arm/hvf/hvf.c      | 709 +++++++++++++++++++++++++++++++++++++-
 target/arm/hyp_gdbstub.c  | 253 ++++++++++++++
 target/arm/internals.h    |  50 +++
 target/arm/kvm64.c        | 276 ---------------
 target/arm/meson.build    |   3 +-
 target/i386/hvf/hvf.c     |  33 ++
 10 files changed, 1218 insertions(+), 279 deletions(-)
 create mode 100644 target/arm/hyp_gdbstub.c

-- 
2.40.0



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

end of thread, other threads:[~2023-05-09 14:30 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-03 19:15 [PATCH v4 0/2] Add gdbstub support to HVF francesco.cagnin
2023-04-03 19:15 ` [PATCH v4 1/2] arm: move KVM breakpoints helpers francesco.cagnin
2023-04-03 19:16 ` [PATCH v4 2/2] hvf: implement guest debugging on Apple Silicon hosts francesco.cagnin
2023-04-17 12:21   ` Peter Maydell
2023-04-20  9:33   ` Philippe Mathieu-Daudé
2023-04-30 19:45     ` Francesco Cagnin
2023-05-09 14:29       ` Peter Maydell

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