Skip to content

CSR: write tval according to the trap target privilege - #278

Merged
poemonsense merged 1 commit into
masterfrom
circle-patch1
Sep 20, 2026
Merged

poemonsense merged 1 commit into
masterfrom
circle-patch1

Conversation

@good-circle

Copy link
Copy Markdown
Collaborator

Page-fault and misaligned traps wrote mtval/stval from the privilege at the fault, so an S-mode exception that was not delegated still updated stval.

Write the register of the privilege that takes the trap: medeleg(cause) && privilegeMode < M selects stval, otherwise mtval.

Page-fault and misaligned traps wrote mtval/stval from the
privilege at the fault, so an S-mode exception that was not
delegated still updated stval.

Write the register of the privilege that takes the trap:
medeleg(cause) && privilegeMode < M selects stval, otherwise mtval.
@poemonsense
poemonsense merged commit 473068d into master Sep 20, 2026
1 check passed
@poemonsense
poemonsense deleted the circle-patch1 branch September 20, 2026 02:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants