public inbox for qemu-devel@nongnu.org
 help / color / mirror / Atom feed
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 0/2] Fix probe_pages and vext_ldff issues
Date: Thu, 19 Mar 2026 13:30:36 +1000	[thread overview]
Message-ID: <CAKmqyKPnN13mVeTc6mBgMHvx1FnyjT_4yyYWh1nPR8ad8r77dQ@mail.gmail.com> (raw)
In-Reply-To: <20260318013805.1920377-1-max.chou@sifive.com>

On Wed, Mar 18, 2026 at 11:38 AM Max Chou <max.chou@sifive.com> wrote:
>
> This patchset fixes following issues in the RISC-V vector
> fault-only-first load implementation and the probe_pages helper
> function.
>
> 1. probe_pages flag handling:
>    When probing memory spanning two pages, probe_pages calls
>    probe_access_flags twice. The flags from the second page were
>    overwriting the first page's flags instead of being merged, causing
>    watchpoint and other TLB attributes to be lost.
>
> 2. vext_ldff cross-page logic:
>    The manual two-phase probing in vext_ldff had three issues:
>    a) Wrong condition: checked "env->vl > elems" instead of
>       "env->vl > elems + env->vstart", missing the vstart offset
>    b) Wrong address: used "addr + (elems << log2_esz)" instead of
>       "addr + page_split", probing incorrect addresses for segment
>       loads (nf > 1)
>    c) Wrong size: used "elems * msize" (first page size) instead of
>       calculating remaining size, potentially missing faults
>
>
> Patch 1 fixes the probe_pages helper to properly merge flags from both
> pages.
>
> Patch 2 fixes vext_ldff by replacing the buggy manual cross-page logic
> by a single probe_pages call with the correct total size. This
> leverages the infrastructure that probe_pages already provides for
> handling cross-page accesses automatically.
>
> rnax
>
>
> Max Chou (2):
>   target/riscv: rvv: Fix missing flags merge in probe_pages for
>     cross-page accesses
>   target/riscv: rvv: Fix page probe issues in vext_ldff

Thanks!

Applied to riscv-to-apply.next

Alistair

>
>  target/riscv/vector_helper.c | 23 +++++++----------------
>  1 file changed, 7 insertions(+), 16 deletions(-)
>
> --
> 2.43.7
>
>


  parent reply	other threads:[~2026-03-19  3:31 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
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 ` Alistair Francis [this message]
2026-03-20 20:53 ` [PATCH 0/2] Fix probe_pages and vext_ldff issues 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=CAKmqyKPnN13mVeTc6mBgMHvx1FnyjT_4yyYWh1nPR8ad8r77dQ@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