]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: MIPS: Drop dubious EntryHi optimisation
authorJames Hogan <james.hogan@imgtec.com>
Fri, 16 Sep 2016 12:14:09 +0000 (13:14 +0100)
committerJames Hogan <james.hogan@imgtec.com>
Thu, 29 Sep 2016 11:40:12 +0000 (12:40 +0100)
commitc2dbb66eb7f6d38f30521b655fdc0be9853758db
treedb35036476c169d02aa95fa891b79b1863e4a382
parentb56ca40a94fef6d6328c031e91c6479bd6e0c4ba
KVM: MIPS: Drop dubious EntryHi optimisation

There exists a slightly dubious optimisation in the implementation of
the MIPS KVM EntryHi emulation which skips TLB invalidation if the
EntryHi points to an address in the guest KSeg0 region, intended to
catch guest TLB invalidations where the ASID is almost immediately
restored to the previous value.

Now that we perform lazy host ASID regeneration for guest user mode when
the guest ASID changes we should be able to drop the optimisation
without a significant impact (only the extra TLB refills for the small
amount of code while the TLB is being invalidated).

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/emulate.c