[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v5 0/4] Add gdbstub support to HVF
From: |
francesco . cagnin |
Subject: |
[PATCH v5 0/4] Add gdbstub support to HVF |
Date: |
Thu, 1 Jun 2023 17:31:03 +0200 |
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 a macOS Ventura 13.4
ARM64 host and a Linux kernel 5.19 guest 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).
This version of the patch should fix previously reported issues on
multi-cores guests. No other issues are known.
The patch has been tested on top of QEMU v8.0.1 dabb418.
v5:
* Split patch into multiple commits (as per suggestion on v4)
* Update `hvf_arm_init_debug()` so it's not called multiple times on SMP
guests (as per suggestion on v4)
* Fix add `hvf_arch_set_traps()` to enable/disable exiting the guest on all
vCPUs
* Fix share a single `hvf_sw_breakpoints` across all vCPUs
* Fix add missing `QTAILQ_INIT()` for `hvf_sw_breakpoints`
Francesco Cagnin (4):
arm: move KVM breakpoints helpers
hvf: handle access for more registers
hvf: add breakpoint handlers
hvf: add guest debugging handlers for Apple Silicon hosts
accel/hvf/hvf-accel-ops.c | 119 ++++++
accel/hvf/hvf-all.c | 23 ++
include/sysemu/hvf.h | 37 ++
include/sysemu/hvf_int.h | 2 +
target/arm/hvf/hvf.c | 750 +++++++++++++++++++++++++++++++++++++-
target/arm/hvf_arm.h | 7 +
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 ++
11 files changed, 1274 insertions(+), 279 deletions(-)
create mode 100644 target/arm/hyp_gdbstub.c
--
2.40.1
- [PATCH v5 0/4] Add gdbstub support to HVF,
francesco . cagnin <=
- [PATCH v5 2/4] hvf: handle access for more registers, francesco . cagnin, 2023/06/01
- [PATCH v5 3/4] hvf: add breakpoint handlers, francesco . cagnin, 2023/06/01
- [PATCH v5 1/4] arm: move KVM breakpoints helpers, francesco . cagnin, 2023/06/01
- [PATCH v5 4/4] hvf: add guest debugging handlers for Apple Silicon hosts, francesco . cagnin, 2023/06/01
- Re: [PATCH v5 0/4] Add gdbstub support to HVF, Peter Maydell, 2023/06/05