summaryrefslogtreecommitdiff
path: root/arch/s390/kvm/intercept.c
diff options
context:
space:
mode:
authorDavid Hildenbrand <dahi@linux.vnet.ibm.com>2014-04-10 19:35:00 +0400
committerChristian Borntraeger <borntraeger@de.ibm.com>2014-07-10 16:11:17 +0400
commit6352e4d2dd9a349024a41356148eced553e1dce4 (patch)
tree2835b0ebeacb7dc0f13e4df266f38e441b08243a /arch/s390/kvm/intercept.c
parent0b4820d6d8b6448bc9f7fac1bb1a801a53b425e1 (diff)
downloadlinux-6352e4d2dd9a349024a41356148eced553e1dce4.tar.xz
KVM: s390: implement KVM_(S|G)ET_MP_STATE for user space state control
This patch - adds s390 specific MP states to linux headers and documents them - implements the KVM_{SET,GET}_MP_STATE ioctls - enables KVM_CAP_MP_STATE - allows user space to control the VCPU state on s390. If user space sets the VCPU state using the ioctl KVM_SET_MP_STATE, we can disable manual changing of the VCPU state and trust user space to do the right thing. Signed-off-by: David Hildenbrand <dahi@linux.vnet.ibm.com> Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com> Acked-by: Christian Borntraeger <borntraeger@de.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.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/s390/kvm/intercept.c b/arch/s390/kvm/intercept.c
index ac6b32585a36..eaf46291d361 100644
--- a/arch/s390/kvm/intercept.c
+++ b/arch/s390/kvm/intercept.c
@@ -73,7 +73,8 @@ static int handle_stop(struct kvm_vcpu *vcpu)
return rc;
}
- kvm_s390_vcpu_stop(vcpu);
+ if (!kvm_s390_user_cpu_state_ctrl(vcpu->kvm))
+ kvm_s390_vcpu_stop(vcpu);
return -EOPNOTSUPP;
}