Skip to content

Commit

Permalink
KVM: s390: protvirt: Handle spec exception loops
Browse files Browse the repository at this point in the history
SIE intercept code 8 is used only on exception loops for protected
guests. That means we need to stop the guest when we see it. This is
done by userspace.

Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Acked-by: David Hildenbrand <david@redhat.com>
[borntraeger@de.ibm.com: patch merging, splitting, fixing]
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
  • Loading branch information
Janosch Frank authored and Christian Borntraeger committed Feb 27, 2020
1 parent 0890dde commit e663df9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions arch/s390/kvm/intercept.c
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,13 @@ static int handle_prog(struct kvm_vcpu *vcpu)

vcpu->stat.exit_program_interruption++;

/*
* Intercept 8 indicates a loop of specification exceptions
* for protected guests.
*/
if (kvm_s390_pv_cpu_is_protected(vcpu))
return -EOPNOTSUPP;

if (guestdbg_enabled(vcpu) && per_event(vcpu)) {
rc = kvm_s390_handle_per_event(vcpu);
if (rc)
Expand Down

0 comments on commit e663df9

Please sign in to comment.