aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/virtual
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2014-07-21 07:35:43 -0400
committerPaolo Bonzini <pbonzini@redhat.com>2014-07-21 07:35:43 -0400
commitec10b72701fa2a5a6b05194cb2dbe48cb36c7115 (patch)
tree9053a2157c089c67a1009f2a4323f898000a93b0 /Documentation/virtual
parent963fee1656603ce2e91ebb988cd5a92f2af41369 (diff)
parent6352e4d2dd9a349024a41356148eced553e1dce4 (diff)
Merge tag 'kvm-s390-20140715' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into kvm-next
This series enables the "KVM_(S|G)ET_MP_STATE" ioctls on s390 to make the cpu state settable by user space. This is necessary to avoid races in s390 SIGP/reset handling which happen because some SIGPs are handled in QEMU, while others are handled in the kernel. Together with the busy conditions as return value of SIGP races happen especially in areas like starting and stopping of CPUs. (For example, there is a program 'cpuplugd', that runs on several s390 distros which does automatic onlining and offlining on cpus.) As soon as the MPSTATE interface is used, user space takes complete control of the cpu states. Otherwise the kernel will use the old way. Therefore, the new kernel continues to work fine with old QEMUs.
Diffstat (limited to 'Documentation/virtual')
-rw-r--r--Documentation/virtual/kvm/api.txt31
1 files changed, 20 insertions, 11 deletions
diff --git a/Documentation/virtual/kvm/api.txt b/Documentation/virtual/kvm/api.txt
index 5833266407f5..587972ca12c5 100644
--- a/Documentation/virtual/kvm/api.txt
+++ b/Documentation/virtual/kvm/api.txt
@@ -988,7 +988,7 @@ for vm-wide capabilities.
9884.38 KVM_GET_MP_STATE 9884.38 KVM_GET_MP_STATE
989 989
990Capability: KVM_CAP_MP_STATE 990Capability: KVM_CAP_MP_STATE
991Architectures: x86, ia64 991Architectures: x86, ia64, s390
992Type: vcpu ioctl 992Type: vcpu ioctl
993Parameters: struct kvm_mp_state (out) 993Parameters: struct kvm_mp_state (out)
994Returns: 0 on success; -1 on error 994Returns: 0 on success; -1 on error
@@ -1002,24 +1002,32 @@ uniprocessor guests).
1002 1002
1003Possible values are: 1003Possible values are:
1004 1004
1005 - KVM_MP_STATE_RUNNABLE: the vcpu is currently running 1005 - KVM_MP_STATE_RUNNABLE: the vcpu is currently running [x86, ia64]
1006 - KVM_MP_STATE_UNINITIALIZED: the vcpu is an application processor (AP) 1006 - KVM_MP_STATE_UNINITIALIZED: the vcpu is an application processor (AP)
1007 which has not yet received an INIT signal 1007 which has not yet received an INIT signal [x86,
1008 ia64]
1008 - KVM_MP_STATE_INIT_RECEIVED: the vcpu has received an INIT signal, and is 1009 - KVM_MP_STATE_INIT_RECEIVED: the vcpu has received an INIT signal, and is
1009 now ready for a SIPI 1010 now ready for a SIPI [x86, ia64]
1010 - KVM_MP_STATE_HALTED: the vcpu has executed a HLT instruction and 1011 - KVM_MP_STATE_HALTED: the vcpu has executed a HLT instruction and
1011 is waiting for an interrupt 1012 is waiting for an interrupt [x86, ia64]
1012 - KVM_MP_STATE_SIPI_RECEIVED: the vcpu has just received a SIPI (vector 1013 - KVM_MP_STATE_SIPI_RECEIVED: the vcpu has just received a SIPI (vector
1013 accessible via KVM_GET_VCPU_EVENTS) 1014 accessible via KVM_GET_VCPU_EVENTS) [x86, ia64]
1015 - KVM_MP_STATE_STOPPED: the vcpu is stopped [s390]
1016 - KVM_MP_STATE_CHECK_STOP: the vcpu is in a special error state [s390]
1017 - KVM_MP_STATE_OPERATING: the vcpu is operating (running or halted)
1018 [s390]
1019 - KVM_MP_STATE_LOAD: the vcpu is in a special load/startup state
1020 [s390]
1014 1021
1015This ioctl is only useful after KVM_CREATE_IRQCHIP. Without an in-kernel 1022On x86 and ia64, this ioctl is only useful after KVM_CREATE_IRQCHIP. Without an
1016irqchip, the multiprocessing state must be maintained by userspace. 1023in-kernel irqchip, the multiprocessing state must be maintained by userspace on
1024these architectures.
1017 1025
1018 1026
10194.39 KVM_SET_MP_STATE 10274.39 KVM_SET_MP_STATE
1020 1028
1021Capability: KVM_CAP_MP_STATE 1029Capability: KVM_CAP_MP_STATE
1022Architectures: x86, ia64 1030Architectures: x86, ia64, s390
1023Type: vcpu ioctl 1031Type: vcpu ioctl
1024Parameters: struct kvm_mp_state (in) 1032Parameters: struct kvm_mp_state (in)
1025Returns: 0 on success; -1 on error 1033Returns: 0 on success; -1 on error
@@ -1027,8 +1035,9 @@ Returns: 0 on success; -1 on error
1027Sets the vcpu's current "multiprocessing state"; see KVM_GET_MP_STATE for 1035Sets the vcpu's current "multiprocessing state"; see KVM_GET_MP_STATE for
1028arguments. 1036arguments.
1029 1037
1030This ioctl is only useful after KVM_CREATE_IRQCHIP. Without an in-kernel 1038On x86 and ia64, this ioctl is only useful after KVM_CREATE_IRQCHIP. Without an
1031irqchip, the multiprocessing state must be maintained by userspace. 1039in-kernel irqchip, the multiprocessing state must be maintained by userspace on
1040these architectures.
1032 1041
1033 1042
10344.40 KVM_SET_IDENTITY_MAP_ADDR 10434.40 KVM_SET_IDENTITY_MAP_ADDR