From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: francesco.cagnin@gmail.com, qemu-devel@nongnu.org
Cc: mads@ynddal.dk, dirty@apple.com, peter.maydell@linaro.org,
qemu-arm@nongnu.org, agraf@csgraf.de, pbonzini@redhat.com,
alex.bennee@linaro.org, Francesco Cagnin <fcagnin@quarkslab.com>
Subject: Re: [PATCH v4 2/2] hvf: implement guest debugging on Apple Silicon hosts
Date: Thu, 20 Apr 2023 11:33:58 +0200 [thread overview]
Message-ID: <4bcb801d-7a16-765d-730a-ba2bc882fbeb@linaro.org> (raw)
In-Reply-To: <20230403191600.43487-3-fcagnin@quarkslab.com>
Hi Francesco,
On 3/4/23 21:16, 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 | 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/i386/hvf/hvf.c | 33 ++
> 6 files changed, 913 insertions(+), 2 deletions(-)
Huge patch (hard to digest).
> static void hvf_accel_ops_class_init(ObjectClass *oc, void *data)
> {
> AccelOpsClass *ops = ACCEL_OPS_CLASS(oc);
> @@ -473,6 +582,12 @@ static void hvf_accel_ops_class_init(ObjectClass *oc, void *data)
> ops->synchronize_post_init = hvf_cpu_synchronize_post_init;
> ops->synchronize_state = hvf_cpu_synchronize_state;
> ops->synchronize_pre_loadvm = hvf_cpu_synchronize_pre_loadvm;
Consider splitting in 3;
1: add registers,
> + ops->insert_breakpoint = hvf_insert_breakpoint;
> + ops->remove_breakpoint = hvf_remove_breakpoint;
> + ops->remove_all_breakpoints = hvf_remove_all_breakpoints;
2: breakpoint handlers (and stubs)
> + ops->update_guest_debug = hvf_update_guest_debug;
> + ops->supports_guest_debug = hvf_arch_supports_guest_debug;
3: guest_debug handlers (and stubs).
> };
> static const TypeInfo hvf_accel_ops_type = {
> .name = ACCEL_OPS_NAME("hvf"),
Regards,
Phil.
next prev parent reply other threads:[~2023-04-20 9:34 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
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é [this message]
2023-04-30 19:45 ` Francesco Cagnin
2023-05-09 14:29 ` Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4bcb801d-7a16-765d-730a-ba2bc882fbeb@linaro.org \
--to=philmd@linaro.org \
--cc=agraf@csgraf.de \
--cc=alex.bennee@linaro.org \
--cc=dirty@apple.com \
--cc=fcagnin@quarkslab.com \
--cc=francesco.cagnin@gmail.com \
--cc=mads@ynddal.dk \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).