summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJames Hogan <james.hogan@imgtec.com>2016-07-13 18:14:19 +0100
committerJiri Slaby <jslaby@suse.cz>2016-07-21 08:36:12 +0200
commit948546f8c1a743c138d14aafe54b48ab598f62f6 (patch)
tree5f038da00acce1d78559566cf9695b88f822a52d /Makefile
parent2cb8ebaafd210dbb6f351638d0247691634e43c4 (diff)
MIPS: KVM: Fix modular KVM under QEMU
commit 797179bc4fe06c89e47a9f36f886f68640b423f8 upstream. Copy __kvm_mips_vcpu_run() into unmapped memory, so that we can never get a TLB refill exception in it when KVM is built as a module. This was observed to happen with the host MIPS kernel running under QEMU, due to a not entirely transparent optimisation in the QEMU TLB handling where TLB entries replaced with TLBWR are copied to a separate part of the TLB array. Code in those pages continue to be executable, but those mappings persist only until the next ASID switch, even if they are marked global. An ASID switch happens in __kvm_mips_vcpu_run() at exception level after switching to the guest exception base. Subsequent TLB mapped kernel instructions just prior to switching to the guest trigger a TLB refill exception, which enters the guest exception handlers without updating EPC. This appears as a guest triggered TLB refill on a host kernel mapped (host KSeg2) address, which is not handled correctly as user (guest) mode accesses to kernel (host) segments always generate address error exceptions. 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: kvm@vger.kernel.org Cc: linux-mips@linux-mips.org Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> [james.hogan@imgtec.com: backported for stable 3.14] Signed-off-by: James Hogan <james.hogan@imgtec.com> Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Diffstat (limited to 'Makefile')
0 files changed, 0 insertions, 0 deletions