]> asedeno.scripts.mit.edu Git - linux.git/commit
KVM: MIPS/T&E: Handle TLB invalidation requests
authorJames Hogan <james.hogan@imgtec.com>
Mon, 28 Nov 2016 23:19:32 +0000 (23:19 +0000)
committerJames Hogan <james.hogan@imgtec.com>
Fri, 3 Feb 2017 15:21:09 +0000 (15:21 +0000)
commitb29e115ae451a67a8c044dffb3aa02b19d4570a0
treef6e148c0623c2619d20de875e0a75612338156bd
parent4841e0dd4f53c127b11947bdbe4423b5e9014ebc
KVM: MIPS/T&E: Handle TLB invalidation requests

Add handling of TLB invalidation requests before entering guest mode.
This will allow asynchonous invalidation of the VCPU mappings when
physical memory regions are altered. Should the CPU running the VCPU
already be in guest mode an IPI will be sent to trigger a guest exit.

The reload_asid path will be used in a future patch for when GVA is
about to be directly accessed by KVM.

In the process, the stale user ASID check in the re-entry path (for lazy
user GVA flushing) is generalised to check the ASID for the current
guest mode, in case a TLB invalidation request was handled. This has the
side effect of making the ASID checks on vcpu_load too conservative,
which will be addressed in a later patch.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: "Radim Krčmář" <rkrcmar@redhat.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
Cc: kvm@vger.kernel.org
arch/mips/kvm/trap_emul.c