]> git.ipfire.org Git - thirdparty/qemu.git/commit
add cpu_test_interrupt()/cpu_set_interrupt() helpers and use them tree wide
authorIgor Mammedov <imammedo@redhat.com>
Thu, 21 Aug 2025 15:56:03 +0000 (17:56 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 29 Aug 2025 10:48:14 +0000 (12:48 +0200)
commit87511341c30d8c9c77178db16491a0ccacc5d64b
treef2a99d1629f140c57cd7bdfcae4f5fd681763d94
parentb8217bbaf2bafef1a4f54082a3548613eeef8f2b
add cpu_test_interrupt()/cpu_set_interrupt() helpers and use them tree wide

The helpers form load-acquire/store-release pair and ensure
that appropriate barriers are in place in case checks happen
outside of BQL.

Use them to replace open-coded checkers/setters across the code,
to make sure that barriers are not missed.  Helpers also make code a
bit more readable.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Jason J. Herne <jjherne@linux.ibm.com>
Link: https://lore.kernel.org/r/20250821155603.2422553-1-imammedo@redhat.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
34 files changed:
accel/tcg/cpu-exec.c
accel/tcg/tcg-accel-ops.c
hw/intc/s390_flic.c
hw/openrisc/cputimer.c
include/hw/core/cpu.h
system/cpus.c
target/alpha/cpu.c
target/arm/cpu.c
target/arm/helper.c
target/arm/hvf/hvf.c
target/avr/cpu.c
target/hppa/cpu.c
target/i386/hvf/hvf.c
target/i386/hvf/x86hvf.c
target/i386/kvm/kvm.c
target/i386/nvmm/nvmm-all.c
target/i386/tcg/system/seg_helper.c
target/i386/tcg/system/svm_helper.c
target/i386/whpx/whpx-all.c
target/loongarch/cpu.c
target/m68k/cpu.c
target/microblaze/cpu.c
target/mips/cpu.c
target/mips/kvm.c
target/openrisc/cpu.c
target/ppc/cpu_init.c
target/ppc/kvm.c
target/rx/cpu.c
target/rx/helper.c
target/s390x/cpu-system.c
target/sh4/cpu.c
target/sh4/helper.c
target/sparc/cpu.c
target/sparc/int64_helper.c