aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/power/hibernate.S
diff options
context:
space:
mode:
authorJames Hogan <james.hogan@imgtec.com>2014-03-14 09:06:07 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-05-13 07:59:41 -0400
commit5d73b6735480b56ca74c8474368f01a31cabfb57 (patch)
tree29c20001dc703e96b732ce8d2ce43291b4a13f6e /arch/mips/power/hibernate.S
parenta9ded882d5168e2fd5c0c20e2874f85c56016b4b (diff)
MIPS: KVM: Pass reserved instruction exceptions to guest
commit 15505679362270d02c449626385cb74af8905514 upstream. 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 Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/mips/power/hibernate.S')
0 files changed, 0 insertions, 0 deletions