KVM: arm64: Require in-kernel irqchip for PMU support
authorChristoffer Dall <christoffer.dall@linaro.org>
Tue, 27 Sep 2016 01:51:47 +0000 (18:51 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 16 Oct 2016 16:03:39 +0000 (18:03 +0200)
commit46848795ad096ece83489bbc8f6c8f32f42b21e8
tree2185470becbc13be2c8581466d7488ce1583931a
parent92b23841fcf85e3fe85b7ee70418965b404d5754
KVM: arm64: Require in-kernel irqchip for PMU support

commit 6fe407f2d18a4f94216263f91cb7d1f08fa5887c upstream.

If userspace creates a PMU for the VCPU, but doesn't create an in-kernel
irqchip, then we end up in a nasty path where we try to take an
uninitialized spinlock, which can lead to all sorts of breakages.

Luckily, QEMU always creates the VGIC before the PMU, so we can
establish this as ABI and check for the VGIC in the PMU init stage.
This can be relaxed at a later time if we want to support PMU with a
userspace irqchip.

Cc: Shannon Zhao <shannon.zhao@linaro.org>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Documentation/virtual/kvm/devices/vcpu.txt
virt/kvm/arm/pmu.c
This page took 0.025127 seconds and 5 git commands to generate.