Fix probe_pages and vext_ldff issues
Status from this message: Applied to riscv-to-apply.next
Get series with b4
b4 am [email protected]Versions newest first
Patches in v1 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | target/riscv: rvv: Fix missing flags merge in probe_pages for cross-page accessestarget/ | +3 | 1 reply | |
| 2/2 | target/riscv: rvv: Fix page probe issues in vext_ldfftarget/ | +4 | 1 reply |
Reviews trailers per patch
All 2 patches have a Reviewed-by or Acked-by.
| Patch | Alistair Francis |
|---|---|
| 1/2 | R-b |
| 2/2 | A-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/2] Fix probe_pages and vext_ldff issues
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
target/riscv/vector_helper.c | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-)
Signature · 1 line
2.43.7