diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2016-11-11 13:13:36 +0300 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2016-11-11 13:13:36 +0300 |
commit | 05d36a7dff0b091803034a0d70b41af86aecbc8d (patch) | |
tree | e8e3768f280fc8ec168471b79d36575c0b9f4638 /arch/arm64/kvm/hyp/tlb.c | |
parent | bc33b0ca11e3df467777a4fa7639ba488c9d4911 (diff) | |
parent | d42c79701a3ee5c38fbbc82f98a140420bd40134 (diff) | |
download | linux-05d36a7dff0b091803034a0d70b41af86aecbc8d.tar.xz |
Merge tag 'kvm-arm-for-v4.9-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD
KVM/ARM updates for v4.9-rc4
- Kick the vcpu when a pending interrupt becomes pending again
- Prevent access to invalid interrupt registers
- Invalid TLBs when two vcpus from the same VM share a CPU
Diffstat (limited to 'arch/arm64/kvm/hyp/tlb.c')
-rw-r--r-- | arch/arm64/kvm/hyp/tlb.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/arm64/kvm/hyp/tlb.c b/arch/arm64/kvm/hyp/tlb.c index 9cc0ea784ae6..88e2f2b938f0 100644 --- a/arch/arm64/kvm/hyp/tlb.c +++ b/arch/arm64/kvm/hyp/tlb.c @@ -64,6 +64,21 @@ void __hyp_text __kvm_tlb_flush_vmid(struct kvm *kvm) write_sysreg(0, vttbr_el2); } +void __hyp_text __kvm_tlb_flush_local_vmid(struct kvm_vcpu *vcpu) +{ + struct kvm *kvm = kern_hyp_va(kern_hyp_va(vcpu)->kvm); + + /* Switch to requested VMID */ + write_sysreg(kvm->arch.vttbr, vttbr_el2); + isb(); + + asm volatile("tlbi vmalle1" : : ); + dsb(nsh); + isb(); + + write_sysreg(0, vttbr_el2); +} + void __hyp_text __kvm_flush_vm_context(void) { dsb(ishst); |