* [PATCH] xen/arm: Do not expose Cortex-A53/A72 PMU nodes to the hardware domain
@ 2026-12-03 3:51 Deepak Das
2026-12-03 8:31 ` Orzel, Michal
0 siblings, 1 reply; 3+ messages in thread
From: Deepak Das @ 2026-12-03 3:51 UTC (permalink / raw)
To: xen-devel
Cc: Deepak Das, Stefano Stabellini, Julien Grall, Bertrand Marquis,
Michal Orzel, Volodymyr Babchuk
handle_node() already skips the "arm,cortex-a7-pmu", "arm,cortex-a15-pmu"
and "arm,armv8-pmuv3" nodes when building the hardware domain DT,
because the PMU interrupt is a PPI, which cannot be routed to a guest.
Device trees often describe the PMU with a per-core-type compatible
instead. The Rockchip RK3399 has one PMU node per cluster,
"arm,cortex-a53-pmu" and "arm,cortex-a72-pmu", and each references a
GICv3 "ppi-partitions" child node. Those nodes are copied to the
hardware domain, and map_device_irqs_to_domain() then fails to route
their PPI ("IRQ can only be routed to an SPI"), which aborts domain
construction.
Skip these two compatibles as well, in the same way as the existing
PMU entries.
Found while bringing up Xen on a FriendlyElec NanoPC-T4 (RK3399).
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Deepak Das <deepakdas.linux@gmail.com>
---
xen/arch/arm/domain_build.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
index 57473507fa..45d6ad102f 100644
--- a/xen/arch/arm/domain_build.c
+++ b/xen/arch/arm/domain_build.c
@@ -1520,6 +1520,8 @@ static int __init handle_node(struct domain *d, struct kernel_info *kinfo,
DT_MATCH_COMPATIBLE("arm,cortex-a15-pmu"),
DT_MATCH_COMPATIBLE("arm,cortex-a53-edac"),
DT_MATCH_COMPATIBLE("arm,armv8-pmuv3"),
+ DT_MATCH_COMPATIBLE("arm,cortex-a53-pmu"),
+ DT_MATCH_COMPATIBLE("arm,cortex-a72-pmu"),
DT_MATCH_PATH("/cpus"),
DT_MATCH_TYPE("memory"),
/* The memory mapped timer is not supported by Xen. */
--
2.43.0
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] xen/arm: Do not expose Cortex-A53/A72 PMU nodes to the hardware domain
2026-12-03 3:51 [PATCH] xen/arm: Do not expose Cortex-A53/A72 PMU nodes to the hardware domain Deepak Das
@ 2026-12-03 8:31 ` Orzel, Michal
2026-12-04 2:45 ` Deepak Das
0 siblings, 1 reply; 3+ messages in thread
From: Orzel, Michal @ 2026-12-03 8:31 UTC (permalink / raw)
To: Deepak Das, xen-devel
Cc: Stefano Stabellini, Julien Grall, Bertrand Marquis,
Volodymyr Babchuk
On 03-Dec-26 04:51, Deepak Das wrote:
> handle_node() already skips the "arm,cortex-a7-pmu", "arm,cortex-a15-pmu"
> and "arm,armv8-pmuv3" nodes when building the hardware domain DT,
> because the PMU interrupt is a PPI, which cannot be routed to a guest.
>
> Device trees often describe the PMU with a per-core-type compatible
> instead. The Rockchip RK3399 has one PMU node per cluster,
> "arm,cortex-a53-pmu" and "arm,cortex-a72-pmu", and each references a
> GICv3 "ppi-partitions" child node. Those nodes are copied to the
> hardware domain, and map_device_irqs_to_domain() then fails to route
> their PPI ("IRQ can only be routed to an SPI"), which aborts domain
> construction.
>
> Skip these two compatibles as well, in the same way as the existing
> PMU entries.
>
> Found while bringing up Xen on a FriendlyElec NanoPC-T4 (RK3399).
>
> Assisted-by: Claude:claude-opus-5-5
> Signed-off-by: Deepak Das <deepakdas.linux@gmail.com>
> ---
> xen/arch/arm/domain_build.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
> index 57473507fa..45d6ad102f 100644
> --- a/xen/arch/arm/domain_build.c
> +++ b/xen/arch/arm/domain_build.c
> @@ -1520,6 +1520,8 @@ static int __init handle_node(struct domain *d, struct kernel_info *kinfo,
> DT_MATCH_COMPATIBLE("arm,cortex-a15-pmu"),
> DT_MATCH_COMPATIBLE("arm,cortex-a53-edac"),
> DT_MATCH_COMPATIBLE("arm,armv8-pmuv3"),
> + DT_MATCH_COMPATIBLE("arm,cortex-a53-pmu"),
> + DT_MATCH_COMPATIBLE("arm,cortex-a72-pmu"),
> DT_MATCH_PATH("/cpus"),
> DT_MATCH_TYPE("memory"),
> /* The memory mapped timer is not supported by Xen. */
I don't understand how your problem/description can lead to the failure you
mentioned. We don't need to blacklist PMU nodes anymore because we have a check
down below to see if the node uses PPI interrupts. It it does, we skip it
anyway. Also, I don't understand what "ppi-partitions" has to do with all these
given that it only impacts the number of interrupt cells and is used for PPI-CPU
affinity.
~Michal
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] xen/arm: Do not expose Cortex-A53/A72 PMU nodes to the hardware domain
2026-12-03 8:31 ` Orzel, Michal
@ 2026-12-04 2:45 ` Deepak Das
0 siblings, 0 replies; 3+ messages in thread
From: Deepak Das @ 2026-12-04 2:45 UTC (permalink / raw)
To: Orzel, Michal
Cc: xen-devel, Stefano Stabellini, Julien Grall, Bertrand Marquis,
Volodymyr Babchuk
On Thu, 3 Dec 2026 at 14:01, Orzel, Michal <michal.orzel@amd.com> wrote:
>
>
>
> On 03-Dec-26 04:51, Deepak Das wrote:
> > handle_node() already skips the "arm,cortex-a7-pmu", "arm,cortex-a15-pmu"
> > and "arm,armv8-pmuv3" nodes when building the hardware domain DT,
> > because the PMU interrupt is a PPI, which cannot be routed to a guest.
> >
> > Device trees often describe the PMU with a per-core-type compatible
> > instead. The Rockchip RK3399 has one PMU node per cluster,
> > "arm,cortex-a53-pmu" and "arm,cortex-a72-pmu", and each references a
> > GICv3 "ppi-partitions" child node. Those nodes are copied to the
> > hardware domain, and map_device_irqs_to_domain() then fails to route
> > their PPI ("IRQ can only be routed to an SPI"), which aborts domain
> > construction.
> >
> > Skip these two compatibles as well, in the same way as the existing
> > PMU entries.
> >
> > Found while bringing up Xen on a FriendlyElec NanoPC-T4 (RK3399).
> >
> > Assisted-by: Claude:claude-opus-5-5
> > Signed-off-by: Deepak Das <deepakdas.linux@gmail.com>
> > ---
> > xen/arch/arm/domain_build.c | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
> > index 57473507fa..45d6ad102f 100644
> > --- a/xen/arch/arm/domain_build.c
> > +++ b/xen/arch/arm/domain_build.c
> > @@ -1520,6 +1520,8 @@ static int __init handle_node(struct domain *d, struct kernel_info *kinfo,
> > DT_MATCH_COMPATIBLE("arm,cortex-a15-pmu"),
> > DT_MATCH_COMPATIBLE("arm,cortex-a53-edac"),
> > DT_MATCH_COMPATIBLE("arm,armv8-pmuv3"),
> > + DT_MATCH_COMPATIBLE("arm,cortex-a53-pmu"),
> > + DT_MATCH_COMPATIBLE("arm,cortex-a72-pmu"),
> > DT_MATCH_PATH("/cpus"),
> > DT_MATCH_TYPE("memory"),
> > /* The memory mapped timer is not supported by Xen. */
>
> I don't understand how your problem/description can lead to the failure you
> mentioned. We don't need to blacklist PMU nodes anymore because we have a check
> down below to see if the node uses PPI interrupts. It it does, we skip it
> anyway. Also, I don't understand what "ppi-partitions" has to do with all these
> given that it only impacts the number of interrupt cells and is used for PPI-CPU
> affinity.
>
Hi Michal,
Yes, I overlooked the check which prevents any device using PPI interrupts.
Please drop this patch.
Thanks,
Deepak
> ~Michal
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-12-04 2:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-03 3:51 [PATCH] xen/arm: Do not expose Cortex-A53/A72 PMU nodes to the hardware domain Deepak Das
2026-12-03 8:31 ` Orzel, Michal
2026-12-04 2:45 ` Deepak Das
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.