aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/kvm/kvm-s390.h
diff options
context:
space:
mode:
authorDavid Hildenbrand <dahi@linux.vnet.ibm.com>2014-04-10 11:35:00 -0400
committerChristian Borntraeger <borntraeger@de.ibm.com>2014-07-10 08:11:17 -0400
commit6352e4d2dd9a349024a41356148eced553e1dce4 (patch)
tree2835b0ebeacb7dc0f13e4df266f38e441b08243a /arch/s390/kvm/kvm-s390.h
parent0b4820d6d8b6448bc9f7fac1bb1a801a53b425e1 (diff)
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/kvm-s390.h')
-rw-r--r--arch/s390/kvm/kvm-s390.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/s390/kvm/kvm-s390.h b/arch/s390/kvm/kvm-s390.h
index 77ed846342d4..33a0e4bed2a5 100644
--- a/arch/s390/kvm/kvm-s390.h
+++ b/arch/s390/kvm/kvm-s390.h
@@ -129,6 +129,12 @@ static inline void kvm_s390_set_psw_cc(struct kvm_vcpu *vcpu, unsigned long cc)
129 vcpu->arch.sie_block->gpsw.mask |= cc << 44; 129 vcpu->arch.sie_block->gpsw.mask |= cc << 44;
130} 130}
131 131
132/* are cpu states controlled by user space */
133static inline int kvm_s390_user_cpu_state_ctrl(struct kvm *kvm)
134{
135 return kvm->arch.user_cpu_state_ctrl != 0;
136}
137
132int kvm_s390_handle_wait(struct kvm_vcpu *vcpu); 138int kvm_s390_handle_wait(struct kvm_vcpu *vcpu);
133enum hrtimer_restart kvm_s390_idle_wakeup(struct hrtimer *timer); 139enum hrtimer_restart kvm_s390_idle_wakeup(struct hrtimer *timer);
134void kvm_s390_tasklet(unsigned long parm); 140void kvm_s390_tasklet(unsigned long parm);