summaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorAlex Bennée <alex.bennee@linaro.org>2015-03-13 13:02:52 -0400
committerChristoffer Dall <christoffer.dall@linaro.org>2015-03-14 08:44:52 -0400
commitecccf0cc722f40e0dcc97872e7a960765119a256 (patch)
tree85a9d5575976623c9f6ba01081eaa6a0108be722 /Documentation
parentaeda9130c38e2e0e77c1aaa65292c2f5a81107a8 (diff)
arm/arm64: KVM: export VCPU power state via MP_STATE ioctl
To cleanly restore an SMP VM we need to ensure that the current pause state of each vcpu is correctly recorded. Things could get confused if the CPU starts running after migration restore completes when it was paused before it state was captured. We use the existing KVM_GET/SET_MP_STATE ioctl to do this. The arm/arm64 interface is a lot simpler as the only valid states are KVM_MP_STATE_RUNNABLE and KVM_MP_STATE_STOPPED. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/virtual/kvm/api.txt16
1 files changed, 12 insertions, 4 deletions
diff --git a/Documentation/virtual/kvm/api.txt b/Documentation/virtual/kvm/api.txt
index b265d8e50be0..71d10d7d141e 100644
--- a/Documentation/virtual/kvm/api.txt
+++ b/Documentation/virtual/kvm/api.txt
@@ -997,7 +997,7 @@ for vm-wide capabilities.
9974.38 KVM_GET_MP_STATE 9974.38 KVM_GET_MP_STATE
998 998
999Capability: KVM_CAP_MP_STATE 999Capability: KVM_CAP_MP_STATE
1000Architectures: x86, s390 1000Architectures: x86, s390, arm, arm64
1001Type: vcpu ioctl 1001Type: vcpu ioctl
1002Parameters: struct kvm_mp_state (out) 1002Parameters: struct kvm_mp_state (out)
1003Returns: 0 on success; -1 on error 1003Returns: 0 on success; -1 on error
@@ -1011,7 +1011,7 @@ uniprocessor guests).
1011 1011
1012Possible values are: 1012Possible values are:
1013 1013
1014 - KVM_MP_STATE_RUNNABLE: the vcpu is currently running [x86] 1014 - KVM_MP_STATE_RUNNABLE: the vcpu is currently running [x86,arm/arm64]
1015 - KVM_MP_STATE_UNINITIALIZED: the vcpu is an application processor (AP) 1015 - KVM_MP_STATE_UNINITIALIZED: the vcpu is an application processor (AP)
1016 which has not yet received an INIT signal [x86] 1016 which has not yet received an INIT signal [x86]
1017 - KVM_MP_STATE_INIT_RECEIVED: the vcpu has received an INIT signal, and is 1017 - KVM_MP_STATE_INIT_RECEIVED: the vcpu has received an INIT signal, and is
@@ -1020,7 +1020,7 @@ Possible values are:
1020 is waiting for an interrupt [x86] 1020 is waiting for an interrupt [x86]
1021 - KVM_MP_STATE_SIPI_RECEIVED: the vcpu has just received a SIPI (vector 1021 - KVM_MP_STATE_SIPI_RECEIVED: the vcpu has just received a SIPI (vector
1022 accessible via KVM_GET_VCPU_EVENTS) [x86] 1022 accessible via KVM_GET_VCPU_EVENTS) [x86]
1023 - KVM_MP_STATE_STOPPED: the vcpu is stopped [s390] 1023 - KVM_MP_STATE_STOPPED: the vcpu is stopped [s390,arm/arm64]
1024 - KVM_MP_STATE_CHECK_STOP: the vcpu is in a special error state [s390] 1024 - KVM_MP_STATE_CHECK_STOP: the vcpu is in a special error state [s390]
1025 - KVM_MP_STATE_OPERATING: the vcpu is operating (running or halted) 1025 - KVM_MP_STATE_OPERATING: the vcpu is operating (running or halted)
1026 [s390] 1026 [s390]
@@ -1031,11 +1031,15 @@ On x86, this ioctl is only useful after KVM_CREATE_IRQCHIP. Without an
1031in-kernel irqchip, the multiprocessing state must be maintained by userspace on 1031in-kernel irqchip, the multiprocessing state must be maintained by userspace on
1032these architectures. 1032these architectures.
1033 1033
1034For arm/arm64:
1035
1036The only states that are valid are KVM_MP_STATE_STOPPED and
1037KVM_MP_STATE_RUNNABLE which reflect if the vcpu is paused or not.
1034 1038
10354.39 KVM_SET_MP_STATE 10394.39 KVM_SET_MP_STATE
1036 1040
1037Capability: KVM_CAP_MP_STATE 1041Capability: KVM_CAP_MP_STATE
1038Architectures: x86, s390 1042Architectures: x86, s390, arm, arm64
1039Type: vcpu ioctl 1043Type: vcpu ioctl
1040Parameters: struct kvm_mp_state (in) 1044Parameters: struct kvm_mp_state (in)
1041Returns: 0 on success; -1 on error 1045Returns: 0 on success; -1 on error
@@ -1047,6 +1051,10 @@ On x86, this ioctl is only useful after KVM_CREATE_IRQCHIP. Without an
1047in-kernel irqchip, the multiprocessing state must be maintained by userspace on 1051in-kernel irqchip, the multiprocessing state must be maintained by userspace on
1048these architectures. 1052these architectures.
1049 1053
1054For arm/arm64:
1055
1056The only states that are valid are KVM_MP_STATE_STOPPED and
1057KVM_MP_STATE_RUNNABLE which reflect if the vcpu should be paused or not.
1050 1058
10514.40 KVM_SET_IDENTITY_MAP_ADDR 10594.40 KVM_SET_IDENTITY_MAP_ADDR
1052 1060