summaryrefslogtreecommitdiffstats
path: root/virt
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2024-11-08 18:13:48 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2024-11-08 18:13:48 +0100
commite3e0f9b7ae280f2f479f74ef7799f4108d0e7f77 (patch)
tree85a1717293b6536f51176b6daa6e87e5f8338a88 /virt
parentMerge branch 'kvm-no-struct-page' into HEAD (diff)
parentriscv: kvm: Fix out-of-bounds array access (diff)
downloadlinux-e3e0f9b7ae280f2f479f74ef7799f4108d0e7f77.tar.xz
linux-e3e0f9b7ae280f2f479f74ef7799f4108d0e7f77.zip
Merge tag 'kvm-riscv-6.13-1' of https://github.com/kvm-riscv/linux into HEAD
KVM/riscv changes for 6.13 - Accelerate KVM RISC-V when running as a guest - Perf support to collect KVM guest statistics from host side
Diffstat (limited to 'virt')
-rw-r--r--virt/kvm/kvm_main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index b1b10dc408a0..b684c332782c 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -6225,7 +6225,7 @@ static void kvm_sched_out(struct preempt_notifier *pn,
WRITE_ONCE(vcpu->scheduled_out, true);
- if (current->on_rq && vcpu->wants_to_run) {
+ if (task_is_runnable(current) && vcpu->wants_to_run) {
WRITE_ONCE(vcpu->preempted, true);
WRITE_ONCE(vcpu->ready, true);
}