linux-stable/arch/x86/kvm
Marcelo Tosatti 91b7cbea9e KVM: VMX: switch blocked_vcpu_on_cpu_lock to raw spinlock
commit 5f02ef741a upstream.

blocked_vcpu_on_cpu_lock is taken from hard interrupt context
(pi_wakeup_handler), therefore it cannot sleep.

Switch it to a raw spinlock.

Fixes:

[41297.066254] BUG: scheduling while atomic: CPU 0/KVM/635218/0x00010001
[41297.066323] Preemption disabled at:
[41297.066324] [<ffffffff902ee47f>] irq_enter_rcu+0xf/0x60
[41297.066339] Call Trace:
[41297.066342]  <IRQ>
[41297.066346]  dump_stack_lvl+0x34/0x44
[41297.066353]  ? irq_enter_rcu+0xf/0x60
[41297.066356]  __schedule_bug.cold+0x7d/0x8b
[41297.066361]  __schedule+0x439/0x5b0
[41297.066365]  ? task_blocks_on_rt_mutex.constprop.0.isra.0+0x1b0/0x440
[41297.066369]  schedule_rtlock+0x1e/0x40
[41297.066371]  rtlock_slowlock_locked+0xf1/0x260
[41297.066374]  rt_spin_lock+0x3b/0x60
[41297.066378]  pi_wakeup_handler+0x31/0x90 [kvm_intel]
[41297.066388]  sysvec_kvm_posted_intr_wakeup_ipi+0x9d/0xd0
[41297.066392]  </IRQ>
[41297.066392]  asm_sysvec_kvm_posted_intr_wakeup_ipi+0x12/0x20
...

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Cc: stable@vger.kernel.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-27 11:02:45 +01:00
..
mmu KVM: x86/mmu: Fix write-protection of PTs mapped by the TDP MMU 2022-01-27 11:02:45 +01:00
svm KVM: x86: Always set kvm_run->if_flag 2021-12-29 12:28:54 +01:00
vmx KVM: VMX: switch blocked_vcpu_on_cpu_lock to raw spinlock 2022-01-27 11:02:45 +01:00
cpuid.c KVM: x86: Add helper to consolidate core logic of SET_CPUID{2} flows 2021-11-18 19:16:02 +01:00
cpuid.h KVM: x86: Move reverse CPUID helpers to separate header file 2021-04-26 05:27:13 -04:00
debugfs.c KVM: x86: Check for rmaps allocation 2022-01-11 15:35:15 +01:00
emulate.c kvm: fix objtool relocation warning 2021-10-03 13:34:19 -07:00
fpu.h KVM: x86: Move FPU register accessors into fpu.h 2021-06-17 13:09:24 -04:00
hyperv.c KVM: x86: Ignore sparse banks size for an "all CPUs", non-sparse IPI req 2021-12-14 10:57:11 +01:00
hyperv.h KVM: x86: Query vcpu->vcpu_idx directly and drop its accessor 2021-09-22 10:33:11 -04:00
i8254.c KVM: x86: Migrate the PIT only if vcpu0 is migrated, not any BSP 2021-08-02 11:01:51 -04:00
i8254.h
i8259.c x86: Fix typo s/ECLR/ELCR/ for the PIC register 2021-08-10 23:31:44 +02:00
ioapic.c Revert "x86/kvm: fix vcpu-id indexed array sizes" 2021-11-12 15:05:47 +01:00
ioapic.h x86/kvm: remove unused ack_notifier callbacks 2021-12-22 09:32:34 +01:00
irq.c KVM: x86/xen: Add event channel interrupt vector upcall 2021-02-04 14:19:39 +00:00
irq.h x86/kvm: remove unused ack_notifier callbacks 2021-12-22 09:32:34 +01:00
irq_comm.c x86: Fix various typos in comments 2021-03-18 15:31:53 +01:00
Kconfig ARM: 2021-06-28 15:40:51 -07:00
kvm_cache_regs.h KVM: x86: Introduce KVM_GET_SREGS2 / KVM_SET_SREGS2 2021-06-17 13:09:47 -04:00
kvm_emulate.h KVM: x86: Drop "pre_" from enter/leave_smm() helpers 2021-06-17 13:09:35 -04:00
kvm_onhyperv.c KVM: x86: hyper-v: Move the remote TLB flush logic out of vmx 2021-06-17 13:09:36 -04:00
kvm_onhyperv.h KVM: x86: hyper-v: Move the remote TLB flush logic out of vmx 2021-06-17 13:09:36 -04:00
lapic.c KVM: x86: don't print when fail to read/write pv eoi memory 2022-01-20 09:13:14 +01:00
lapic.h KVM: x86: Add a return code to kvm_apic_accept_events 2021-06-17 13:09:31 -04:00
Makefile KVM: stats: Add fd-based API to read binary stats data 2021-06-24 11:47:57 -04:00
mmu.h KVM: x86/mmu: Add detailed page size stats 2021-08-20 16:06:34 -04:00
mtrr.c KVM: x86: Add helper to consolidate "raw" reserved GPA mask calculations 2021-02-04 09:27:30 -05:00
pmu.c KVM: x86/pmu: Introduce pmc->is_paused to reduce the call time of perf interfaces 2021-08-04 05:55:56 -04:00
pmu.h KVM: x86/pmu: Introduce pmc->is_paused to reduce the call time of perf interfaces 2021-08-04 05:55:56 -04:00
reverse_cpuid.h KVM: SEV: Mask CPUID[0x8000001F].eax according to supported features 2021-04-26 05:27:15 -04:00
trace.h KVM: x86: Introduce trace_kvm_hv_hypercall_done() 2021-08-03 06:16:40 -04:00
tss.h
x86.c KVM: x86: remove PMU FIXED_CTR3 from msrs_to_save_all 2022-01-20 09:13:15 +01:00
x86.h KVM: nVMX: Abide to KVM_REQ_TLB_FLUSH_GUEST request on nested vmentry/vmexit 2021-12-08 09:04:44 +01:00
xen.c KVM: x86/xen: Fix get_attr of KVM_XEN_ATTR_TYPE_SHARED_INFO 2021-11-25 09:48:43 +01:00
xen.h KVM: xen: do not use struct gfn_to_hva_cache 2021-08-05 03:31:40 -04:00