public inbox for qemu-devel@nongnu.org
 help / color / mirror / Atom feed
From: Michael Tokarev <mjt@tls.msk.ru>
To: Max Chou <max.chou@sifive.com>,
	qemu-devel@nongnu.org, qemu-riscv@nongnu.org
Cc: 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>,
	qemu-stable <qemu-stable@nongnu.org>
Subject: Re: [PATCH 0/2] Fix probe_pages and vext_ldff issues
Date: Fri, 20 Mar 2026 23:53:51 +0300	[thread overview]
Message-ID: <9843f984-b58b-422c-a823-11a497510709@tls.msk.ru> (raw)
In-Reply-To: <20260318013805.1920377-1-max.chou@sifive.com>

On 18.03.2026 04:38, Max Chou 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

This feels like a qemu-stable material but I'm not sure about that.

Please let me know if these fixes should be picked up for the current
stable releases of qemu, especially for 10.0.x series which is currently
an LTS series.

Thanks,

/mjt


  parent reply	other threads:[~2026-03-20 20:54 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 ` [PATCH 0/2] Fix probe_pages and vext_ldff issues Alistair Francis
2026-03-20 20:53 ` Michael Tokarev [this message]
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=9843f984-b58b-422c-a823-11a497510709@tls.msk.ru \
    --to=mjt@tls.msk.ru \
    --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=qemu-stable@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