aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Hildenbrand <dahi@linux.vnet.ibm.com>2014-05-12 10:05:13 -0400
committerChristian Borntraeger <borntraeger@de.ibm.com>2014-07-10 08:10:36 -0400
commit0b4820d6d8b6448bc9f7fac1bb1a801a53b425e1 (patch)
tree31fc5c007dcfe6f8b72ca971306415746f4fd08f
parent7a42fdc20f1ff31bb47b05a4283c17129d0ecca3 (diff)
KVM: prepare for KVM_(S|G)ET_MP_STATE on other architectures
Highlight the aspects of the ioctls that are actually specific to x86 and ia64. As defined restrictions (irqchip) and mp states may not apply to other architectures, these parts are flagged to belong to x86 and ia64. In preparation for the use of KVM_(S|G)ET_MP_STATE by s390. Fix a spelling error (KVM_SET_MP_STATE vs. KVM_SET_MPSTATE) on the way. 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>
-rw-r--r--Documentation/virtual/kvm/api.txt21
-rw-r--r--include/uapi/linux/kvm.h3
2 files changed, 14 insertions, 10 deletions
diff --git a/Documentation/virtual/kvm/api.txt b/Documentation/virtual/kvm/api.txt
index 0fe36497642c..904c61cdd311 100644
--- a/Documentation/virtual/kvm/api.txt
+++ b/Documentation/virtual/kvm/api.txt
@@ -988,18 +988,20 @@ uniprocessor guests).
988 988
989Possible values are: 989Possible values are:
990 990
991 - KVM_MP_STATE_RUNNABLE: the vcpu is currently running 991 - KVM_MP_STATE_RUNNABLE: the vcpu is currently running [x86, ia64]
992 - KVM_MP_STATE_UNINITIALIZED: the vcpu is an application processor (AP) 992 - KVM_MP_STATE_UNINITIALIZED: the vcpu is an application processor (AP)
993 which has not yet received an INIT signal 993 which has not yet received an INIT signal [x86,
994 ia64]
994 - KVM_MP_STATE_INIT_RECEIVED: the vcpu has received an INIT signal, and is 995 - KVM_MP_STATE_INIT_RECEIVED: the vcpu has received an INIT signal, and is
995 now ready for a SIPI 996 now ready for a SIPI [x86, ia64]
996 - KVM_MP_STATE_HALTED: the vcpu has executed a HLT instruction and 997 - KVM_MP_STATE_HALTED: the vcpu has executed a HLT instruction and
997 is waiting for an interrupt 998 is waiting for an interrupt [x86, ia64]
998 - KVM_MP_STATE_SIPI_RECEIVED: the vcpu has just received a SIPI (vector 999 - KVM_MP_STATE_SIPI_RECEIVED: the vcpu has just received a SIPI (vector
999 accessible via KVM_GET_VCPU_EVENTS) 1000 accessible via KVM_GET_VCPU_EVENTS) [x86, ia64]
1000 1001
1001This ioctl is only useful after KVM_CREATE_IRQCHIP. Without an in-kernel 1002On x86 and ia64, this ioctl is only useful after KVM_CREATE_IRQCHIP. Without an
1002irqchip, the multiprocessing state must be maintained by userspace. 1003in-kernel irqchip, the multiprocessing state must be maintained by userspace on
1004these architectures.
1003 1005
1004 1006
10054.39 KVM_SET_MP_STATE 10074.39 KVM_SET_MP_STATE
@@ -1013,8 +1015,9 @@ Returns: 0 on success; -1 on error
1013Sets the vcpu's current "multiprocessing state"; see KVM_GET_MP_STATE for 1015Sets the vcpu's current "multiprocessing state"; see KVM_GET_MP_STATE for
1014arguments. 1016arguments.
1015 1017
1016This ioctl is only useful after KVM_CREATE_IRQCHIP. Without an in-kernel 1018On x86 and ia64, this ioctl is only useful after KVM_CREATE_IRQCHIP. Without an
1017irqchip, the multiprocessing state must be maintained by userspace. 1019in-kernel irqchip, the multiprocessing state must be maintained by userspace on
1020these architectures.
1018 1021
1019 1022
10204.40 KVM_SET_IDENTITY_MAP_ADDR 10234.40 KVM_SET_IDENTITY_MAP_ADDR
diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h
index e11d8f170a62..37d4ec6f14d8 100644
--- a/include/uapi/linux/kvm.h
+++ b/include/uapi/linux/kvm.h
@@ -399,8 +399,9 @@ struct kvm_vapic_addr {
399 __u64 vapic_addr; 399 __u64 vapic_addr;
400}; 400};
401 401
402/* for KVM_SET_MPSTATE */ 402/* for KVM_SET_MP_STATE */
403 403
404/* not all states are valid on all architectures */
404#define KVM_MP_STATE_RUNNABLE 0 405#define KVM_MP_STATE_RUNNABLE 0
405#define KVM_MP_STATE_UNINITIALIZED 1 406#define KVM_MP_STATE_UNINITIALIZED 1
406#define KVM_MP_STATE_INIT_RECEIVED 2 407#define KVM_MP_STATE_INIT_RECEIVED 2