diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2014-07-21 07:35:43 -0400 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2014-07-21 07:35:43 -0400 |
commit | ec10b72701fa2a5a6b05194cb2dbe48cb36c7115 (patch) | |
tree | 9053a2157c089c67a1009f2a4323f898000a93b0 /Documentation/virtual | |
parent | 963fee1656603ce2e91ebb988cd5a92f2af41369 (diff) | |
parent | 6352e4d2dd9a349024a41356148eced553e1dce4 (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.txt | 31 |
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. | |||
988 | 4.38 KVM_GET_MP_STATE | 988 | 4.38 KVM_GET_MP_STATE |
989 | 989 | ||
990 | Capability: KVM_CAP_MP_STATE | 990 | Capability: KVM_CAP_MP_STATE |
991 | Architectures: x86, ia64 | 991 | Architectures: x86, ia64, s390 |
992 | Type: vcpu ioctl | 992 | Type: vcpu ioctl |
993 | Parameters: struct kvm_mp_state (out) | 993 | Parameters: struct kvm_mp_state (out) |
994 | Returns: 0 on success; -1 on error | 994 | Returns: 0 on success; -1 on error |
@@ -1002,24 +1002,32 @@ uniprocessor guests). | |||
1002 | 1002 | ||
1003 | Possible values are: | 1003 | Possible 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 | ||
1015 | This ioctl is only useful after KVM_CREATE_IRQCHIP. Without an in-kernel | 1022 | On x86 and ia64, this ioctl is only useful after KVM_CREATE_IRQCHIP. Without an |
1016 | irqchip, the multiprocessing state must be maintained by userspace. | 1023 | in-kernel irqchip, the multiprocessing state must be maintained by userspace on |
1024 | these architectures. | ||
1017 | 1025 | ||
1018 | 1026 | ||
1019 | 4.39 KVM_SET_MP_STATE | 1027 | 4.39 KVM_SET_MP_STATE |
1020 | 1028 | ||
1021 | Capability: KVM_CAP_MP_STATE | 1029 | Capability: KVM_CAP_MP_STATE |
1022 | Architectures: x86, ia64 | 1030 | Architectures: x86, ia64, s390 |
1023 | Type: vcpu ioctl | 1031 | Type: vcpu ioctl |
1024 | Parameters: struct kvm_mp_state (in) | 1032 | Parameters: struct kvm_mp_state (in) |
1025 | Returns: 0 on success; -1 on error | 1033 | Returns: 0 on success; -1 on error |
@@ -1027,8 +1035,9 @@ Returns: 0 on success; -1 on error | |||
1027 | Sets the vcpu's current "multiprocessing state"; see KVM_GET_MP_STATE for | 1035 | Sets the vcpu's current "multiprocessing state"; see KVM_GET_MP_STATE for |
1028 | arguments. | 1036 | arguments. |
1029 | 1037 | ||
1030 | This ioctl is only useful after KVM_CREATE_IRQCHIP. Without an in-kernel | 1038 | On x86 and ia64, this ioctl is only useful after KVM_CREATE_IRQCHIP. Without an |
1031 | irqchip, the multiprocessing state must be maintained by userspace. | 1039 | in-kernel irqchip, the multiprocessing state must be maintained by userspace on |
1040 | these architectures. | ||
1032 | 1041 | ||
1033 | 1042 | ||
1034 | 4.40 KVM_SET_IDENTITY_MAP_ADDR | 1043 | 4.40 KVM_SET_IDENTITY_MAP_ADDR |