diff options
author | David Hildenbrand <dahi@linux.vnet.ibm.com> | 2016-06-21 08:19:51 -0400 |
---|---|---|
committer | Christian Borntraeger <borntraeger@de.ibm.com> | 2016-07-18 08:15:00 -0400 |
commit | 6502a34cfd6695929086187f63fe670cc3050e68 (patch) | |
tree | 774e386aac358c15baeeba02a38bb8b080e3887d /arch/s390/kvm/intercept.c | |
parent | af1bae5497b98cb99d6b0492e6981f060420a00c (diff) |
KVM: s390: allow user space to handle instr 0x0000
We will use illegal instruction 0x0000 for handling 2 byte sw breakpoints
from user space. As it can be enabled dynamically via a capability,
let's move setting of ICTL_OPEREXC to the post creation step, so we avoid
any races when enabling that capability just while adding new cpus.
Acked-by: Janosch Frank <frankja@linux.vnet.ibm.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Diffstat (limited to 'arch/s390/kvm/intercept.c')
-rw-r--r-- | arch/s390/kvm/intercept.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/s390/kvm/intercept.c b/arch/s390/kvm/intercept.c index 850be47c4cc9..7a2f1551bc39 100644 --- a/arch/s390/kvm/intercept.c +++ b/arch/s390/kvm/intercept.c | |||
@@ -359,6 +359,9 @@ static int handle_operexc(struct kvm_vcpu *vcpu) | |||
359 | test_kvm_facility(vcpu->kvm, 74)) | 359 | test_kvm_facility(vcpu->kvm, 74)) |
360 | return handle_sthyi(vcpu); | 360 | return handle_sthyi(vcpu); |
361 | 361 | ||
362 | if (vcpu->arch.sie_block->ipa == 0 && vcpu->kvm->arch.user_instr0) | ||
363 | return -EOPNOTSUPP; | ||
364 | |||
362 | return kvm_s390_inject_program_int(vcpu, PGM_OPERATION); | 365 | return kvm_s390_inject_program_int(vcpu, PGM_OPERATION); |
363 | } | 366 | } |
364 | 367 | ||