[PATCH] Revert "tcg/user: do not set exit_request gratuitously"

Paolo Bonzini posted 1 patch 4 days, 20 hours ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20260202091753.28459-1-pbonzini@redhat.com
Maintainers: Richard Henderson <richard.henderson@linaro.org>, Paolo Bonzini <pbonzini@redhat.com>
accel/tcg/cpu-exec.c | 2 --
1 file changed, 2 deletions(-)
[PATCH] Revert "tcg/user: do not set exit_request gratuitously"
Posted by Paolo Bonzini 4 days, 20 hours ago
This reverts commit b422a7bff64eaf55b8250225533ca1df42c3777e.

The reporter says "The commit breaks go; if you run go build in a loop,
it eventually hangs uninterruptible (except -9) with a couple of zombie
children left over".

Reported-by: Andreas Schwab <schwab@suse.de>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 accel/tcg/cpu-exec.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c
index 7c20d9db122..ad94f96b252 100644
--- a/accel/tcg/cpu-exec.c
+++ b/accel/tcg/cpu-exec.c
@@ -751,7 +751,6 @@ static inline bool cpu_handle_exception(CPUState *cpu, int *ret)
 
 void tcg_kick_vcpu_thread(CPUState *cpu)
 {
-#ifndef CONFIG_USER_ONLY
     /*
      * Ensure cpu_exec will see the reason why the exit request was set.
      * FIXME: this is not always needed.  Other accelerators instead
@@ -759,7 +758,6 @@ void tcg_kick_vcpu_thread(CPUState *cpu)
      * CPU thread; see kvm_arch_pre_run() for example.
      */
     qatomic_store_release(&cpu->exit_request, true);
-#endif
 
     /* Ensure cpu_exec will see the exit request after TCG has exited.  */
     qatomic_store_release(&cpu->neg.icount_decr.u16.high, -1);
-- 
2.52.0
Re: [PATCH] Revert "tcg/user: do not set exit_request gratuitously"
Posted by Richard Henderson 4 days, 2 hours ago
On 2/2/26 19:17, Paolo Bonzini wrote:
> This reverts commit b422a7bff64eaf55b8250225533ca1df42c3777e.
> 
> The reporter says "The commit breaks go; if you run go build in a loop,
> it eventually hangs uninterruptible (except -9) with a couple of zombie
> children left over".
> 
> Reported-by: Andreas Schwab <schwab@suse.de>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>   accel/tcg/cpu-exec.c | 2 --
>   1 file changed, 2 deletions(-)
> 
> diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c
> index 7c20d9db122..ad94f96b252 100644
> --- a/accel/tcg/cpu-exec.c
> +++ b/accel/tcg/cpu-exec.c
> @@ -751,7 +751,6 @@ static inline bool cpu_handle_exception(CPUState *cpu, int *ret)
>   
>   void tcg_kick_vcpu_thread(CPUState *cpu)
>   {
> -#ifndef CONFIG_USER_ONLY
>       /*
>        * Ensure cpu_exec will see the reason why the exit request was set.
>        * FIXME: this is not always needed.  Other accelerators instead
> @@ -759,7 +758,6 @@ void tcg_kick_vcpu_thread(CPUState *cpu)
>        * CPU thread; see kvm_arch_pre_run() for example.
>        */
>       qatomic_store_release(&cpu->exit_request, true);
> -#endif
>   
>       /* Ensure cpu_exec will see the exit request after TCG has exited.  */
>       qatomic_store_release(&cpu->neg.icount_decr.u16.high, -1);

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~
Re: [PATCH] Revert "tcg/user: do not set exit_request gratuitously"
Posted by Richard Henderson 4 days, 1 hour ago
On 2/3/26 12:50, Richard Henderson wrote:
> On 2/2/26 19:17, Paolo Bonzini wrote:
>> This reverts commit b422a7bff64eaf55b8250225533ca1df42c3777e.
>>
>> The reporter says "The commit breaks go; if you run go build in a loop,
>> it eventually hangs uninterruptible (except -9) with a couple of zombie
>> children left over".
>>
>> Reported-by: Andreas Schwab <schwab@suse.de>
>> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
>> ---
>>   accel/tcg/cpu-exec.c | 2 --
>>   1 file changed, 2 deletions(-)
>>
>> diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c
>> index 7c20d9db122..ad94f96b252 100644
>> --- a/accel/tcg/cpu-exec.c
>> +++ b/accel/tcg/cpu-exec.c
>> @@ -751,7 +751,6 @@ static inline bool cpu_handle_exception(CPUState *cpu, int *ret)
>>   void tcg_kick_vcpu_thread(CPUState *cpu)
>>   {
>> -#ifndef CONFIG_USER_ONLY
>>       /*
>>        * Ensure cpu_exec will see the reason why the exit request was set.
>>        * FIXME: this is not always needed.  Other accelerators instead
>> @@ -759,7 +758,6 @@ void tcg_kick_vcpu_thread(CPUState *cpu)
>>        * CPU thread; see kvm_arch_pre_run() for example.
>>        */
>>       qatomic_store_release(&cpu->exit_request, true);
>> -#endif
>>       /* Ensure cpu_exec will see the exit request after TCG has exited.  */
>>       qatomic_store_release(&cpu->neg.icount_decr.u16.high, -1);
> 
> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

Queued, thanks.

r~