Skip to content

Fixes for vector misaligned load/store handlers

Bo Gan opensbi 2 versions – Applied

Status from this message: Applied this series to the riscv/opensbi repo.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest4 patches 9 repliesApplied
  2. v14 patches 1 replySuperseded

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/4lib: sbi: cosmetic changes to reduce indentationlib/sbi/sbi_trap_v_ldst.c+60 -571 reply
2/4lib: sbi: Rework and split sbi_misaligned(_v)_tinst_fixupinclude/sbi/sbi_trap_ldst.h lib/sbi/sbi_trap_ldst.c lib/sbi/sbi_trap_v_ldst.c+59 -211 reply
3/4lib: sbi: Add variable-length unprivilege access functionsinclude/sbi/sbi_unpriv.h lib/sbi/sbi_trap_ldst.c lib/sbi/sbi_trap_v_ldst.c +1 more+123 -431 reply
4/4lib: sbi: Rework misaligned vector load/storeinclude/sbi/sbi_vector.h lib/sbi/sbi_trap_v_ldst.c+74 -352 replies

Reviews trailers per patch

All 4 patches have a Reviewed-by or Acked-by.

PatchAnirudh SrinivasanAnup Patel
SeriesT-b
1/4R-b
2/4R-b
3/4R-b
4/4R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/4] Fixes for vector misaligned load/store handlers

Re-visit the vector misaligned load/store handlers and fix:

a. Avoid stack overflow by using a small sliding mask[] buffer,
thus optimizes stack usage *IMPORTANT* (correctness). There's no- longer a need to have a pre-defined vlen maximum, and worry about whether the stack can hold the mask[] variable.

b. Maintain the value of vstart when redirecting uptrap. (optmization)
Avoids doing duplicate work when the instruction gets restarted.

c. Explicitly set VS dirty in (V)SSTATUS. (correctness), VS in
VSSTATUS must be set dirty if coming from V=1.

d. Zero out tinst in uptrap if not guest-page fault (correctness).

This is a follow up patch to [1] and should be applied on top.
[1] https://lore.kernel.org/opensbi/CAEev2e_Vg1mMP4mOKanFX_EGeUzpczRcWW++vBBuN1CfyM0BJw@mail.gmail.com/T/#t
---
v2: Fix the wrong PATCH 4/4 generated in v1.

---
Bo Gan (4):
lib: sbi: cosmetic changes to reduce indentation
lib: sbi: Rework and split sbi_misaligned(_v)_tinst_fixup
lib: sbi: Add variable-length unprivilege access functions
lib: sbi: Rework misaligned vector load/store

 include/sbi/sbi_trap_ldst.h |   3 -
 include/sbi/sbi_unpriv.h    |  16 +++
 include/sbi/sbi_vector.h    |   6 ++
 lib/sbi/sbi_trap_ldst.c     |  66 +++++++-----
 lib/sbi/sbi_trap_v_ldst.c   | 201 ++++++++++++++++++++++--------------
 lib/sbi/sbi_unpriv.c        |  88 ++++++++++++++--
 6 files changed, 270 insertions(+), 110 deletions(-)
Signature · 7 lines
2.34.1


-- 
opensbi mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/opensbi