diff options
| author | Paolo Bonzini <pbonzini@redhat.com> | 2025-08-29 12:09:09 +0200 |
|---|---|---|
| committer | Paolo Bonzini <pbonzini@redhat.com> | 2025-09-17 19:00:55 +0200 |
| commit | 602d5ebba26b245730a0b6a4855b1812d587725c (patch) | |
| tree | 2159d3d2419975c3de1d9293394fc877d946ff99 /target/avr/helper.c | |
| parent | 11a73c6ea37483f7be85f6afebb4334d97d3050c (diff) | |
| download | focaccia-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/avr/helper.c')
| -rw-r--r-- | target/avr/helper.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/target/avr/helper.c b/target/avr/helper.c index b9cd6d5ef2..4b29ab3526 100644 --- a/target/avr/helper.c +++ b/target/avr/helper.c @@ -47,7 +47,7 @@ bool avr_cpu_exec_interrupt(CPUState *cs, int interrupt_request) cs->exception_index = EXCP_RESET; avr_cpu_do_interrupt(cs); - cs->interrupt_request &= ~CPU_INTERRUPT_RESET; + cpu_reset_interrupt(cs, CPU_INTERRUPT_RESET); return true; } } @@ -59,7 +59,7 @@ bool avr_cpu_exec_interrupt(CPUState *cs, int interrupt_request) env->intsrc &= env->intsrc - 1; /* clear the interrupt */ if (!env->intsrc) { - cs->interrupt_request &= ~CPU_INTERRUPT_HARD; + cpu_reset_interrupt(cs, CPU_INTERRUPT_HARD); } return true; } |