[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC PATCH] arm: force flag recalculation when messing with DAIF
From: |
Andrew Jones |
Subject: |
Re: [RFC PATCH] arm: force flag recalculation when messing with DAIF |
Date: |
Wed, 2 Feb 2022 13:40:16 +0100 |
On Wed, Feb 02, 2022 at 12:23:53PM +0000, Alex Bennée wrote:
> 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>
> Cc: Richard Henderson <richard.henderson@linaro.org>
> Cc: Andrew Jones <drjones@redhat.com>
s/Cc: Andrew/Reported-by: Andrew/
and now also
Tested-by: Andrew Jones <drjones@redhat.com>
Thanks,
drew
> ---
> target/arm/helper-a64.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/target/arm/helper-a64.c b/target/arm/helper-a64.c
> index d6a6fd73d9..7cf953b1e6 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
> --
> 2.30.2
>