aboutsummaryrefslogtreecommitdiff
path: root/hw/arm
diff options
context:
space:
mode:
Diffstat (limited to 'hw/arm')
-rw-r--r--hw/arm/virt.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index a06ec13..d6e2486 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -492,10 +492,17 @@ static void fdt_add_pmu_nodes(const VirtMachineState *vms)
CPU_FOREACH(cpu) {
armcpu = ARM_CPU(cpu);
- if (!arm_feature(&armcpu->env, ARM_FEATURE_PMU) ||
- (kvm_enabled() && !kvm_arm_pmu_create(cpu, PPI(VIRTUAL_PMU_IRQ)))) {
+ if (!arm_feature(&armcpu->env, ARM_FEATURE_PMU)) {
return;
}
+ if (kvm_enabled()) {
+ if (!kvm_arm_pmu_set_irq(cpu, PPI(VIRTUAL_PMU_IRQ))) {
+ return;
+ }
+ if (!kvm_arm_pmu_init(cpu)) {
+ return;
+ }
+ }
}
if (vms->gic_version == 2) {