]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: PPC: Book3S HV: Fix instruction emulation
authorPaul Mackerras <paulus@samba.org>
Fri, 20 Mar 2015 09:39:40 +0000 (20:39 +1100)
committerAlexander Graf <agraf@suse.de>
Fri, 20 Mar 2015 10:42:33 +0000 (11:42 +0100)
commitf6afc9a375fb7605e628ebcde64ed3fdc101898a
treef67616115092b183d45bfa42f80b37efb5251eac
parentfe46e8bf8b996a6eaa2007b6190b3397b8257d74
KVM: PPC: Book3S HV: Fix instruction emulation

Commit aa6ab53b5926 ("KVM: PPC: Book3S HV: Fix endianness of
instruction obtained from HEIR register") had the side effect that
we no longer reset vcpu->arch.last_inst to -1 on guest exit in
the cases where the instruction is not fetched from the guest.
This means that if instruction emulation turns out to be required
in those cases, the host will emulate the wrong instruction, since
vcpu->arch.last_inst will contain the last instruction that was
emulated.

This fixes it by making sure that vcpu->arch.last_inst is reset
to -1 in those cases.

Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Alexander Graf <agraf@suse.de>
arch/powerpc/kvm/book3s_hv_rmhandlers.S