Replies: 1 comment 3 replies
-
The reason for this is that the TLB invalidation instructions for the second stage assume the currently active VMID. If the current VMID is not the VMID we are trying to invalidate, we need to switch it before invalidating, and then switch back. Hope this helps! |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
May someone please explain why vmid is written twice here? Thanks.
static inline void tlb_vm_inv_all(asid_t vmid)
{
uint64_t vttbr = 0;
vttbr = sysreg_vttbr_el2_read();
bool switch_vmid =
bit64_extract(vttbr, VTTBR_VMID_OFF, VTTBR_VMID_LEN) != vmid;
}
Beta Was this translation helpful? Give feedback.
All reactions