From: Andrew Jones <ajones@ventanamicro.com>
To: Andreas Schwab <schwab@suse.de>
Cc: qemu-devel@nongnu.org, Alexandre Ghiti <alexghiti@rivosinc.com>,
Bin Meng <bmeng@tinylab.org>,
Frank Chang <frank.chang@sifive.com>,
Alistair Francis <alistair.francis@wdc.com>,
Palmer Dabbelt <palmer@rivosinc.com>
Subject: Re: [PATCH] riscv: Call set_satp_mode_max_supported in riscv_host_cpu_init
Date: Tue, 19 Sep 2023 13:18:31 +0200 [thread overview]
Message-ID: <20230919-853624bc6079021587741eb4@orel> (raw)
In-Reply-To: <mvm34zavbmb.fsf@suse.de>
On Tue, Sep 19, 2023 at 09:57:32AM +0200, Andreas Schwab wrote:
> When running in KVM mode with -cpu host, cfg.satp_mode.supported is not
> initialized, causing an infinite loop in riscv_cpu_satp_mode_finalize.
>
> Fixes: 6df3747a27 ("riscv: Introduce satp mode hw capabilities")
> Signed-off-by: Andreas Schwab <schwab@suse.de>
> ---
> target/riscv/cpu.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c
> index f227c7664e..bb8dc3bb40 100644
> --- a/target/riscv/cpu.c
> +++ b/target/riscv/cpu.c
> @@ -623,8 +623,10 @@ static void riscv_host_cpu_init(Object *obj)
> CPURISCVState *env = &RISCV_CPU(obj)->env;
> #if defined(TARGET_RISCV32)
> set_misa(env, MXL_RV32, 0);
> + set_satp_mode_max_supported(RISCV_CPU(obj), VM_1_10_SV32);
> #elif defined(TARGET_RISCV64)
> set_misa(env, MXL_RV64, 0);
> + set_satp_mode_max_supported(RISCV_CPU(obj), VM_1_10_SV57);
> #endif
> riscv_cpu_add_user_properties(obj);
> }
> --
> 2.42.0
>
This should be fixed by
https://lore.kernel.org/all/20230911064320.939791-37-alistair.francis@wdc.com/
Thanks,
drew
next prev parent reply other threads:[~2023-09-19 11:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-19 7:57 [PATCH] riscv: Call set_satp_mode_max_supported in riscv_host_cpu_init Andreas Schwab
2023-09-19 11:18 ` Andrew Jones [this message]
2023-09-20 13:31 ` Andreas Schwab
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230919-853624bc6079021587741eb4@orel \
--to=ajones@ventanamicro.com \
--cc=alexghiti@rivosinc.com \
--cc=alistair.francis@wdc.com \
--cc=bmeng@tinylab.org \
--cc=frank.chang@sifive.com \
--cc=palmer@rivosinc.com \
--cc=qemu-devel@nongnu.org \
--cc=schwab@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).