aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/kvm/diag.c
diff options
context:
space:
mode:
authorDavid Hildenbrand <dahi@linux.vnet.ibm.com>2014-04-10 17:35:00 +0200
committerChristian Borntraeger <borntraeger@de.ibm.com>2014-07-10 14:11:17 +0200
commit6352e4d2dd9a349024a41356148eced553e1dce4 (patch)
tree2835b0ebeacb7dc0f13e4df266f38e441b08243a /arch/s390/kvm/diag.c
parentKVM: prepare for KVM_(S|G)ET_MP_STATE on other architectures (diff)
downloadlinux-dev-6352e4d2dd9a349024a41356148eced553e1dce4.tar.xz
linux-dev-6352e4d2dd9a349024a41356148eced553e1dce4.zip
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/diag.c')
-rw-r--r--arch/s390/kvm/diag.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/s390/kvm/diag.c b/arch/s390/kvm/diag.c
index 0161675878a2..59bd8f991b98 100644
--- a/arch/s390/kvm/diag.c
+++ b/arch/s390/kvm/diag.c
@@ -176,7 +176,8 @@ static int __diag_ipl_functions(struct kvm_vcpu *vcpu)
return -EOPNOTSUPP;
}
- kvm_s390_vcpu_stop(vcpu);
+ if (!kvm_s390_user_cpu_state_ctrl(vcpu->kvm))
+ kvm_s390_vcpu_stop(vcpu);
vcpu->run->s390_reset_flags |= KVM_S390_RESET_SUBSYSTEM;
vcpu->run->s390_reset_flags |= KVM_S390_RESET_IPL;
vcpu->run->s390_reset_flags |= KVM_S390_RESET_CPU_INIT;