Skip to content
  • James Hogan's avatar
    target-mips: Ignore unassigned accesses with KVM · eddedd54
    James Hogan authored
    
    
    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: default avatarJames Hogan <james.hogan@imgtec.com>
    Reviewed-by: default avatarAurelien 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: default avatarPaolo Bonzini <pbonzini@redhat.com>
    eddedd54