From: "Alex Bennée" <alex.bennee@linaro.org>
To: Florian Hofhammer <florian.hofhammer@epfl.ch>
Cc: pierrick.bouvier@linaro.org, qemu-devel@nongnu.org,
richard.henderson@linaro.org, laurent@vivier.eu,
imp@bsdimp.com
Subject: Re: New capabilities for plugins
Date: Fri, 22 Aug 2025 09:44:29 +0100 [thread overview]
Message-ID: <87v7mfkaoi.fsf@draig.linaro.org> (raw)
In-Reply-To: <7e0bd15e-d022-4de1-814b-9d9bb6513934@epfl.ch> (Florian Hofhammer's message of "Thu, 21 Aug 2025 18:02:26 +0200")
Florian Hofhammer <florian.hofhammer@epfl.ch> writes:
> Hi Alex,
>
> Sorry for the late reply, I've been out of office and did not check my
> mail.
>
> On 05/08/2025 17:30, Alex Bennée wrote:
>> I think to read the PC we would just need to make sure we properly
>> resolve it - internally QEMU does this for faults with:
>> tb = tcg_tb_lookup(retaddr);
>> cpu_restore_state_from_tb(cpu, tb, retaddr);
>> where retaddr is the address of the translated code. We just need to
>> special case PC handling in the read path.
>> *snip* No need - we just need to exit the loop via
>> cpu_loop_exit_restore() and
>> the code will do the right thing. However we probably don't want to
>> trigger that via register write as we would surprise the plugin -
>> especially if there are other hooks still to run. So we would want an
>> explicit helper to do it.
>
> Is this something the QEMU maintainers would be interested in? If yes,
> I'm happy to dig into the codebase and submit some patches for review.
> But this of course depends on whether such a feature is even desirable
> in QEMU (cf. the parallel discussion thread).
I think writing the patches would be a useful exercise anyway. The way
the plugin code is structured should mean you can keep the changes
fairly localised which would reduce the burden of maintaining an
out-of-tree patch if it isn't accepted. This wasn't really possible
pre-plugins as instrumentation was often deep in the frontends which is
actively maintained code with constant changes making re-basing a
nightmare.
>
> Best regards,
> Florian
--
Alex Bennée
Virtualisation Tech Lead @ Linaro
next prev parent reply other threads:[~2025-08-22 8:45 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-04 10:14 New capabilities for plugins Florian Hofhammer
2025-08-04 16:05 ` Alex Bennée
2025-08-05 13:22 ` Florian Hofhammer
2025-08-05 14:16 ` Alex Bennée
2025-08-05 14:30 ` Florian Hofhammer
2025-08-05 15:30 ` Alex Bennée
2025-08-21 16:02 ` Florian Hofhammer
2025-08-22 8:44 ` Alex Bennée [this message]
2025-08-26 14:37 ` Florian Hofhammer
2025-08-05 16:12 ` Daniel P. Berrangé
2025-08-21 15:58 ` Florian Hofhammer
2025-08-22 8:41 ` Alex Bennée
2025-08-04 17:01 ` Pierrick Bouvier
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=87v7mfkaoi.fsf@draig.linaro.org \
--to=alex.bennee@linaro.org \
--cc=florian.hofhammer@epfl.ch \
--cc=imp@bsdimp.com \
--cc=laurent@vivier.eu \
--cc=pierrick.bouvier@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.