linux/arch/mips/kvm
James Hogan 7006e2dfda MIPS: KVM: Allocate at least 16KB for exception handlers
Each MIPS KVM guest has its own copy of the KVM exception vector. This
contains the TLB refill exception handler at offset 0x000, the general
exception handler at offset 0x180, and interrupt exception handlers at
offset 0x200 in case Cause_IV=1. A common handler is copied to offset
0x2000 and offset 0x3000 is used for temporarily storing k1 during entry
from guest.

However the amount of memory allocated for this purpose is calculated as
0x200 rounded up to the next page boundary, which is insufficient if 4KB
pages are in use. This can lead to the common handler at offset 0x2000
being overwritten and infinitely recursive exceptions on the next exit
from the guest.

Increase the minimum size from 0x200 to 0x4000 to cover the full use of
the page.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Gleb Natapov <gleb@kernel.org>
Cc: kvm@vger.kernel.org
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
Cc: Sanjay Lal <sanjayl@kymasys.com>
Cc: stable@vger.kernel.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2014-05-30 12:59:13 +02:00
..
00README.txt KVM/MIPS32: Release notes and KVM module Makefile 2013-05-08 03:55:35 +02:00
Kconfig MIPS: kvm: Kconfig: Drop HAVE_KVM dependency from VIRTUALIZATION 2013-07-19 12:45:57 +02:00
kvm_cb.c KVM/MIPS32: Routines to handle specific traps/exceptions while executing the guest. 2013-05-08 03:55:36 +02:00
kvm_locore.S mips/kvm: Make kvm_locore.S 64-bit buildable/safe. 2013-08-26 12:30:49 +03:00
kvm_mips.c MIPS: KVM: Allocate at least 16KB for exception handlers 2014-05-30 12:59:13 +02:00
kvm_mips_comm.h KVM/MIPS32: Binary patching of select privileged instructions. 2013-05-09 17:48:22 +02:00
kvm_mips_commpage.c KVM/MIPS32: Binary patching of select privileged instructions. 2013-05-09 17:48:22 +02:00
kvm_mips_dyntrans.c KVM/MIPS32: Binary patching of select privileged instructions. 2013-05-09 17:48:22 +02:00
kvm_mips_emul.c MIPS: KVM: Remove dead code in CP0 emulation 2014-03-19 17:01:50 +01:00
kvm_mips_int.c KVM/MIPS32: Guest interrupt delivery. 2013-05-08 03:55:36 +02:00
kvm_mips_int.h KVM/MIPS32: Guest interrupt delivery. 2013-05-08 03:55:36 +02:00
kvm_mips_opcode.h KVM/MIPS32: Privileged instruction/target branch emulation. 2013-05-08 03:55:35 +02:00
kvm_mips_stats.c KVM/MIPS32: COP0 accesses profiling. 2013-05-08 03:55:36 +02:00
kvm_tlb.c mips: delete non-required instances of include <linux/init.h> 2014-01-24 22:39:56 +01:00
kvm_trap_emul.c mips/kvm: Fix ABI by moving manipulation of CP0 registers to KVM_{G,S}ET_ONE_REG 2013-06-03 10:58:54 +03:00
Makefile KVM/MIPS32: Release notes and KVM module Makefile 2013-05-08 03:55:35 +02:00
trace.h KVM/MIPS32: MIPS arch specific APIs for KVM 2013-05-08 03:55:35 +02:00