diff options
author | Cornelia Huck <cornelia.huck@de.ibm.com> | 2014-01-08 17:07:54 (GMT) |
---|---|---|
committer | Christian Borntraeger <borntraeger@de.ibm.com> | 2014-04-22 11:24:45 (GMT) |
commit | 2f32d4ea280c35d5f3a43fe7724020cb4824fffa (patch) | |
tree | 88e63d59d2c59aa2ebcd1d86d816e3c3f08fe5bc /arch/s390/kvm/priv.c | |
parent | 4799b557c9aa3a7b540121f2bece719f22229a21 (diff) | |
download | linux-2f32d4ea280c35d5f3a43fe7724020cb4824fffa.tar.xz |
KVM: s390: reinject io interrupt on tpi failure
The tpi instruction should be suppressed on addressing and protection
exceptions, so we need to re-inject the dequeued io interrupt in that
case.
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Diffstat (limited to 'arch/s390/kvm/priv.c')
-rw-r--r-- | arch/s390/kvm/priv.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/arch/s390/kvm/priv.c b/arch/s390/kvm/priv.c index 4f6bc16..f4451f0 100644 --- a/arch/s390/kvm/priv.c +++ b/arch/s390/kvm/priv.c @@ -259,7 +259,15 @@ static int handle_tpi(struct kvm_vcpu *vcpu) if (write_guest_lc(vcpu, __LC_SUBCHANNEL_ID, &tpi_data, len)) rc = -EFAULT; } - kfree(inti); + /* + * If we encounter a problem storing the interruption code, the + * instruction is suppressed from the guest's view: reinject the + * interrupt. + */ + if (!rc) + kfree(inti); + else + kvm_s390_reinject_io_int(vcpu->kvm, inti); no_interrupt: /* Set condition code and we're done. */ if (!rc) |