summaryrefslogtreecommitdiffstats
path: root/include/uapi/linux/kvm.h
diff options
context:
space:
mode:
authorOliver Upton <oupton@google.com>2022-05-04 03:24:40 +0000
committerMarc Zyngier <maz@kernel.org>2022-05-04 09:28:45 +0100
commit7b33a09d036ffd9a04506122840629c7e870cf08 (patch)
tree3ee3d0cf1d939f6c7ecfb1f02357bf7ec0ba54ae /include/uapi/linux/kvm.h
parent3fdd04592d38bb31a0bea567d9a66672b484bed3 (diff)
downloadlinux-7b33a09d036ffd9a04506122840629c7e870cf08.tar.gz
linux-7b33a09d036ffd9a04506122840629c7e870cf08.tar.bz2
linux-7b33a09d036ffd9a04506122840629c7e870cf08.zip
KVM: arm64: Add support for userspace to suspend a vCPU
Introduce a new MP state, KVM_MP_STATE_SUSPENDED, which indicates a vCPU is in a suspended state. In the suspended state the vCPU will block until a wakeup event (pending interrupt) is recognized. Add a new system event type, KVM_SYSTEM_EVENT_WAKEUP, to indicate to userspace that KVM has recognized one such wakeup event. It is the responsibility of userspace to then make the vCPU runnable, or leave it suspended until the next wakeup event. Signed-off-by: Oliver Upton <oupton@google.com> Signed-off-by: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20220504032446.4133305-7-oupton@google.com
Diffstat (limited to 'include/uapi/linux/kvm.h')
-rw-r--r--include/uapi/linux/kvm.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h
index 6a184d260c7f..7f72fb7b05f2 100644
--- a/include/uapi/linux/kvm.h
+++ b/include/uapi/linux/kvm.h
@@ -444,6 +444,7 @@ struct kvm_run {
#define KVM_SYSTEM_EVENT_SHUTDOWN 1
#define KVM_SYSTEM_EVENT_RESET 2
#define KVM_SYSTEM_EVENT_CRASH 3
+#define KVM_SYSTEM_EVENT_WAKEUP 4
__u32 type;
__u32 ndata;
union {
@@ -646,6 +647,7 @@ struct kvm_vapic_addr {
#define KVM_MP_STATE_OPERATING 7
#define KVM_MP_STATE_LOAD 8
#define KVM_MP_STATE_AP_RESET_HOLD 9
+#define KVM_MP_STATE_SUSPENDED 10
struct kvm_mp_state {
__u32 mp_state;