On Wed, Sep 24, 2025 at 06:45:15PM +0200, Philippe Mathieu-Daudé wrote:
> Use the existing riscv_cpu_is_32bit() helper to check for 32-bit CPU.
> 
> Signed-off-by: Philippe Mathieu-Daudé <phi...@linaro.org>
> ---
>  target/riscv/kvm/kvm-cpu.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/target/riscv/kvm/kvm-cpu.c b/target/riscv/kvm/kvm-cpu.c
> index 5c19062c19b..187c2c9501e 100644
> --- a/target/riscv/kvm/kvm-cpu.c
> +++ b/target/riscv/kvm/kvm-cpu.c
> @@ -1588,7 +1588,7 @@ static void kvm_riscv_handle_sbi_dbcn(CPUState *cs, 
> struct kvm_run *run)
>           * Handle the case where a 32 bit CPU is running in a
>           * 64 bit addressing env.
>           */
> -        if (riscv_cpu_mxl(&cpu->env) == MXL_RV32) {
> +        if (riscv_cpu_is_32bit(cpu)) {
>              addr |= (uint64_t)run->riscv_sbi.args[2] << 32;
>          }
>  
> -- 
> 2.51.0
> 
>

Reviewed-by: Andrew Jones <ajo...@ventanamicro.com>

Reply via email to