Re: [PATCH v2] KVM: x86: Clear hardware HLT state when userspace makes a vCPU not-halted
From: Chao Gao
Date: Mon Sep 14 2026 - 22:25:28 EST
On Thu, Aug 20, 2026 at 08:35:12PM +0800, Keqiang Duan wrote:
>Force a vCPU out of its hardware-tracked halted state when userspace puts
>the vCPU into any state other than HALTED via KVM_SET_MP_STATE, i.e. clear
>VMCS.GUEST_ACTIVITY_STATE if it says the vCPU is halted. Add an optional
>kvm_x86_ops hook to do the clearing, as SVM has no equivalent VMCB field.
[snip]
>
>Fixes: caa057a2cad6 ("KVM: X86: Provide a capability to disable HLT intercepts")
>Cc: stable@xxxxxxxxxxxxxxx
>Tested-by: Qinguang Chen <chenqinguang@xxxxxxxxxxxx>
>Signed-off-by: Zhiping Du <duzhiping@xxxxxxxxxxxx>
>Signed-off-by: Keqiang Duan <duankeqiangcym@xxxxxxxxx>
Reviewed-by: Chao Gao <chao.gao@xxxxxxxxx>