James Hogan 122e51d474 KVM: MIPS: Improve kvm_get_inst() error return
Currently kvm_get_inst() returns KVM_INVALID_INST in the event of a
fault reading the guest instruction. This has the rather arbitrary magic
value 0xdeadbeef. This API isn't very robust, and in fact 0xdeadbeef is
a valid MIPS64 instruction encoding, namely "ld t1,-16657(s5)".

Therefore change the kvm_get_inst() API to return 0 or -EFAULT, and to
return the instruction via a u32 *out argument. We can then drop the
KVM_INVALID_INST definition entirely.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: "Radim Krčmář" <rkrcmar@redhat.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
Cc: kvm@vger.kernel.org
2017-02-03 15:21:06 +00:00
..
2016-10-06 17:31:02 +02:00
2016-12-18 18:18:03 -08:00
2016-08-03 08:16:30 +02:00
2016-04-03 12:32:09 +02:00
2016-10-06 18:01:28 +02:00
2016-10-04 16:13:57 +02:00
2016-05-28 12:35:09 +02:00
2016-11-04 00:37:15 +01:00