]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: arm64: Add support for userspace to suspend a vCPU
authorOliver Upton <oupton@google.com>
Wed, 4 May 2022 03:24:40 +0000 (03:24 +0000)
committerMarc Zyngier <maz@kernel.org>
Wed, 4 May 2022 08:28:45 +0000 (09:28 +0100)
commit2743afff61a6993c4e3332eee75c4015b3553263
tree3ee3d0cf1d939f6c7ecfb1f02357bf7ec0ba54ae
parent8be6bfda797df6bba4da74141c67eb02ad37e7be
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
Documentation/virt/kvm/api.rst
arch/arm64/include/asm/kvm_host.h
arch/arm64/kvm/arm.c
include/uapi/linux/kvm.h