* [PATCH] target/arm: Restrict arm_do_plugin_vcpu_discon_cb() to TCG
@ 2026-08-14 8:05 Philippe Mathieu-Daudé
2026-08-14 8:13 ` Philippe Mathieu-Daudé
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Philippe Mathieu-Daudé @ 2026-08-14 8:05 UTC (permalink / raw)
To: qemu-devel
Cc: Alex Bennée, qemu-arm, Peter Maydell, Pierrick Bouvier,
Philippe Mathieu-Daudé
So far TCG plugins can only be used when TCG is available.
Move the arm_do_plugin_vcpu_discon_cb() call within the
'if tcg_enabled' block and wrap the definition with #ifdef'ry.
Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
---
target/arm/helper.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/target/arm/helper.c b/target/arm/helper.c
index af45234ad2a..adae2b2b8e5 100644
--- a/target/arm/helper.c
+++ b/target/arm/helper.c
@@ -8915,6 +8915,7 @@ static void take_aarch32_exception(CPUARMState *env, int new_mode,
}
}
+#ifdef CONFIG_TCG
void arm_do_plugin_vcpu_discon_cb(CPUState *cs, uint64_t from)
{
switch (cs->exception_index) {
@@ -8932,6 +8933,7 @@ void arm_do_plugin_vcpu_discon_cb(CPUState *cs, uint64_t from)
qemu_plugin_vcpu_exception_cb(cs, from);
}
}
+#endif
static void arm_cpu_do_interrupt_aarch32_hyp(CPUState *cs)
{
@@ -9677,9 +9679,9 @@ void arm_cpu_do_interrupt(CPUState *cs)
if (tcg_enabled()) {
cpu_set_interrupt(cs, CPU_INTERRUPT_EXITTB);
- }
- arm_do_plugin_vcpu_discon_cb(cs, last_pc);
+ arm_do_plugin_vcpu_discon_cb(cs, last_pc);
+ }
}
#endif /* !CONFIG_USER_ONLY */
--
2.53.0
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH] target/arm: Restrict arm_do_plugin_vcpu_discon_cb() to TCG
2026-08-14 8:05 [PATCH] target/arm: Restrict arm_do_plugin_vcpu_discon_cb() to TCG Philippe Mathieu-Daudé
@ 2026-08-14 8:13 ` Philippe Mathieu-Daudé
2026-08-14 15:35 ` Pierrick Bouvier
2026-08-15 15:08 ` Peter Maydell
2 siblings, 0 replies; 6+ messages in thread
From: Philippe Mathieu-Daudé @ 2026-08-14 8:13 UTC (permalink / raw)
To: qemu-devel
Cc: Alex Bennée, qemu-arm, Peter Maydell, Pierrick Bouvier,
qemu-ppc
On 14/8/26 10:05, Philippe Mathieu-Daudé wrote:
> So far TCG plugins can only be used when TCG is available.
> Move the arm_do_plugin_vcpu_discon_cb() call within the
> 'if tcg_enabled' block and wrap the definition with #ifdef'ry.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
> ---
BTW luckily, except PPC, all other targets with HW accelerator
support already have this restricted to TCG (X86, LoongArch,
RISCV, S390x). Since I'm only testing hybrid acceleration on
ARM I don't have the need to do the equivalent cleanup on PPC.
> target/arm/helper.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/target/arm/helper.c b/target/arm/helper.c
> index af45234ad2a..adae2b2b8e5 100644
> --- a/target/arm/helper.c
> +++ b/target/arm/helper.c
> @@ -8915,6 +8915,7 @@ static void take_aarch32_exception(CPUARMState *env, int new_mode,
> }
> }
>
> +#ifdef CONFIG_TCG
> void arm_do_plugin_vcpu_discon_cb(CPUState *cs, uint64_t from)
> {
> switch (cs->exception_index) {
> @@ -8932,6 +8933,7 @@ void arm_do_plugin_vcpu_discon_cb(CPUState *cs, uint64_t from)
> qemu_plugin_vcpu_exception_cb(cs, from);
> }
> }
> +#endif
>
> static void arm_cpu_do_interrupt_aarch32_hyp(CPUState *cs)
> {
> @@ -9677,9 +9679,9 @@ void arm_cpu_do_interrupt(CPUState *cs)
>
> if (tcg_enabled()) {
> cpu_set_interrupt(cs, CPU_INTERRUPT_EXITTB);
> - }
>
> - arm_do_plugin_vcpu_discon_cb(cs, last_pc);
> + arm_do_plugin_vcpu_discon_cb(cs, last_pc);
> + }
> }
> #endif /* !CONFIG_USER_ONLY */
>
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] target/arm: Restrict arm_do_plugin_vcpu_discon_cb() to TCG
2026-08-14 8:05 [PATCH] target/arm: Restrict arm_do_plugin_vcpu_discon_cb() to TCG Philippe Mathieu-Daudé
2026-08-14 8:13 ` Philippe Mathieu-Daudé
@ 2026-08-14 15:35 ` Pierrick Bouvier
2026-08-14 15:35 ` Pierrick Bouvier
2026-08-15 15:08 ` Peter Maydell
2 siblings, 1 reply; 6+ messages in thread
From: Pierrick Bouvier @ 2026-08-14 15:35 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
Cc: Alex Bennée, qemu-arm, Peter Maydell
On 8/14/2026 1:05 AM, Philippe Mathieu-Daudé wrote:
> So far TCG plugins can only be used when TCG is available.
> Move the arm_do_plugin_vcpu_discon_cb() call within the
> 'if tcg_enabled' block and wrap the definition with #ifdef'ry.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
> ---
> target/arm/helper.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] target/arm: Restrict arm_do_plugin_vcpu_discon_cb() to TCG
2026-08-14 15:35 ` Pierrick Bouvier
@ 2026-08-14 15:35 ` Pierrick Bouvier
0 siblings, 0 replies; 6+ messages in thread
From: Pierrick Bouvier @ 2026-08-14 15:35 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
Cc: Alex Bennée, qemu-arm, Peter Maydell
On 8/14/2026 8:35 AM, Pierrick Bouvier wrote:
> On 8/14/2026 1:05 AM, Philippe Mathieu-Daudé wrote:
>> So far TCG plugins can only be used when TCG is available.
>> Move the arm_do_plugin_vcpu_discon_cb() call within the
>> 'if tcg_enabled' block and wrap the definition with #ifdef'ry.
>>
>> Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
>> ---
>> target/arm/helper.c | 6 ++++--
>> 1 file changed, 4 insertions(+), 2 deletions(-)
>>
>
> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
I'll let Peter pull this, even if related to plugins, it belongs to
target/arm.
Regards,
Pierrick
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] target/arm: Restrict arm_do_plugin_vcpu_discon_cb() to TCG
2026-08-14 8:05 [PATCH] target/arm: Restrict arm_do_plugin_vcpu_discon_cb() to TCG Philippe Mathieu-Daudé
2026-08-14 8:13 ` Philippe Mathieu-Daudé
2026-08-14 15:35 ` Pierrick Bouvier
@ 2026-08-15 15:08 ` Peter Maydell
2026-08-15 15:37 ` Philippe Mathieu-Daudé
2 siblings, 1 reply; 6+ messages in thread
From: Peter Maydell @ 2026-08-15 15:08 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: qemu-devel, Alex Bennée, qemu-arm, Pierrick Bouvier
On Fri, 14 Aug 2026 at 09:05, Philippe Mathieu-Daudé
<philmd@oss.qualcomm.com> wrote:
>
> So far TCG plugins can only be used when TCG is available.
> Move the arm_do_plugin_vcpu_discon_cb() call within the
> 'if tcg_enabled' block and wrap the definition with #ifdef'ry.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
Applied to target-arm.next, thanks.
Does this fix any user-facing issue, or is it just something
we need to sort out for hybrid acceleration ?
-- PMM
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] target/arm: Restrict arm_do_plugin_vcpu_discon_cb() to TCG
2026-08-15 15:08 ` Peter Maydell
@ 2026-08-15 15:37 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 6+ messages in thread
From: Philippe Mathieu-Daudé @ 2026-08-15 15:37 UTC (permalink / raw)
To: Peter Maydell; +Cc: qemu-devel, Alex Bennée, qemu-arm, Pierrick Bouvier
On 15/8/26 17:08, Peter Maydell wrote:
> On Fri, 14 Aug 2026 at 09:05, Philippe Mathieu-Daudé
> <philmd@oss.qualcomm.com> wrote:
>>
>> So far TCG plugins can only be used when TCG is available.
>> Move the arm_do_plugin_vcpu_discon_cb() call within the
>> 'if tcg_enabled' block and wrap the definition with #ifdef'ry.
>>
>> Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
>
> Applied to target-arm.next, thanks.
>
> Does this fix any user-facing issue, or is it just something
> we need to sort out for hybrid acceleration ?
Not an user-facing issue so far, but will emerge soon (the
hybrid-accel series is too big and hard to split, I am trying to
split unasorted cleanups of to reduce its size).
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-08-15 15:38 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-14 8:05 [PATCH] target/arm: Restrict arm_do_plugin_vcpu_discon_cb() to TCG Philippe Mathieu-Daudé
2026-08-14 8:13 ` Philippe Mathieu-Daudé
2026-08-14 15:35 ` Pierrick Bouvier
2026-08-14 15:35 ` Pierrick Bouvier
2026-08-15 15:08 ` Peter Maydell
2026-08-15 15:37 ` Philippe Mathieu-Daudé
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.