diff options
| author | Paolo Bonzini <pbonzini@redhat.com> | 2025-08-01 14:46:27 +0200 |
|---|---|---|
| committer | Paolo Bonzini <pbonzini@redhat.com> | 2025-09-17 19:00:56 +0200 |
| commit | b422a7bff64eaf55b8250225533ca1df42c3777e (patch) | |
| tree | 897b06f78486796ca324c1003a1b014e31d60e9c /accel/tcg/cpu-exec.c | |
| parent | d5e33b5f8f5a787bc4bb38bd0b9a8c3e3a0aa9f0 (diff) | |
| download | focaccia-qemu-b422a7bff64eaf55b8250225533ca1df42c3777e.tar.gz focaccia-qemu-b422a7bff64eaf55b8250225533ca1df42c3777e.zip | |
tcg/user: do not set exit_request gratuitously
Whenever user-mode emulation needs to go all the way out of the cpu exec loop, it uses cpu_exit(), which already sets cpu->exit_request. Therefore, there is no need for tcg_kick_vcpu_thread() to set cpu->exit_request again outside system emulation. Reviewed-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'accel/tcg/cpu-exec.c')
| -rw-r--r-- | accel/tcg/cpu-exec.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c index ad94f96b25..7c20d9db12 100644 --- a/accel/tcg/cpu-exec.c +++ b/accel/tcg/cpu-exec.c @@ -751,6 +751,7 @@ 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 @@ -758,6 +759,7 @@ 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); |