[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] xen/arm: Do not expose Cortex-A53/A72 PMU nodes to the hardware domain


  • To: Deepak Das <deepakdas.linux@xxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: "Orzel, Michal" <michal.orzel@xxxxxxx>
  • Date: Thu, 3 Dec 2026 09:31:36 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=gmail.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=zrEm22vrljt/sFeLn0pA0getnzMX2xgeG22kBaF3Zmk=; b=tQqXYgYEMG8WXc/Taqccj1xouHGeEny2STlBdricjzUZ54DGtpuxaYTkBjpnNs4TSxEjhx21Uew91ONbq4B3SgKaaSSDOZ4SeumMCn05Le9WeS8ZiIJMm5RcF5ivDoBbu7VpzzUNXntHmv/zVIo5FA337Uhh8vDoE62yJGhLvbV0XPyje0sT++fgAf7HRFxeGcENtD1QBIsn/p932DGpx7bvM1eYzdb53hfq5d6sxy3TDbY1D3jSqnGOoM7KP3TZBa4jr0opgGwDeJO57Px7guuB9I9iNZF1AKZtBqepZFjgAQhfSw5fLVSvilJddQCPYWf2fMeL7Iwd1EU4RhZ2DQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=SDgf0DNwlpPZBlWTEx8etjtMMhVRJ4fje6Rles6eRXy9WwVGH3UtpDry8qKyP2V2b0nMtnyP2/gL5Y8tEdXNvlCu/87ycDv0iB9IP14bk6L+V2g1b6chthiUi7eFqiKa8hDNRnYeKoxUILQp53AYGy/Z4f3Gep38wA3WRI/pypqv2pR7uPZhDH1b6bjyLFQ5vCPpOaFB+we4mu9+XyO9S5qAAvcitmYhHEdq1EhRKCT+tgR52YbUhQOKng+/o/KJFRV8kYz+pYt/TJay1Nnu+fwEsvaEcfUabwC6x6RgWeo4S1OWYCBNuajX4NorsJl7wq/CnHDdRza9PPMdu/VJqg==
  • Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=amd.com header.i="@amd.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Thu, 03 Dec 2026 08:31:54 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>


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@xxxxxxxxx>
> ---
>  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




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.