forked from Minki/linux
1550567936
Previously a reserved instruction exception while in guest code would cause a KVM internal error if kvm_mips_handle_ri() didn't recognise the instruction (including a RDHWR from an unrecognised hardware register). However the guest OS should really have the opportunity to catch the exception so that it can take the appropriate actions such as sending a SIGILL to the guest user process or emulating the instruction itself. Therefore in these cases emulate a guest RI exception and only return EMULATE_FAIL if that fails, being careful to revert the PC first in case the exception occurred in a branch delay slot in which case the PC will already point to the branch target. Also turn the printk messages relating to these cases into kvm_debug messages so that they aren't usually visible. This allows crashme to run in the guest without killing the entire VM. Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: Gleb Natapov <gleb@kernel.org> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Sanjay Lal <sanjayl@kymasys.com> Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org Cc: stable@vger.kernel.org Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> |
||
---|---|---|
.. | ||
00README.txt | ||
Kconfig | ||
kvm_cb.c | ||
kvm_locore.S | ||
kvm_mips_comm.h | ||
kvm_mips_commpage.c | ||
kvm_mips_dyntrans.c | ||
kvm_mips_emul.c | ||
kvm_mips_int.c | ||
kvm_mips_int.h | ||
kvm_mips_opcode.h | ||
kvm_mips_stats.c | ||
kvm_mips.c | ||
kvm_tlb.c | ||
kvm_trap_emul.c | ||
Makefile | ||
trace.h |