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>
This commit is contained in:
parent
2fc4f9f3ff
commit
03ac0a0cfd
@ -22,6 +22,7 @@
|
|||||||
#include "qemu/main-loop.h"
|
#include "qemu/main-loop.h"
|
||||||
#include "exec/exec-all.h"
|
#include "exec/exec-all.h"
|
||||||
#include "sysemu/kvm.h"
|
#include "sysemu/kvm.h"
|
||||||
|
#include "sysemu/tcg.h"
|
||||||
#include "helper_regs.h"
|
#include "helper_regs.h"
|
||||||
#include "power8-pmu.h"
|
#include "power8-pmu.h"
|
||||||
#include "cpu-models.h"
|
#include "cpu-models.h"
|
||||||
@ -203,17 +204,10 @@ void cpu_interrupt_exittb(CPUState *cs)
|
|||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* We don't need to worry about translation blocks
|
* We don't need to worry about translation blocks
|
||||||
* when running with KVM.
|
* unless running with TCG.
|
||||||
*/
|
*/
|
||||||
if (kvm_enabled()) {
|
if (tcg_enabled()) {
|
||||||
return;
|
QEMU_IOTHREAD_LOCK_GUARD();
|
||||||
}
|
|
||||||
|
|
||||||
if (!qemu_mutex_iothread_locked()) {
|
|
||||||
qemu_mutex_lock_iothread();
|
|
||||||
cpu_interrupt(cs, CPU_INTERRUPT_EXITTB);
|
|
||||||
qemu_mutex_unlock_iothread();
|
|
||||||
} else {
|
|
||||||
cpu_interrupt(cs, CPU_INTERRUPT_EXITTB);
|
cpu_interrupt(cs, CPU_INTERRUPT_EXITTB);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user