linux/virt/kvm
Wanpeng Li 32bd348be3 KVM: Fix last_boosted_vcpu index assignment bug
In kvm_vcpu_on_spin(), the loop counter 'i' is incorrectly written to
last_boosted_vcpu instead of the actual vCPU index 'idx'. This causes
last_boosted_vcpu to store the loop iteration count rather than the
vCPU index, leading to incorrect round-robin behavior in subsequent
directed yield operations.

Fix this by using 'idx' instead of 'i' in the assignment.

Signed-off-by: Wanpeng Li <wanpengli@tencent.com>
Reviewed-by: Sean Christopherson <seanjc@google.com>
Message-ID: <20251110033232.12538-7-kernellwp@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-11-25 09:15:38 +01:00
..
async_pf.c KVM: remove redundant __GFP_NOWARN 2025-08-19 11:51:13 -07:00
async_pf.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 504 2019-06-19 17:09:56 +02:00
binary_stats.c KVM: stats: remove dead stores 2021-08-13 03:35:15 -04:00
coalesced_mmio.c KVM: Clean up coalesced MMIO ring full check 2024-08-29 19:38:33 -07:00
coalesced_mmio.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
dirty_ring.c KVM: Assert that slots_lock is held when resetting per-vCPU dirty rings 2025-06-20 13:41:04 -07:00
eventfd.c KVM: Export KVM-internal symbols for sub-modules only 2025-09-30 13:40:02 -04:00
guest_memfd.c KVM: guest_memfd: Remove bindings on memslot deletion when gmem is dying 2025-11-04 09:16:53 -08:00
irqchip.c KVM: x86: Trigger I/O APIC route rescan in kvm_arch_irq_routing_update() 2025-06-20 13:52:41 -07:00
Kconfig KVM x86 fixes for 6.18: 2025-10-18 10:25:43 +02:00
kvm_main.c KVM: Fix last_boosted_vcpu index assignment bug 2025-11-25 09:15:38 +01:00
kvm_mm.h KVM: Rename CONFIG_KVM_PRIVATE_MEM to CONFIG_KVM_GUEST_MEMFD 2025-08-27 04:34:59 -04:00
Makefile.kvm KVM: Rename CONFIG_KVM_PRIVATE_MEM to CONFIG_KVM_GUEST_MEMFD 2025-08-27 04:34:59 -04:00
pfncache.c KVM: pfncache: Precisely track refcounted pages 2024-10-25 12:57:59 -04:00
vfio.c VFIO: KVM: x86: Drop kvm_arch_{start,end}_assignment() 2025-06-25 09:51:33 -07:00
vfio.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00