OSDN Git Service

target-mips: Ignore unassigned accesses with KVM
authorJames Hogan <james.hogan@imgtec.com>
Mon, 28 Jul 2014 11:37:50 +0000 (12:37 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 7 Aug 2014 13:09:48 +0000 (15:09 +0200)
commiteddedd546a68f6ac864b71d50dd8d39b939b724b
tree33b1adecaa7756dcd108c04140a005eed6c53bcf
parent27498bef357de432a9aa403c5ccf11776773ba58
target-mips: Ignore unassigned accesses with KVM

MIPS registers an unassigned access handler which raises a guest bus
error exception. However this causes QEMU to crash when KVM is enabled
as it isn't called from the main execution loop so longjmp() gets called
without a corresponding setjmp().

Until the KVM API can be updated to trigger a guest exception in
response to an MMIO exit, prevent the bus error exception being raised
from mips_cpu_unassigned_access() if KVM is enabled.

The check is at run time since the do_unassigned_access callback is
initialised before it is known whether KVM will be enabled.

The problem can be triggered with Malta emulation by making the guest
write to the reset region at physical address 0x1bf00000, since it is
marked read-only which is treated as unassigned for writes.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Cc: Peter Maydell <peter.maydell@linaro.org>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Gleb Natapov <gleb@redhat.com>
Cc: Christoffer Dall <christoffer.dall@linaro.org>
Cc: Sanjay Lal <sanjayl@kymasys.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
target-mips/op_helper.c