summaryrefslogtreecommitdiffstats
path: root/arch/mips/include/asm/mmu_context.h
diff options
context:
space:
mode:
authorJames Hogan2016-10-08 00:58:53 +0200
committerJames Hogan2017-02-03 16:20:51 +0100
commit7faa6eec6991715d6c1d85c192738dcac405ab89 (patch)
treeff60812dff7d786f1d74d03bdfdc681a3aeb3a09 /arch/mips/include/asm/mmu_context.h
parentKVM: MIPS/T&E: Allocate GVA -> HPA page tables (diff)
downloadkernel-qcow2-linux-7faa6eec6991715d6c1d85c192738dcac405ab89.tar.gz
kernel-qcow2-linux-7faa6eec6991715d6c1d85c192738dcac405ab89.tar.xz
kernel-qcow2-linux-7faa6eec6991715d6c1d85c192738dcac405ab89.zip
KVM: MIPS/T&E: Activate GVA page tables in guest context
Activate the GVA page tables when in guest context. This will allow the normal Linux TLB refill handler to fill from it when guest memory is read, as well as preventing accidental reading from user memory. 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
Diffstat (limited to 'arch/mips/include/asm/mmu_context.h')
-rw-r--r--arch/mips/include/asm/mmu_context.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/mips/include/asm/mmu_context.h b/arch/mips/include/asm/mmu_context.h
index ddd57ade1aa8..16eb8521398e 100644
--- a/arch/mips/include/asm/mmu_context.h
+++ b/arch/mips/include/asm/mmu_context.h
@@ -29,9 +29,11 @@ do { \
} \
} while (0)
+extern void tlbmiss_handler_setup_pgd(unsigned long);
+
+/* Note: This is also implemented with uasm in arch/mips/kvm/entry.c */
#define TLBMISS_HANDLER_SETUP_PGD(pgd) \
do { \
- extern void tlbmiss_handler_setup_pgd(unsigned long); \
tlbmiss_handler_setup_pgd((unsigned long)(pgd)); \
htw_set_pwbase((unsigned long)pgd); \
} while (0)