From: "Alex Bennée" <alex.bennee@linaro.org>
To: Florian Hofhammer <florian.hofhammer@epfl.ch>
Cc: qemu-devel@nongnu.org, pierrick.bouvier@linaro.org,
richard.henderson@linaro.org, laurent@vivier.eu,
imp@bsdimp.com, berrange@redhat.com
Subject: Re: [RFC PATCH v2 0/2] Enable PC diversion via the plugin API
Date: Fri, 12 Dec 2025 12:02:39 +0000 [thread overview]
Message-ID: <87ikebucv4.fsf@draig.linaro.org> (raw)
In-Reply-To: <f06e2059-9d86-4a5c-acff-84cbeabcfb06@epfl.ch> (Florian Hofhammer's message of "Wed, 29 Oct 2025 16:57:49 +0100")
Florian Hofhammer <florian.hofhammer@epfl.ch> writes:
> Hi,
>
> Sorry for necrobumping this thread. I just wanted to follow up on this
> and ask if there is still interest in this plugin API extension or if it
> is going to be dropped in favor of the Lorelei patches (which would also
> fulfill my original use case).
These are the system call filter patches?
I guess that depends on if being able to change PC is only for skipping
syscalls?
>
> Thanks for your time,
> Florian
>
> On 06/10/2025 15:21, Florian Hofhammer wrote:
>> Hi,
>>
>> As originally discussed in the thread at
>> https://lists.nongnu.org/archive/html/qemu-devel/2025-08/msg00656.html
>> and later proposed in a patch at
>> https://lists.nongnu.org/archive/html/qemu-devel/2025-09/msg02218.html,
>> I am sending an updated version of my patch based on the previous
>> feedback.
>>
>> Notable changes to v1:
>> - Added a setjmp() in the syscall handling path to allow redirecting
>> the PC via cpu_loop_exit() also in syscall callbacks. The previous
>> version would only work in instruction execution / memory access
>> callback contexts, as the setjmp() corresponding to the longjmp() in
>> cpu_loop_exit() was only live in those contexts.
>> - Added a flag to make sure the new API function is only called in
>> contexts where it makes sense, i.e., during execution of guest code.
>> - Added a test that checks the new functionality by skipping a
>> non-existent sentinel syscall.
>>
>> I made it an RFC patch this time as I am not entirely sure if my
>> setting/handling of the new flag makes sense the way it is. I briefly
>> looked into making the QEMU_PLUGIN_CB_* flags actual flags via a
>> bitfield instead of enum values, but that would have required touching
>> a lot of code all over the place, so I'm not sure this is the way to go.
>>
>> Happy to get feedback and your thoughts on the patches!
>>
>> Thanks,
>> Florian
>>
>>
>> Florian Hofhammer (2):
>> plugins: Add PC diversion API function
>> tests/tcg: add test for qemu_plugin_set_pc API
>>
>> include/qemu/qemu-plugin.h | 15 +++++++
>> linux-user/aarch64/cpu_loop.c | 2 +-
>> linux-user/alpha/cpu_loop.c | 2 +-
>> linux-user/arm/cpu_loop.c | 2 +-
>> linux-user/hexagon/cpu_loop.c | 2 +-
>> linux-user/hppa/cpu_loop.c | 4 ++
>> linux-user/i386/cpu_loop.c | 8 ++--
>> linux-user/include/special-errno.h | 8 ++++
>> linux-user/loongarch64/cpu_loop.c | 5 ++-
>> linux-user/m68k/cpu_loop.c | 2 +-
>> linux-user/microblaze/cpu_loop.c | 2 +-
>> linux-user/mips/cpu_loop.c | 5 ++-
>> linux-user/openrisc/cpu_loop.c | 2 +-
>> linux-user/ppc/cpu_loop.c | 6 ++-
>> linux-user/riscv/cpu_loop.c | 2 +-
>> linux-user/s390x/cpu_loop.c | 2 +-
>> linux-user/sh4/cpu_loop.c | 2 +-
>> linux-user/sparc/cpu_loop.c | 4 +-
>> linux-user/syscall.c | 8 ++++
>> linux-user/xtensa/cpu_loop.c | 3 ++
>> plugins/api.c | 17 +++++++-
>> plugins/core.c | 25 ++++++-----
>> tests/tcg/multiarch/Makefile.target | 42 +++++++++++++++++++
>> .../tcg/multiarch/test-plugin-skip-syscalls.c | 26 ++++++++++++
>> tests/tcg/plugins/syscall.c | 6 +++
>> 25 files changed, 170 insertions(+), 32 deletions(-)
>> create mode 100644 tests/tcg/multiarch/test-plugin-skip-syscalls.c
>>
--
Alex Bennée
Virtualisation Tech Lead @ Linaro
next prev parent reply other threads:[~2025-12-12 12:03 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-06 13:21 [RFC PATCH v2 0/2] Enable PC diversion via the plugin API Florian Hofhammer
2025-10-06 13:22 ` [RFC PATCH v2 1/2] plugins: Add PC diversion API function Florian Hofhammer
2025-12-12 12:35 ` Alex Bennée
2025-12-16 9:27 ` Florian Hofhammer
2025-12-16 12:28 ` Florian Hofhammer
2025-12-16 14:44 ` Alex Bennée
2025-12-16 17:10 ` Alex Bennée
2026-01-07 11:20 ` Florian Hofhammer
2025-10-06 13:23 ` [RFC PATCH v2 2/2] tests/tcg: add test for qemu_plugin_set_pc API Florian Hofhammer
2025-12-12 12:40 ` Alex Bennée
2025-12-16 9:29 ` Florian Hofhammer
2025-10-29 15:57 ` [RFC PATCH v2 0/2] Enable PC diversion via the plugin API Florian Hofhammer
2025-12-12 12:02 ` Alex Bennée [this message]
2025-12-12 17:36 ` Pierrick Bouvier
2025-12-16 9:35 ` Florian Hofhammer
2025-12-16 9:19 ` Florian Hofhammer
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=87ikebucv4.fsf@draig.linaro.org \
--to=alex.bennee@linaro.org \
--cc=berrange@redhat.com \
--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.