Skip to content

Commit

Permalink
KVM: arm64: Add HYP interface to flush VM Stage 1/2 TLB entries
Browse files Browse the repository at this point in the history
This patch adds support for arm64 hyp interface to flush all TLBs associated
with VMID.

Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Mario Smarduch <m.smarduch@samsung.com>
  • Loading branch information
Mario Smarduch authored and Christoffer Dall committed Jan 16, 2015
1 parent 8199ed0 commit 9836c6b
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions arch/arm64/kvm/hyp.S
Original file line number Diff line number Diff line change
Expand Up @@ -1030,6 +1030,28 @@ ENTRY(__kvm_tlb_flush_vmid_ipa)
ret
ENDPROC(__kvm_tlb_flush_vmid_ipa)

/**
* void __kvm_tlb_flush_vmid(struct kvm *kvm) - Flush per-VMID TLBs
* @struct kvm *kvm - pointer to kvm structure
*
* Invalidates all Stage 1 and 2 TLB entries for current VMID.
*/
ENTRY(__kvm_tlb_flush_vmid)
dsb ishst

kern_hyp_va x0
ldr x2, [x0, #KVM_VTTBR]
msr vttbr_el2, x2
isb

tlbi vmalls12e1is
dsb ish
isb

msr vttbr_el2, xzr
ret
ENDPROC(__kvm_tlb_flush_vmid)

ENTRY(__kvm_flush_vm_context)
dsb ishst
tlbi alle1is
Expand Down

0 comments on commit 9836c6b

Please sign in to comment.