Skip to content

Invalid pmu interrupt id in arm virt machine device-tree

Host environment

  • Operating system: NA
  • OS/kernel version: NA
  • Architecture: NA
  • QEMU flavor: qemu-system-aarch64
  • QEMU version: 9036e917
  • QEMU command line:
    NA

Emulated/Virtualized environment

  • Operating system: NA
  • OS/kernel version: NA
  • Architecture: ARM

Description of problem

commit 9036e917 changes the definition of PPI interrupt ID, but forgets to modify the PMU device tree. The following patch can solve this problem:

diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index dd6bb80ce2..1d118974ee 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -663,7 +663,7 @@ static void fdt_add_pmu_nodes(const VirtMachineState *vms)
         qemu_fdt_setprop(ms->fdt, "/pmu", "compatible",
                          compat, sizeof(compat));
         qemu_fdt_setprop_cells(ms->fdt, "/pmu", "interrupts",
-                               GIC_FDT_IRQ_TYPE_PPI, VIRTUAL_PMU_IRQ, irqflags);
+                               GIC_FDT_IRQ_TYPE_PPI, INTID_TO_PPI(VIRTUAL_PMU_IRQ), irqflags);
     }
 }

Steps to reproduce

NA

Additional information

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information