[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2] target/riscv: fix user-mode build issue because mhartid
From: |
Alistair Francis |
Subject: |
Re: [PATCH v2] target/riscv: fix user-mode build issue because mhartid |
Date: |
Wed, 29 Jun 2022 12:01:41 +1000 |
On Tue, Jun 28, 2022 at 3:03 AM Rahul Pathak <rpathak@ventanamicro.com> wrote:
>
> mhartid csr is not available in user-mode code path and
> user-mode build fails because of its reference in
> riscv_cpu_realize function
>
> Commit causing the issue is currently in Alistair's
> riscv-to-apply.next branch and need to be squashed there.
>
> Fixes: 7ecee770d40 ("target/riscv: Force disable extensions if priv spec
> version does not match")
Can you please re-send the original patch with the fix? I have removed
this patch from my tree
Alistair
>
> Signed-off-by: Rahul Pathak <rpathak@ventanamicro.com>
> ---
>
> Changes in V2:
> - remove the stray format specifier
> - add the Fixes tag and reference to external tree
> ---
> target/riscv/cpu.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c
> index e4ec05abf4..509923f15e 100644
> --- a/target/riscv/cpu.c
> +++ b/target/riscv/cpu.c
> @@ -636,9 +636,15 @@ static void riscv_cpu_realize(DeviceState *dev, Error
> **errp)
> if (isa_ext_is_enabled(cpu, &isa_edata_arr[i]) &&
> (env->priv_ver < isa_edata_arr[i].min_version)) {
> isa_ext_update_enabled(cpu, &isa_edata_arr[i], false);
> +#ifndef CONFIG_USER_ONLY
> warn_report("disabling %s extension for hart 0x%lx because "
> "privilege spec version does not match",
> isa_edata_arr[i].name, (unsigned long)env->mhartid);
> +#else
> + warn_report("disabling %s extension for hart because "
> + "privilege spec version does not match",
> + isa_edata_arr[i].name);
> +#endif
> }
> }
>
> --
> 2.34.1
>
>