summary refs log tree commit diff stats
path: root/target/openrisc/sys_helper.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2025-08-29 12:09:09 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2025-09-17 19:00:55 +0200
commit602d5ebba26b245730a0b6a4855b1812d587725c (patch)
tree2159d3d2419975c3de1d9293394fc877d946ff99 /target/openrisc/sys_helper.c
parent11a73c6ea37483f7be85f6afebb4334d97d3050c (diff)
downloadfocaccia-qemu-602d5ebba26b245730a0b6a4855b1812d587725c.tar.gz
focaccia-qemu-602d5ebba26b245730a0b6a4855b1812d587725c.zip
treewide: clear bits of cs->interrupt_request with cpu_reset_interrupt()
Open coding cpu_reset_interrupt() can cause bugs if the BQL is not
taken, for example i386 has the call chain kvm_cpu_exec() ->
kvm_put_vcpu_events() -> kvm_arch_put_registers().

Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'target/openrisc/sys_helper.c')
-rw-r--r--target/openrisc/sys_helper.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/target/openrisc/sys_helper.c b/target/openrisc/sys_helper.c
index d96b41a01c..b091a9c668 100644
--- a/target/openrisc/sys_helper.c
+++ b/target/openrisc/sys_helper.c
@@ -196,7 +196,7 @@ void HELPER(mtspr)(CPUOpenRISCState *env, target_ulong spr, target_ulong rb)
                 env->ttmr = (rb & ~TTMR_IP) | ip;
             } else {    /* Clear IP bit.  */
                 env->ttmr = rb & ~TTMR_IP;
-                cs->interrupt_request &= ~CPU_INTERRUPT_TIMER;
+                cpu_reset_interrupt(cs, CPU_INTERRUPT_TIMER);
             }
             cpu_openrisc_timer_update(cpu);
             bql_unlock();