linux/include/kvm
Julien Thierry 95e92e45a4 KVM: arm64: pmu: Make overflow handler NMI safe
kvm_vcpu_kick() is not NMI safe. When the overflow handler is called from
NMI context, defer waking the vcpu to an irq_work queue.

A vcpu can be freed while it's not running by kvm_destroy_vm(). Prevent
running the irq_work for a non-existent vcpu by calling irq_work_sync() on
the PMU destroy path.

[Alexandru E.: Added irq_work_sync()]

Signed-off-by: Julien Thierry <julien.thierry@arm.com>
Signed-off-by: Alexandru Elisei <alexandru.elisei@arm.com>
Tested-by: Sumit Garg <sumit.garg@linaro.org> (Developerbox)
Cc: Julien Thierry <julien.thierry.kdev@gmail.com>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: James Morse <james.morse@arm.com>
Cc: Suzuki K Pouloze <suzuki.poulose@arm.com>
Cc: kvm@vger.kernel.org
Cc: kvmarm@lists.cs.columbia.edu
Link: https://lore.kernel.org/r/20200924110706.254996-6-alexandru.elisei@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
2020-09-28 19:00:17 +01:00
..
arm_arch_timer.h KVM: arm64: timers: Move timer registers to the sys_regs file 2020-07-07 09:28:38 +01:00
arm_hypercalls.h KVM: arm/arm64: Factor out hypercall handling from PSCI code 2019-10-21 19:20:26 +01:00
arm_pmu.h KVM: arm64: pmu: Make overflow handler NMI safe 2020-09-28 19:00:17 +01:00
arm_psci.h KVM: arm/arm64: Factor out hypercall handling from PSCI code 2019-10-21 19:20:26 +01:00
arm_vgic.h KVM: arm64: vgic-v3: Take cpu_if pointer directly instead of vcpu 2020-05-28 11:57:10 +01:00
iodev.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 342 2019-06-05 17:37:07 +02:00