Does MNRET change MRET or SRET?
No. MRET and SRET are unaffected by mnstatus.NMIE and do not change it; MNRET performs the RNMI return.
Return from an Smrnmi RNMI handler: restore pc from mnepc and privilege/virtualization state from mnstatus.
MNRET is the M-mode-only return instruction added by Smrnmi. It uses mnepc and mnstatus to return to the interrupted program counter, privilege mode, and virtualization mode, sets mnstatus.NMIE, and clears mstatus.MPRV if returning below M-mode.
Shows only Smrnmi-defined mnepc, MNPP/MNPV, NMIE, and conditional MPRV state.
mnretMNRET is a system-level instruction defined by the privileged architecture. This page covers architectural semantics only, not platform firmware policy.
Understand this scenario with real code like «mnret # Return from NMI handler».
Understand this scenario with real code like «mnret # Return from NMI handler».
No. MRET and SRET are unaffected by mnstatus.NMIE and do not change it; MNRET performs the RNMI return.
MNRET clears mstatus.MPRV when mnstatus.MNPP specifies a return privilege mode below M-mode.