qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3 2/3] hvf: implement guest debugging on Apple Silicon hosts


From: Mads Ynddal
Subject: Re: [PATCH v3 2/3] hvf: implement guest debugging on Apple Silicon hosts
Date: Wed, 18 Jan 2023 12:19:36 +0100

> On 14 Jan 2023, at 17.13, francesco.cagnin@gmail.com wrote:
> 
> From: Francesco Cagnin <fcagnin@quarkslab.com>
> 
> Support is added for single-stepping, software breakpoints, hardware
> breakpoints and watchpoints. The code has been structured like the KVM
> counterpart (and many parts are basically identical).
> 
> Guests can be debugged through the gdbstub.
> 
> While guest debugging is enabled, the guest can still read and write the
> DBG*_EL1 registers but they don't have any effect.
> 
> Signed-off-by: Francesco Cagnin <fcagnin@quarkslab.com>
> ---
> 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      | 631 +++++++++++++++++++++++++++++++++++++-
> 6 files changed, 809 insertions(+), 2 deletions(-)
> 

It seems v3 has a regression in regards to BRK instructions that I cannot
reproduce with v2. If I start QEMU and GDB with the Linux kernel (v6.0-rc5),
and set a software breakpoint at `bio_split` (probably not specific to this
function), I see messages in stdout like this:

[    4.663981] Unexpected kernel BRK exception at EL1
[    4.664650] Internal error: BRK handler: f2000000 [#1] PREEMPT SMP
...

Maybe the software breakpoints aren't removed/reapplied correctly in v3?

—
Mads Ynddal




reply via email to

[Prev in Thread] Current Thread [Next in Thread]