diff options
author | James Hogan <james.hogan@imgtec.com> | 2014-05-29 13:16:23 +0400 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2014-05-30 14:59:13 +0400 |
commit | 7006e2dfda9adfa40251093604db76d7e44263b3 (patch) | |
tree | ca872aeb5c9e8147fe72110b8fdf2e69df7e9b18 /arch/mips/mm/cache.c | |
parent | 146b2cfe0c4a82857d15719a4707e6bd13fccafb (diff) | |
download | linux-7006e2dfda9adfa40251093604db76d7e44263b3.tar.xz |
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>
Diffstat (limited to 'arch/mips/mm/cache.c')
0 files changed, 0 insertions, 0 deletions