* [PATCH] hw/arm: fix PMU IRQ registration
@ 2023-11-03 14:14 Sebastian Ott
2023-11-03 14:27 ` Peter Maydell
0 siblings, 1 reply; 3+ messages in thread
From: Sebastian Ott @ 2023-11-03 14:14 UTC (permalink / raw)
To: qemu-devel; +Cc: Leif Lindholm, Peter Maydell
Since commit 9036e917f8 ("{include/}hw/arm: refactor virt PPI logic")
PMU IRQ registration fails for arm64 guests:
[ 0.563689] hw perfevents: unable to request IRQ14 for ARM PMU counters
[ 0.565160] armv8-pmu: probe of pmu failed with error -22
That commit re-defined VIRTUAL_PMU_IRQ to be a INTID but missed a case
where the PMU IRQ is actually referred by its PPI index. Fix that by using
INTID_TO_PPI() in that case.
Fixes: 9036e917f8 ("{include/}hw/arm: refactor virt PPI logic")
Signed-off-by: Sebastian Ott <sebott@redhat.com>
---
hw/arm/virt.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index 92085d2d8f..0a16ab3095 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -631,7 +631,8 @@ 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);
}
}
--
2.41.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] hw/arm: fix PMU IRQ registration
2023-11-03 14:14 [PATCH] hw/arm: fix PMU IRQ registration Sebastian Ott
@ 2023-11-03 14:27 ` Peter Maydell
2023-11-03 15:33 ` Peter Maydell
0 siblings, 1 reply; 3+ messages in thread
From: Peter Maydell @ 2023-11-03 14:27 UTC (permalink / raw)
To: Sebastian Ott; +Cc: qemu-devel, Leif Lindholm
On Fri, 3 Nov 2023 at 14:14, Sebastian Ott <sebott@redhat.com> wrote:
>
> Since commit 9036e917f8 ("{include/}hw/arm: refactor virt PPI logic")
> PMU IRQ registration fails for arm64 guests:
>
> [ 0.563689] hw perfevents: unable to request IRQ14 for ARM PMU counters
> [ 0.565160] armv8-pmu: probe of pmu failed with error -22
>
> That commit re-defined VIRTUAL_PMU_IRQ to be a INTID but missed a case
> where the PMU IRQ is actually referred by its PPI index. Fix that by using
> INTID_TO_PPI() in that case.
>
> Fixes: 9036e917f8 ("{include/}hw/arm: refactor virt PPI logic")
> Signed-off-by: Sebastian Ott <sebott@redhat.com>
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1960
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
thanks
-- PMM
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] hw/arm: fix PMU IRQ registration
2023-11-03 14:27 ` Peter Maydell
@ 2023-11-03 15:33 ` Peter Maydell
0 siblings, 0 replies; 3+ messages in thread
From: Peter Maydell @ 2023-11-03 15:33 UTC (permalink / raw)
To: Sebastian Ott; +Cc: qemu-devel, Leif Lindholm
On Fri, 3 Nov 2023 at 14:27, Peter Maydell <peter.maydell@linaro.org> wrote:
>
> On Fri, 3 Nov 2023 at 14:14, Sebastian Ott <sebott@redhat.com> wrote:
> >
> > Since commit 9036e917f8 ("{include/}hw/arm: refactor virt PPI logic")
> > PMU IRQ registration fails for arm64 guests:
> >
> > [ 0.563689] hw perfevents: unable to request IRQ14 for ARM PMU counters
> > [ 0.565160] armv8-pmu: probe of pmu failed with error -22
> >
> > That commit re-defined VIRTUAL_PMU_IRQ to be a INTID but missed a case
> > where the PMU IRQ is actually referred by its PPI index. Fix that by using
> > INTID_TO_PPI() in that case.
> >
> > Fixes: 9036e917f8 ("{include/}hw/arm: refactor virt PPI logic")
> > Signed-off-by: Sebastian Ott <sebott@redhat.com>
>
> Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1960
>
> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
...and applied to target-arm.next, thanks.
-- PMM
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-11-03 15:34 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-03 14:14 [PATCH] hw/arm: fix PMU IRQ registration Sebastian Ott
2023-11-03 14:27 ` Peter Maydell
2023-11-03 15:33 ` Peter Maydell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).