Is rs2 a VMID for HINVAL.VVMA?
No. rs2 is ASID; the current VMID comes from virtualization context.
Svinval/H VS-stage translation invalidation: rs1 selects guest virtual address, rs2 selects ASID, and current VMID comes from virtualization context.
HINVAL.VVMA is the Hypervisor + Svinval VS-stage address-translation-cache invalidation instruction. It invalidates VS-stage translation-cache entries matching the guest virtual address in rs1 and ASID in rs2; rs1=x0 selects all guest virtual addresses, and rs2=x0 selects all ASIDs. The current VMID comes from virtualization context rather than rs2. It does not guarantee full ordering alone; SFENCE.W.INVAL and SFENCE.INVAL.IR supply the sequence ordering boundaries. Implementations may use the full matching HFENCE.
Svinval/H VS-stage invalidation: shows SYSTEM encoding, rs1/rs2 scope selection, and Svinval/H invalidation without modeling TLB or cache implementation.
This example assumes H and Svinval, equal host/guest XLEN, valid addresses, and maximum implemented ID widths (RV32: ASID 9/VMID 7; RV64: ASID 16/VMID 14). High rs2 bits above the ID width are ignored; software should zero reserved high bits. Implementations may fence/invalidate a broader scope. Current VMID comes from hgatp.VMID; a specified ASID need not invalidate global mappings.
This animation shows only the local-hart translation fence/invalidation semantics defined by the privileged architecture; it does not show OS shootdown protocols, TLB structures, cache flushes, page-walk latency, or platform interrupt mechanisms.
HINVAL.VVMA is the VS-stage invalidation action inside a split-fence sequence: rs1 selects guest virtual address, rs2 selects ASID, and current VMID does not come from rs2.
Understand this scenario with real code like «sfence.w.inval hinval.vvma a1, a2 # a1 = guest VA; a2 = ASID sfence.inval.ir».
No. rs2 is ASID; the current VMID comes from virtualization context.
HINVAL.VVMA alone does not guarantee full ordering; split fences supply it. HFENCE.VVMA is the full fence, and implementations may use it for HINVAL.