On Wed, 2026-09-30 at 19:45 +0200, Philippe Mathieu-Daudé wrote:
> riscv_cpu_set_mode() only want the interrupt re-poll: the mip update
> with a zero mask is a no-op. Call riscv_cpu_interrupt() directly.
> 
> Suggested-by: Richard Henderson <[email protected]>
> Signed-off-by: Philippe Mathieu-Daudé <[email protected]>

Reviewed-by: Alistair Francis <[email protected]>

Alistair

> ---
>  target/riscv/tcg/cpu_helper.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/target/riscv/tcg/cpu_helper.c
> b/target/riscv/tcg/cpu_helper.c
> index 07d92226527..91f5eb72930 100644
> --- a/target/riscv/tcg/cpu_helper.c
> +++ b/target/riscv/tcg/cpu_helper.c
> @@ -886,7 +886,7 @@ void riscv_cpu_set_mode(CPURISCVState *env,
> privilege_mode_t newpriv,
>               *
>               * To solve this, we check and inject interrupt after
> setting V=1.
>               */
> -            riscv_cpu_update_mip(env, 0, 0);
> +            riscv_cpu_interrupt(env);
>          }
>      }
>  }

Reply via email to