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

Re: [PATCH] xen/arm: gic-v2: disable interrupt bypass on CPU shutdown


  • To: Mykola Kvach <xakep.amatop@xxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: "Orzel, Michal" <michal.orzel@xxxxxxx>
  • Date: Mon, 20 Apr 2026 10:38:11 +0200
  • 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=WTfvdDCuCL1Q5XMGpRUHxrM/YnMeI6OVKCctNVHcjf8=; b=FVbiN0ODmeHdY2PMMHOuqQZy7XMQVorCZwHSMhYBKdWY9mNIfRPeb2iTPdegZB6MQcHsyRRpVSf1QMesnhV7wqcNIKJkXLKtqAqhe79dMh3PQ0uUcTVhb30dAJlWHCJH18Bj3Np8IDeui8woNmsZ8vWHbIhL4q+epcdq/eGFUHJWrrI/1HP6yBVREe9ppB/GM4Fqq6KBo1PLUTrsVR1kVfHk18VcKod9vx1AYNLnkhVU7bFPIii2Jd4RsSZDWL4hK7R5ixGN3uACuQDmzU10lNMdtSGJIUoyrTlV0rINR7QbXaZm8Zrlen6yCfBEvarQiYE0XD61Euk9rkvneU2BdA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=RDiRExe6KOIVQPzeiPjuVqZaMqjMZaSx4BquvTp07X5tD3PA8A5nZHbow0Y2vz7ttpDCRTEaTY9dfnizRgnEyXgvrC6YuqldkAOUN2BS8BZK32bwqbrHIr7cXnnp8+Qj+3K+KquPtTwHC9lRmdr1RYogaUhq6GEZPzdf6oSnpJumE1K8q4olj7TbTXF//YwLfmuB0hQwdRm9Nd8zW0UXcbLsyvQXNZDVDEfvIVPepaRSLj9zTzyILrPbRqtKt+v3X/INXKDqpAuNEk8+05RNbm/0ReDgbO2LaPf38c7HaqblCtU7itjH8g6FJaYAuKf5Xm/7ZXFwEkiNDklASOZQ5Q==
  • 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: Mykola Kvach <mykola_kvach@xxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Mon, 20 Apr 2026 08:38:32 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Hmm, this landed in my junk folder.

On 10/04/2026 11:36, Mykola Kvach wrote:
> From: Mykola Kvach <mykola_kvach@xxxxxxxx>
> 
> The GICv2 CPU shutdown path currently writes 0 to GICC_CTLR.
> 
> Per IHI0048B.b section 2.3.1, clearing IRQBypDisGrp{0,1} and
> FIQBypDisGrp{0,1} selects bypass rather than deasserted interrupt
> outputs when the CPU interface stops driving them. Tables 2-2 and 2-3
> show that a zeroed GICC_CTLR can fall back to the legacy IRQ/FIQ inputs
> instead of fully disabling the interface.
> 
> Fix this by reading GICC_CTLR, setting the bypass-disable bits, and
> clearing both group-enable bits before writing the value back. Keep the
> existing GICC_CTL_ENABLE definition for the init path and use a separate
> mask for the shutdown-side group-enable handling.
IIUC we don't need to worry about not setting the bypass-disable bits in cpu
init (we only set group 0 and EOI) because they are relevant only when the bit 0
is disabled i.e. the path this patch changes?

> 
> Section 2.3.2 also states that wakeup event signals remain available
> even when both GIC interrupt signaling and interrupt bypass are
> disabled, so disabling bypass does not break the power-management use
> case, i.e. suspend modes.
> 
> Fixes: 5e40a1b4351e ("arm: SMP CPU shutdown")
> Signed-off-by: Mykola Kvach <mykola_kvach@xxxxxxxx>
Reviewed-by: Michal Orzel <michal.orzel@xxxxxxx>

~Michal




 


Rackspace

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