aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Bennée <alex.bennee@linaro.org>2022-02-02 12:23:53 +0000
committerPeter Maydell <peter.maydell@linaro.org>2022-02-08 10:56:28 +0000
commitc737d868047f6ae91325adcd3a40f509753a1d85 (patch)
tree5e9cea2deba9637d947f6276641d39909580db6d
parent40874a383dd9b4bca0f09b07641487919645d8c4 (diff)
downloadqemu-c737d868047f6ae91325adcd3a40f509753a1d85.zip
qemu-c737d868047f6ae91325adcd3a40f509753a1d85.tar.gz
qemu-c737d868047f6ae91325adcd3a40f509753a1d85.tar.bz2
arm: force flag recalculation when messing with DAIF
The recently introduced debug tests in kvm-unit-tests exposed an error in our handling of singlestep cause by stale hflags. This is caught by --enable-debug-tcg when running the tests. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reported-by: Andrew Jones <drjones@redhat.com> Tested-by: Andrew Jones <drjones@redhat.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20220202122353.457084-1-alex.bennee@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r--target/arm/helper-a64.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/target/arm/helper-a64.c b/target/arm/helper-a64.c
index d6a6fd7..7cf953b 100644
--- a/target/arm/helper-a64.c
+++ b/target/arm/helper-a64.c
@@ -83,12 +83,14 @@ void HELPER(msr_i_daifset)(CPUARMState *env, uint32_t imm)
{
daif_check(env, 0x1e, imm, GETPC());
env->daif |= (imm << 6) & PSTATE_DAIF;
+ arm_rebuild_hflags(env);
}
void HELPER(msr_i_daifclear)(CPUARMState *env, uint32_t imm)
{
daif_check(env, 0x1f, imm, GETPC());
env->daif &= ~((imm << 6) & PSTATE_DAIF);
+ arm_rebuild_hflags(env);
}
/* Convert a softfloat float_relation_ (as returned by