MIPS: KVM: Allocate at least 16KB for exception handlers
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 <547fa85bb3888a0222eed8ec39e36708605c6d53@imgtec.com>
Cc: Paolo Bonzini <69d3ebcf5ee4e7f05a50dc23cd96655b730804b4@redhat.com>
Cc: Gleb Natapov <03189597947f75187c4136ade35aec34feed9dc1@kernel.org>
Cc: 8c364499b63077b3209a702ecef6203a4c06f926@vger.kernel.org
Cc: Ralf Baechle <92f48d309cda194c8eda36aa8f9ae28c488fa208@linux-mips.org>
Cc: 562397917b9a8bf316569a848858b12fb417723f@linux-mips.org
Cc: Sanjay Lal <ce98397e1fd764362380e1f394a6c68d73be1d1c@kymasys.com>
Cc: 4fbacc2fa0ffdbb11bf1ad6925b886ebd08dd15f@vger.kernel.org
Signed-off-by: Paolo Bonzini <69d3ebcf5ee4e7f05a50dc23cd96655b730804b4@redhat.com>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs