]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: MIPS/T&E: active_mm = init_mm in guest context
authorJames Hogan <james.hogan@imgtec.com>
Tue, 15 Nov 2016 00:06:05 +0000 (00:06 +0000)
committerJames Hogan <james.hogan@imgtec.com>
Fri, 3 Feb 2017 15:20:48 +0000 (15:20 +0000)
commit6bacb525c69b9e253bc58cfabf26550971f31909
tree2cd2cb798f22db8427b732a79cb4fd74ed9b8070
parent763c08f50bc4801e04add28a869935f24b7e9c97
KVM: MIPS/T&E: active_mm = init_mm in guest context

Set init_mm as the active_mm and update mm_cpumask(current->mm) to
reflect that it isn't active when in guest context. This prevents cache
management code from attempting cache flushes on host virtual addresses
while in guest context, for example due to a cache management IPIs or
later when writing of dynamically translated code hits copy on write.

We do this using helpers in static kernel code to avoid having to export
init_mm to modules.

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/include/asm/kvm_host.h
arch/mips/kvm/tlb.c
arch/mips/kvm/trap_emul.c