From: abh <314abh@gmail.com>
To: qemu-riscv@nongnu.org
Cc: alistair.francis@wdc.com, palmer@dabbelt.com,
liwei1518@gmail.com, daniel.barboza@oss.qualcomm.com,
zhiwei_liu@linux.alibaba.com, chao.liu@processmission.com,
qemu-devel@nongnu.org
Subject: Re: [PATCH] target/riscv: fix invalid sstc predicate in gdbstub
Date: Fri, 14 Aug 2026 18:42:34 +0530 [thread overview]
Message-ID: <c02148e5-9fb1-44fc-8652-e2f79b4730db@gmail.com> (raw)
In-Reply-To: <20260530053200.902591-1-314abh@gmail.com>
On 5/30/26 11:02 AM, Abhigyan Kumar wrote:
> sstc function incorrectly checks for avaibility of env->rdtime_fn.
> This causes it to fail each time it's called because rdtime_fn is setup
> later in the procedure (when timer devices are created). This prevents
> stimecmp's addition to gdb.
>
> This change ensures only the riscv_cpu_cfg(env) check is done. rdtime_fn
> will always be NULL otherwise and fail.
>
> Resolves: https://gitlab.com/qemu-project/qemu/-/work_items/3496
> Signed-off-by: Abhigyan Kumar <314abh@gmail.com>
> ---
> target/riscv/csr.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/target/riscv/csr.c b/target/riscv/csr.c
> index f5b0895fd..d72df945f 100644
> --- a/target/riscv/csr.c
> +++ b/target/riscv/csr.c
> @@ -590,7 +590,7 @@ static RISCVException sstc(CPURISCVState *env, int csrno)
> {
> bool hmode_check = false;
>
> - if (!riscv_cpu_cfg(env)->ext_sstc || !env->rdtime_fn) {
> + if (!riscv_cpu_cfg(env)->ext_sstc) {
> return RISCV_EXCP_ILLEGAL_INST;
> }
>
Greetings. It has been over two and a half months since I submitted this
patch. It's my humble request to know the status of the
review/acceptance for my patch. Please inform me about any required amends.
Thank you for your patience and attention.
--
Abhigyan Kumar
prev parent reply other threads:[~2026-08-14 13:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-30 5:32 [PATCH] target/riscv: fix invalid sstc predicate in gdbstub Abhigyan Kumar
2026-05-31 20:21 ` Daniel Henrique Barboza
2026-08-14 13:12 ` abh [this message]
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=c02148e5-9fb1-44fc-8652-e2f79b4730db@gmail.com \
--to=314abh@gmail.com \
--cc=alistair.francis@wdc.com \
--cc=chao.liu@processmission.com \
--cc=daniel.barboza@oss.qualcomm.com \
--cc=liwei1518@gmail.com \
--cc=palmer@dabbelt.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-riscv@nongnu.org \
--cc=zhiwei_liu@linux.alibaba.com \
/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