[RFC PATCH 0/3] Set hstatus.GVA when redirecting traps
dramforever
dramforever at live.com
Tue Aug 2 22:15:01 PDT 2022
The privileged spec says that on a trap to HS-mode, hstatus.GVA should
be set to 1 if stval is written with a guest virtual address, and 0
otherwise. This series implements setting hstatus.GVA in
sbi_trap_redirect().
I'm submitting this as an RFC since this series changes sbi_trap_info to
record mstatus.GVA, and later copy to hstatus.GVA, which might not be
desirable or could be done in a better way.
dramforever (3):
include: Add mstatus[h].GVA encodings
lib: sbi_trap: Save mstatus.GVA in trap->gva
lib: sbi_trap: Set hstatus.GVA when redirecting
include/sbi/riscv_encoding.h | 4 ++++
include/sbi/sbi_trap.h | 6 +++++-
lib/sbi/sbi_expected_trap.S | 14 ++++++++++++--
lib/sbi/sbi_trap.c | 13 ++++++++-----
4 files changed, 29 insertions(+), 8 deletions(-)
--
2.37.1
More information about the opensbi
mailing list