aboutsummaryrefslogtreecommitdiff
path: root/target/ppc/helper_regs.c
diff options
context:
space:
mode:
authorMatheus Ferst <matheus.ferst@eldorado.org.br>2022-10-21 11:21:54 -0300
committerDaniel Henrique Barboza <danielhb413@gmail.com>2022-10-28 13:15:22 -0300
commit2fdedcbc69564f52a1c33bedfa291707e998a132 (patch)
tree445127d2d72a83b5ccb54350a9589fd072a6f962 /target/ppc/helper_regs.c
parent6a8e8188c3c99e987e3d5b9df614a68a5d4bd1e0 (diff)
downloadqemu-2fdedcbc69564f52a1c33bedfa291707e998a132.zip
qemu-2fdedcbc69564f52a1c33bedfa291707e998a132.tar.gz
qemu-2fdedcbc69564f52a1c33bedfa291707e998a132.tar.bz2
target/ppc: introduce ppc_maybe_interrupt
This new method will check if any pending interrupt was unmasked and then call cpu_interrupt/cpu_reset_interrupt accordingly. Code that raises/lowers or masks/unmasks interrupts should call this method to keep CPU_INTERRUPT_HARD coherent with env->pending_interrupts. Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br> Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com> Message-Id: <20221021142156.4134411-2-matheus.ferst@eldorado.org.br> Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Diffstat (limited to 'target/ppc/helper_regs.c')
-rw-r--r--target/ppc/helper_regs.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/target/ppc/helper_regs.c b/target/ppc/helper_regs.c
index 12235ea..2e85e12 100644
--- a/target/ppc/helper_regs.c
+++ b/target/ppc/helper_regs.c
@@ -260,6 +260,8 @@ int hreg_store_msr(CPUPPCState *env, target_ulong value, int alter_hv)
env->msr = value;
hreg_compute_hflags(env);
#if !defined(CONFIG_USER_ONLY)
+ ppc_maybe_interrupt(env);
+
if (unlikely(FIELD_EX64(env->msr, MSR, POW))) {
if (!env->pending_interrupts && (*env->check_pow)(env)) {
cs->halted = 1;