Is SFENCE.INVAL.IR the same as FENCE.I?
No. This fence orders page-table references; FENCE.I synchronizes instruction fetching.
Svinval trailing ordering instruction: orders prior SINVAL.VMA invalidations before subsequent implicit page-table references; with H, it also combines with HINVAL.*.
SFENCE.INVAL.IR is the trailing ordering boundary for a split Svinval invalidation sequence and has no explicit assembly operands. It orders prior SINVAL.VMA invalidations by the current hart before subsequent implicit references by that hart to memory-management data structures. With H, it also combines with HINVAL.VVMA or HINVAL.GVMA. It does not select a VA/ASID invalidation scope and is not an instruction-cache flush; the typical sequence is SFENCE.W.INVAL -> one or more SINVAL.VMA -> SFENCE.INVAL.IR.
Shows the fixed SYSTEM encoding and ordering boundary in an Svinval sequence; this instruction has no explicit assembly operands.
This animation shows only the local-hart invalidation/ordering relation defined by the privileged architecture; it does not simulate TLB structures, cache flushes, page-walk latency, IPIs, or OS shootdown protocols.
SFENCE.INVAL.IR is the closing bracket of an Svinval sequence: it orders prior invalidations before later implicit page-table references.
Assume Svinval, S-mode, and one hart executing SFENCE.W.INVAL → SINVAL.VMA x0,x0 → SFENCE.INVAL.IR in order. The leading fence orders prior stores already visible to that hart; the trailing fence orders later implicit page-table references. Neither boundary selects an invalidation scope or writes a general register.
Assume Svinval, S-mode, and one hart executing SFENCE.W.INVAL → SINVAL.VMA x0,x0 → SFENCE.INVAL.IR in order. The leading fence orders prior stores already visible to that hart; the trailing fence orders later implicit page-table references. Neither boundary selects an invalidation scope or writes a general register.
Assume Svinval, S-mode, and one hart executing SFENCE.W.INVAL → SINVAL.VMA x0,x0 → SFENCE.INVAL.IR in order. The leading fence orders prior stores already visible to that hart; the trailing fence orders later implicit page-table references. Neither boundary selects an invalidation scope or writes a general register.
Assume Svinval, S-mode, and one hart executing SFENCE.W.INVAL → SINVAL.VMA x0,x0 → SFENCE.INVAL.IR in order. The leading fence orders prior stores already visible to that hart; the trailing fence orders later implicit page-table references. Neither boundary selects an invalidation scope or writes a general register.
No. This fence orders page-table references; FENCE.I synchronizes instruction fetching.
It orders prior SINVAL.VMA before later implicit memory-management references; with H, also combines with HINVAL.*.