[PATCH] KVM: Never clear KVM_REQ_VM_DEAD from a vCPU's requests
Marc Zyngier
maz at kernel.org
Fri Aug 7 01:20:47 PDT 2026
On Thu, 06 Aug 2026 22:46:18 +0100,
Sean Christopherson <seanjc at google.com> wrote:
>
> Use kvm_test_request() instead of kvm_check_request() when querying
> KVM_REQ_VM_DEAD, i.e. don't clear KVM_REQ_VM_DEAD, as the entire purpose
> of KVM_REQ_VM_DEAD is to prevent the vCPU from enterring the guest ever
> again, even if userspace insists on redoing KVM_RUN.
>
> Ensuring KVM_REQ_VM_DEAD is never cleared will allow relaxing KVM's rule
> that ioctls can't be invoked on dead VMs, to only disallow ioctls if the
> VM is bugged, i.e. if KVM hit a KVM_BUG_ON().
>
> Opportunistically add compile-time assertions to guard against clearing
> KVM_REQ_VM_DEAD through the standard APIs.
>
> Signed-off-by: Sean Christopherson <seanjc at google.com>
Acked-by: Marc Zyngier <maz at kernel.org>
M.
--
Without deviation from the norm, progress is not possible.
More information about the linux-arm-kernel
mailing list