KVM: s390: Fix rewinding of the PSW pointing to an EXECUTE instruction
authorThomas Huth <thuth@linux.vnet.ibm.com>
Wed, 12 Nov 2014 16:13:29 +0000 (17:13 +0100)
committerChristian Borntraeger <borntraeger@de.ibm.com>
Fri, 28 Nov 2014 11:32:56 +0000 (12:32 +0100)
commit04b41acd060541fa76407d4de1e0acf0edd57c2a
tree2672c0911920ece6247afb7d0be6631ee4e45258
parenta02689fecdbc36503b1496a5d36707bb4559db63
KVM: s390: Fix rewinding of the PSW pointing to an EXECUTE instruction

A couple of our interception handlers rewind the PSW to the beginning
of the instruction to run the intercepted instruction again during the
next SIE entry. This normally works fine, but there is also the
possibility that the instruction did not get run directly but via an
EXECUTE instruction.
In this case, the PSW does not point to the instruction that caused the
interception, but to the EXECUTE instruction! So we've got to rewind the
PSW to the beginning of the EXECUTE instruction instead.
This is now accomplished with a new helper function kvm_s390_rewind_psw().

Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
Reviewed-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
arch/s390/include/asm/kvm_host.h
arch/s390/kvm/intercept.c
arch/s390/kvm/kvm-s390.h
arch/s390/kvm/priv.c