Does SFENCE.VMA flush TLBs on all harts?
No. The official semantics apply to the current hart; a multi-hart system must make other harts execute the appropriate address-translation synchronization sequence.
Supervisor address-translation fence: rs1 selects virtual-address scope, rs2 selects ASID scope, synchronizing local page-table updates with later implicit translations.
Extension condition: Supervisor memory-management instruction; base permission statements below assume V=0. H adds VS/VU and VTVM rules.
SFENCE.VMA orders prior stores already visible to this hart before selected implicit references to memory-management data structures by subsequent instructions on this hart, and invalidates selected address-translation cache entries. rs1=x0 covers PTEs at any level; a non-x0 rs1 covers only leaf PTEs for the mapping containing its virtual address. rs2=x0 covers all ASIDs including global mappings; non-x0 selects one ASID and excludes global mappings. The special all-scope selector is register x0, not a zero value in an ordinary register. An invalid VA in a non-x0 rs1 has no effect and raises no exception. Implementations may over-fence. The effect is local; other harts require separate synchronization. It does not replace data-memory FENCE or instruction-fetch synchronization.
Shows the R-type SYSTEM encoding, VA/ASID scope selected by rs1/rs2, and local-hart address-translation ordering.
This V=0 model assumes RV32/Sv32 or RV64/Sv39 and ASIDLEN=ASIDMAX (9/16); high ASID bits are ignored. Non-x0 rs1 selects leaf PTEs only; a zero value differs from x0. Equal nonzero source registers require equal initial values. The VA-valid checkbox supplies the semantic premise rather than deriving it from the number. Results preview the condition and commit only at Done. This animation covers U-mode illegal execution, S-mode execution with TVM=1, and the no-exception/no-effect branch for an invalid nonzero rs1 virtual address. It shows only local-hart semantics and does not model H/VTVM, TLB structures, caches, page-walk latency, or multi-hart shootdown protocols.
Supervisor address-translation fence: rs1 selects virtual-address scope, rs2 selects ASID scope, synchronizing local page-table updates with later implicit translations.
With V=0, execution in S and TVM=0, sfence.vma x0, x0 covers this hart's PTEs at every level, all ASIDs and global mappings. Prior page-table stores must already be visible to this hart; other harts require separate synchronization.
With V=0, execution in S and TVM=0, sfence.vma x0, x0 covers this hart's PTEs at every level, all ASIDs and global mappings. Prior page-table stores must already be visible to this hart; other harts require separate synchronization.
With V=0, execution in S and TVM=0, sfence.vma x0, x0 covers this hart's PTEs at every level, all ASIDs and global mappings. Prior page-table stores must already be visible to this hart; other harts require separate synchronization.
No. The official semantics apply to the current hart; a multi-hart system must make other harts execute the appropriate address-translation synchronization sequence.
rs1 selects virtual-address scope, with x0 meaning all virtual addresses; rs2 selects ASID scope, with x0 meaning all ASIDs and including global mappings, while a non-x0 rs2 scope is not required to order global mappings.