Is it a normal user-mode instruction?
No. These instructions are constrained by privilege level and extension support; user-mode legality must follow the privileged rules.
Sync virtual memory: invalidate local TLBs by rs1(VA) and rs2(ASID). rs1=x0=all, rs2=x0=all. Required after page table mod.
SFENCE.VMA synchronizes updates to memory-management data structures with subsequent implicit address translations by the current hart. rs1 selects a virtual address (x0 for all addresses), and rs2 selects an ASID (x0 for all ASIDs). It affects only the local hart; multi-hart TLB shootdown requires remote harts to execute the appropriate fence/invalidation sequence. It synchronizes address-translation caches, not the instruction cache; modified executable code still requires FENCE.I as specified by Zifencei.
SFENCE.VMA 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 «sfence.vma x0, x0 # Invalidate all TLB entries».
Understand this scenario with real code like «sfence.vma x0, x0 # Invalidate all TLB entries».
Understand this scenario with real code like «sfence.vma x0, x0 # Invalidate all TLB entries».
No. These instructions are constrained by privilege level and extension support; user-mode legality must follow the privileged rules.
No. Address translation, instruction fetch, and data-memory ordering use different fence/invalidation instructions.