aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorAndrew Jones <drjones@redhat.com>2017-09-04 15:21:54 +0100
committerPeter Maydell <peter.maydell@linaro.org>2017-09-04 15:21:54 +0100
commitb16595275bc9b9ce6a36bfb0344d514ab77e6b98 (patch)
tree8bcd04d2dc6ce45b2f68e393849ac5e74483c37e /hw
parent3f07cb2aabdfcc27ee30cf85c39619a82d364f83 (diff)
hw/arm/virt: allow pmu instantiation with userspace irqchip
Move the in-kernel-irqchip test to only guard the set-irq stage, not the init stage of the PMU. Also add the PMU to the KVM device irq line synchronization to enable its use. Signed-off-by: Andrew Jones <drjones@redhat.com> Reviewed-by: Christoffer Dall <cdall@linaro.org> Message-id: 1500471597-2517-4-git-send-email-drjones@redhat.com Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw')
-rw-r--r--hw/arm/virt.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index d6e2486fbc..999f448af2 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -496,7 +496,8 @@ static void fdt_add_pmu_nodes(const VirtMachineState *vms)
return;
}
if (kvm_enabled()) {
- if (!kvm_arm_pmu_set_irq(cpu, PPI(VIRTUAL_PMU_IRQ))) {
+ if (kvm_irqchip_in_kernel() &&
+ !kvm_arm_pmu_set_irq(cpu, PPI(VIRTUAL_PMU_IRQ))) {
return;
}
if (!kvm_arm_pmu_init(cpu)) {