]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit562174bf96ed15fcdad23ec8d0a4600ce7870dd4
tree2672c0911920ece6247afb7d0be6631ee4e45258
parentf4c116fe1583a94e1cb4b5726a862a26e93b1ed0
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