KVM: PPC: Emulate tw and td instructions
authorAlexander Graf <agraf@suse.de>
Tue, 13 Mar 2012 21:15:45 +0000 (22:15 +0100)
committerAvi Kivity <avi@redhat.com>
Sun, 8 Apr 2012 11:01:57 +0000 (14:01 +0300)
commit6df79df5b27d74e0c9803d7f47bb878370996548
treeae354d946d5fce58f1129c291daa975e36230961
parent6020c0f6e78888b6023559e9bf633ad0092a1709
KVM: PPC: Emulate tw and td instructions

There are 4 conditional trapping instructions: tw, twi, td, tdi. The
ones with an i take an immediate comparison, the others compare two
registers. All of them arrive in the emulator when the condition to
trap was successfully fulfilled.

Unfortunately, we were only implementing the i versions so far, so
let's also add support for the other two.

This fixes kernel booting with recents book3s_32 guest kernels.

Reported-by: Jörg Sommer <joerg@alea.gnuu.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Avi Kivity <avi@redhat.com>
arch/powerpc/kvm/emulate.c