]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/4.0.8/mips-fix-kvm-guest-fixmap-address.patch
5.0-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 4.0.8 / mips-fix-kvm-guest-fixmap-address.patch
1 From 8e748c8d09a9314eedb5c6367d9acfaacddcdc88 Mon Sep 17 00:00:00 2001
2 From: James Hogan <james.hogan@imgtec.com>
3 Date: Mon, 27 Apr 2015 15:07:16 +0100
4 Subject: MIPS: Fix KVM guest fixmap address
5
6 From: James Hogan <james.hogan@imgtec.com>
7
8 commit 8e748c8d09a9314eedb5c6367d9acfaacddcdc88 upstream.
9
10 KVM guest kernels for trap & emulate run in user mode, with a modified
11 set of kernel memory segments. However the fixmap address is still in
12 the normal KSeg3 region at 0xfffe0000 regardless, causing problems when
13 cache alias handling makes use of them when handling copy on write.
14
15 Therefore define FIXADDR_TOP as 0x7ffe0000 in the guest kernel mapped
16 region when CONFIG_KVM_GUEST is defined.
17
18 Signed-off-by: James Hogan <james.hogan@imgtec.com>
19 Cc: linux-mips@linux-mips.org
20 Patchwork: https://patchwork.linux-mips.org/patch/9887/
21 Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
22 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
23
24 ---
25 arch/mips/include/asm/mach-generic/spaces.h | 4 ++++
26 1 file changed, 4 insertions(+)
27
28 --- a/arch/mips/include/asm/mach-generic/spaces.h
29 +++ b/arch/mips/include/asm/mach-generic/spaces.h
30 @@ -94,7 +94,11 @@
31 #endif
32
33 #ifndef FIXADDR_TOP
34 +#ifdef CONFIG_KVM_GUEST
35 +#define FIXADDR_TOP ((unsigned long)(long)(int)0x7ffe0000)
36 +#else
37 #define FIXADDR_TOP ((unsigned long)(long)(int)0xfffe0000)
38 #endif
39 +#endif
40
41 #endif /* __ASM_MACH_GENERIC_SPACES_H */