aboutsummaryrefslogtreecommitdiff
path: root/target/ppc
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2022-11-17 19:11:26 -0800
committerRichard Henderson <richard.henderson@linaro.org>2023-01-04 16:20:01 -0800
commit03ac0a0cfdfd8dd0708c2fb1fdec09319c1add3c (patch)
tree25af73b4f3b4c4a66cbc71443a5e73de39a657fb /target/ppc
parent2fc4f9f3ff2362d4436476087fb13ad26fd2814a (diff)
downloadqemu-03ac0a0cfdfd8dd0708c2fb1fdec09319c1add3c.zip
qemu-03ac0a0cfdfd8dd0708c2fb1fdec09319c1add3c.tar.gz
qemu-03ac0a0cfdfd8dd0708c2fb1fdec09319c1add3c.tar.bz2
target/ppc: Use QEMU_IOTHREAD_LOCK_GUARD in cpu_interrupt_exittb
In addition, use tcg_enabled instead of !kvm_enabled. Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'target/ppc')
-rw-r--r--target/ppc/helper_regs.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/target/ppc/helper_regs.c b/target/ppc/helper_regs.c
index c0aee58..779e7db 100644
--- a/target/ppc/helper_regs.c
+++ b/target/ppc/helper_regs.c
@@ -22,6 +22,7 @@
#include "qemu/main-loop.h"
#include "exec/exec-all.h"
#include "sysemu/kvm.h"
+#include "sysemu/tcg.h"
#include "helper_regs.h"
#include "power8-pmu.h"
#include "cpu-models.h"
@@ -203,17 +204,10 @@ void cpu_interrupt_exittb(CPUState *cs)
{
/*
* We don't need to worry about translation blocks
- * when running with KVM.
+ * unless running with TCG.
*/
- if (kvm_enabled()) {
- return;
- }
-
- if (!qemu_mutex_iothread_locked()) {
- qemu_mutex_lock_iothread();
- cpu_interrupt(cs, CPU_INTERRUPT_EXITTB);
- qemu_mutex_unlock_iothread();
- } else {
+ if (tcg_enabled()) {
+ QEMU_IOTHREAD_LOCK_GUARD();
cpu_interrupt(cs, CPU_INTERRUPT_EXITTB);
}
}