qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Alistair Francis <alistair23@gmail.com>
To: Vladimir Isaev <vladimir.isaev@syntacore.com>
Cc: richard.henderson@linaro.org, palmer@dabbelt.com,
	alistair.francis@wdc.com, bmeng.cn@gmail.com,
	liwei1518@gmail.com, dbarboza@ventanamicro.com,
	 zhiwei_liu@linux.alibaba.com, qemu-riscv@nongnu.org,
	qemu-devel@nongnu.org
Subject: Re: [PATCH] target/riscv: do not use translator_ldl in opcode_at
Date: Mon, 29 Sep 2025 10:42:27 +1000	[thread overview]
Message-ID: <CAKmqyKN0Ro9nLvq7MqYHf3byFBCyMHTvy=sJf0Epqh0E4pwhdg@mail.gmail.com> (raw)
In-Reply-To: <20250815140633.86920-1-vladimir.isaev@syntacore.com>

On Sat, Aug 16, 2025 at 12:08 AM Vladimir Isaev
<vladimir.isaev@syntacore.com> wrote:
>
> opcode_at is used only in semihosting checks to match opcodes with expected pattern.
>
> This is not a translator and if we got following assert if page is not in TLB:
> qemu-system-riscv64: ../accel/tcg/translator.c:363: record_save: Assertion `offset == db->record_start + db->record_len' failed.
>
> Fixes: 1f9c4462334f ("target/riscv: Use translator_ld* for everything")
> Signed-off-by: Vladimir Isaev <vladimir.isaev@syntacore.com>

Thanks!

Applied to riscv-to-apply.next

Alistair

> ---
>  target/riscv/translate.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/target/riscv/translate.c b/target/riscv/translate.c
> index b1e41cdbf1f6..980a67ea855e 100644
> --- a/target/riscv/translate.c
> +++ b/target/riscv/translate.c
> @@ -25,6 +25,7 @@
>  #include "exec/helper-gen.h"
>
>  #include "exec/translator.h"
> +#include "exec/cpu_ldst.h"
>  #include "exec/log.h"
>  #include "semihosting/semihost.h"
>
> @@ -1143,7 +1144,7 @@ static uint32_t opcode_at(DisasContextBase *dcbase, target_ulong pc)
>      CPUState *cpu = ctx->cs;
>      CPURISCVState *env = cpu_env(cpu);
>
> -    return translator_ldl(env, &ctx->base, pc);
> +    return cpu_ldl_code(env, pc);
>  }
>
>  #define SS_MMU_INDEX(ctx) (ctx->mem_idx | MMU_IDX_SS_WRITE)
> --
> 2.50.1
>
>


  parent reply	other threads:[~2025-09-29  0:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-15 14:06 [PATCH] target/riscv: do not use translator_ldl in opcode_at Vladimir Isaev
2025-08-27  4:51 ` Richard Henderson
2025-09-29  0:42 ` Alistair Francis [this message]
2025-10-04  7:29 ` Michael Tokarev

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='CAKmqyKN0Ro9nLvq7MqYHf3byFBCyMHTvy=sJf0Epqh0E4pwhdg@mail.gmail.com' \
    --to=alistair23@gmail.com \
    --cc=alistair.francis@wdc.com \
    --cc=bmeng.cn@gmail.com \
    --cc=dbarboza@ventanamicro.com \
    --cc=liwei1518@gmail.com \
    --cc=palmer@dabbelt.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-riscv@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=vladimir.isaev@syntacore.com \
    --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;
as well as URLs for NNTP newsgroup(s).