From: Alistair Francis <alistair23@gmail.com>
To: Max Chou <max.chou@sifive.com>
Cc: qemu-devel@nongnu.org, qemu-riscv@nongnu.org,
Palmer Dabbelt <palmer@dabbelt.com>,
Alistair Francis <alistair.francis@wdc.com>,
Weiwei Li <liwei1518@gmail.com>,
Daniel Henrique Barboza <daniel.barboza@oss.qualcomm.com>,
Liu Zhiwei <zhiwei_liu@linux.alibaba.com>,
Chao Liu <chao.liu.zevorn@gmail.com>
Subject: Re: [PATCH 1/2] target/riscv: rvv: Fix missing flags merge in probe_pages for cross-page accesses
Date: Thu, 19 Mar 2026 13:23:58 +1000 [thread overview]
Message-ID: <CAKmqyKNeydJiQHHcpG8KkEonmcGWNd9a84pQdsxDE-2RPjcSug@mail.gmail.com> (raw)
In-Reply-To: <20260318013805.1920377-2-max.chou@sifive.com>
On Wed, Mar 18, 2026 at 11:38 AM Max Chou <max.chou@sifive.com> wrote:
>
> When probe_pages probes a memory region that spans two pages, it calls
> probe_access_flags twice - once for each page. However, the flags from
> the second page probe were overwriting the flags from the first page
> instead of being merged together.
>
> Signed-off-by: Max Chou <max.chou@sifive.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Alistair
> ---
> target/riscv/vector_helper.c | 7 +++----
> 1 file changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/target/riscv/vector_helper.c b/target/riscv/vector_helper.c
> index 3334662dcd..a74ce70943 100644
> --- a/target/riscv/vector_helper.c
> +++ b/target/riscv/vector_helper.c
> @@ -265,9 +265,9 @@ static void probe_pages(CPURISCVState *env, target_ulong addr, target_ulong len,
> addr += curlen;
> curlen = len - curlen;
> if (flags != NULL) {
> - *flags = probe_access_flags(env, adjust_addr(env, addr), curlen,
> - access_type, mmu_index, nonfault,
> - host, ra);
> + *flags |= probe_access_flags(env, adjust_addr(env, addr), curlen,
> + access_type, mmu_index, nonfault,
> + host, ra);
> } else {
> probe_access(env, adjust_addr(env, addr), curlen, access_type,
> mmu_index, ra);
> @@ -275,7 +275,6 @@ static void probe_pages(CPURISCVState *env, target_ulong addr, target_ulong len,
> }
> }
>
> -
> static inline void vext_set_elem_mask(void *v0, int index,
> uint8_t value)
> {
> --
> 2.43.7
>
>
next prev parent reply other threads:[~2026-03-19 3:25 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-18 1:38 [PATCH 0/2] Fix probe_pages and vext_ldff issues Max Chou
2026-03-18 1:38 ` [PATCH 1/2] target/riscv: rvv: Fix missing flags merge in probe_pages for cross-page accesses Max Chou
2026-03-19 3:23 ` Alistair Francis [this message]
2026-03-18 1:38 ` [PATCH 2/2] target/riscv: rvv: Fix page probe issues in vext_ldff Max Chou
2026-03-19 3:25 ` Alistair Francis
2026-03-19 3:30 ` [PATCH 0/2] Fix probe_pages and vext_ldff issues Alistair Francis
2026-03-20 20:53 ` Michael Tokarev
2026-03-23 7:08 ` Max Chou
2026-03-23 7:26 ` Michael Tokarev
2026-03-23 8:19 ` Max Chou
2026-03-23 10:57 ` Paolo Savini
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=CAKmqyKNeydJiQHHcpG8KkEonmcGWNd9a84pQdsxDE-2RPjcSug@mail.gmail.com \
--to=alistair23@gmail.com \
--cc=alistair.francis@wdc.com \
--cc=chao.liu.zevorn@gmail.com \
--cc=daniel.barboza@oss.qualcomm.com \
--cc=liwei1518@gmail.com \
--cc=max.chou@sifive.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