[PATCH 0/3] Add gdbstub support to HVF

francesco.cagnin@gmail.com posted 3 patches 1 year, 6 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20221104184101.6923-1-fcagnin@quarkslab.com
Maintainers: Cameron Esfahani <dirty@apple.com>, Roman Bolshakov <r.bolshakov@yadro.com>, Eduardo Habkost <eduardo@habkost.net>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, "Philippe Mathieu-Daudé" <philmd@linaro.org>, Yanan Wang <wangyanan55@huawei.com>, Peter Maydell <peter.maydell@linaro.org>, Alexander Graf <agraf@csgraf.de>, Paolo Bonzini <pbonzini@redhat.com>
There is a newer version of this series
accel/hvf/hvf-accel-ops.c | 124 ++++++++++++++
accel/hvf/hvf-all.c       |  24 +++
cpu.c                     |   3 +
include/sysemu/hvf.h      |  29 ++++
include/sysemu/hvf_int.h  |   1 +
target/arm/debug_helper.c | 241 +++++++++++++++++++++++++++
target/arm/hvf/hvf.c      | 334 +++++++++++++++++++++++++++++++++++++-
target/arm/internals.h    |  50 ++++++
target/arm/kvm64.c        | 276 -------------------------------
9 files changed, 805 insertions(+), 277 deletions(-)
[PATCH 0/3] Add gdbstub support to HVF
Posted by francesco.cagnin@gmail.com 1 year, 6 months ago
From: Francesco Cagnin <fcagnin@quarkslab.com>

Hello,

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 on single-core guests (i.e. '-smp 1'). (If
possible, I'd like to receive guidance on how to add proper support for
multi-core guests.)

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.

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 | 124 ++++++++++++++
 accel/hvf/hvf-all.c       |  24 +++
 cpu.c                     |   3 +
 include/sysemu/hvf.h      |  29 ++++
 include/sysemu/hvf_int.h  |   1 +
 target/arm/debug_helper.c | 241 +++++++++++++++++++++++++++
 target/arm/hvf/hvf.c      | 334 +++++++++++++++++++++++++++++++++++++-
 target/arm/internals.h    |  50 ++++++
 target/arm/kvm64.c        | 276 -------------------------------
 9 files changed, 805 insertions(+), 277 deletions(-)

-- 
2.38.1