Skip to content

Commit

Permalink
MIPS: Fix KVM guest fixmap address
Browse files Browse the repository at this point in the history
commit 8e748c8 upstream.

KVM guest kernels for trap & emulate run in user mode, with a modified
set of kernel memory segments. However the fixmap address is still in
the normal KSeg3 region at 0xfffe0000 regardless, causing problems when
cache alias handling makes use of them when handling copy on write.

Therefore define FIXADDR_TOP as 0x7ffe0000 in the guest kernel mapped
region when CONFIG_KVM_GUEST is defined.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/9887/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
James Hogan authored and Greg Kroah-Hartman committed Jul 10, 2015
1 parent dc86caf commit ce2eb12
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions arch/mips/include/asm/mach-generic/spaces.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,11 @@
#endif

#ifndef FIXADDR_TOP
#ifdef CONFIG_KVM_GUEST
#define FIXADDR_TOP ((unsigned long)(long)(int)0x7ffe0000)
#else
#define FIXADDR_TOP ((unsigned long)(long)(int)0xfffe0000)
#endif
#endif

#endif /* __ASM_MACH_GENERIC_SPACES_H */

0 comments on commit ce2eb12

Please sign in to comment.