]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: MIPS/Emulate: Properly implement TLBR for T&E
authorJames Hogan <james.hogan@imgtec.com>
Tue, 14 Mar 2017 17:00:08 +0000 (17:00 +0000)
committerJames Hogan <james.hogan@imgtec.com>
Tue, 28 Mar 2017 15:31:37 +0000 (16:31 +0100)
commit8ced7574f1be1336bbeb0125df76c8b80e94a5d0
tree59b781f47746712e02890d0b3917b9581e0320a3
parentc977de92d8bdb53c1aa438a69b30c77c2363ca30
KVM: MIPS/Emulate: Properly implement TLBR for T&E

Properly implement emulation of the TLBR instruction for Trap & Emulate.
This instruction reads the TLB entry pointed at by the CP0_Index
register into the other TLB registers, which may have the side effect of
changing the current ASID. Therefore abstract the CP0_EntryHi and ASID
changing code into a common function in the process.

A comment indicated that Linux doesn't use TLBR, which is true during
normal use, however dumping of the TLB does use it (for example with the
relatively recent 'x' magic sysrq key), as does a wired TLB entries test
case in my KVM tests.

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