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.
HFENCE.GVMA is a G-stage address-translation fence: order/invalidate matching local-hart translations by guest physical address and VMID.
HFENCE.GVMA is the Hypervisor extension G-stage memory-management fence. It guarantees that prior stores already visible to the current hart are ordered before subsequent implicit reads for G-stage address translation; if rs1 is not x0, it specifies one guest physical address shifted right by 2 bits, and if rs2 is not x0, it specifies one VMID. rs1=x0 means all guest physical addresses, and rs2=x0 means all VMIDs. It affects only the local hart; multi-hart systems need additional IPIs/remote execution.
HFENCE.GVMA is the H-extension G-stage address-translation fence, used to order updates to relevant two-stage translation structures with subsequent implicit translation on the local hart.
Understand this scenario with real code like «hfence.gvma a1, a2».
Understand this scenario with real code like «hfence.gvma a1, a2».
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.