]> www.infradead.org Git - users/jedix/linux-maple.git/commit
KVM: x86: Clear pv_unhalted on all transitions to KVM_MP_STATE_RUNNABLE
authorJim Mattson <jmattson@google.com>
Mon, 13 Jan 2025 20:01:44 +0000 (12:01 -0800)
committerSean Christopherson <seanjc@google.com>
Wed, 12 Feb 2025 18:16:28 +0000 (10:16 -0800)
commite9cb61055fee5f973984e2b98edd3bbc356f9c89
tree3c2ccc566cd5ebc3ba3634630bab5f405286e107
parentc9e5f3fa903961131a832c2593022bc6a5229cf5
KVM: x86: Clear pv_unhalted on all transitions to KVM_MP_STATE_RUNNABLE

In kvm_set_mp_state(), ensure that vcpu->arch.pv.pv_unhalted is always
cleared on a transition to KVM_MP_STATE_RUNNABLE, so that the next HLT
instruction will be respected.

Fixes: 6aef266c6e17 ("kvm hypervisor : Add a hypercall to KVM hypervisor to support pv-ticketlocks")
Fixes: b6b8a1451fc4 ("KVM: nVMX: Rework interception of IRQs and NMIs")
Fixes: 38c0b192bd6d ("KVM: SVM: leave halted state on vmexit")
Fixes: 1a65105a5aba ("KVM: x86/xen: handle PV spinlocks slowpath")
Signed-off-by: Jim Mattson <jmattson@google.com>
Link: https://lore.kernel.org/r/20250113200150.487409-3-jmattson@google.com
[sean: add Xen PV spinlocks to the list of Fixes, tweak changelog]
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/svm/sev.c
arch/x86/kvm/x86.c
arch/x86/kvm/x86.h