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

[PATCH v3 0/4] xen/drivers/char: fix IRQ registration failure propagation


  • To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Oleksii Moisieiev <Oleksii_Moisieiev@xxxxxxxx>
  • Date: Wed, 22 Apr 2026 09:33:13 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=epam.com; dmarc=pass action=none header.from=epam.com; dkim=pass header.d=epam.com; arc=none
  • 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=cD6oYWPhNvkMVdavA9thDpcJ99Ili6JHLMWkKlDCncY=; b=SiqVIF3V9Q5yWH4avJxj+oY+2oD+4PPZHC2MNJjBEDK4h+13QVrMzJfV95yIKLtSo84gHau7yW2rGmGSsTYzQb8lftGiLshk1qFsg1eMPISGk4s5lzj238gHIPppA+Wzdfsodq0w/utaMiCTB4jlnq9SNRXe2MdS3dAr5gxdM/mRdq8zU3qj/mlIvqHHcNFWNRF+C4Ckx8EVuk79V2MP5C2G1nlKMkUHGcbVGLSAfbbMsBJa/gNuxJM6Q9CkT9zRqFHeleOQLf9ZEAD98hANfqo6eNLhP1j8npubAHpwu2LbDO7nL8xLx18pL92yaxbCN03TkNYX6jRd5A+o7PtKsw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=DOb1vgAfDHNtV4HEBB4NP7onTlbomv8gRM+Fxldc0NjcG0y8LLx0medXfzSZYprdMOsAMBqhdH0nZasSLcmblbkPB06PXHPfG3En2bkkJT7GH9FeolkbXBUdY7WgR2PmBCZP4nm+byV5OYwuRQscFQG3dJH4XDcG7GggF33Pj6JnRb2CAqg/dnjuPBjaraTdHv/+BxdUnOSZdQYZ7Ocl/vyon2eq7YCfSOkXuYDmYb5dJZE1LwfaI9Rv2sSoa7kproQZJdGNNHajjf2V9CM4fZxtHORYS0RPoIQjT9C/xZRtt+6Kga8dw36hTDaaJ0VSoE3ynt3qBnajgmGRCOlUbA==
  • Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=epam.com header.i="@epam.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:x-ms-exchange-senderadcheck"
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=epam.com;
  • Cc: Bertrand Marquis <bertrand.marquis@xxxxxxx>, Julien Grall <julien@xxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Oleksii Moisieiev <Oleksii_Moisieiev@xxxxxxxx>
  • Delivery-date: Wed, 22 Apr 2026 09:33:21 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHc0jsKINuSTAnYQkaUPLk67EYWSw==
  • Thread-topic: [PATCH v3 0/4] xen/drivers/char: fix IRQ registration failure propagation

This series fixes a common bug pattern found in several Xen UART drivers:
when setup_irq() fails during post-IRQ initialization, drivers log the
error but continue executing and unconditionally unmask hardware
interrupt lines with no handler registered. On platforms where the GIC
receives these asserted lines, the result is either repeated
spurious-interrupt warnings or an unhandled interrupt fault.

Patch 1, originally submitted as a standalone fix in v1, addresses
the issue in the SCIF driver and moves the hardware error-flag clearing
sequence to before the setup_irq() call so that stale error bits are
cleared unconditionally. Patches 2-4 apply the same early-return fix to
the pl011, cadence-uart, and exynos4210-uart drivers.

The pl011 and cadence-uart drivers additionally had a positive-condition
IRQ guard (if uart->irq > 0) that could fall through to the interrupt
unmask even when no valid IRQ was provided. Both are restructured to
use the early-return idiom.

Changes in v3:
- clear pending error interrupts before setup_irq for pl011
- clear pending error interrupts before setup_irq call for cadence uart
- change uart->irq <= 0 to uart->irq == 0 since irq is unsigned
- skip clearing pending interrupts if setup_irq was failed because
according to the 13.4.1.13 of the RM: it must be cleared after
cleaning interrupt pending in INTC.

Changes in v2:
- Extend fix to pl011, cadence-uart and exynos4210
- fix typo in patch 1 description

Oleksii Moisieiev (4):
  xen/drivers/char: fix SCIF IRQ registration failure propagation
  xen/drivers/char/pl011: fix IRQ registration failure propagation
  xen/drivers/char/cadence-uart: fix IRQ registration failure
    propagation
  xen/drivers/char: fix exynos4210 IRQ registration failure propagation

 xen/drivers/char/cadence-uart.c    | 22 ++++++++++++++--------
 xen/drivers/char/exynos4210-uart.c |  4 ++++
 xen/drivers/char/pl011.c           | 22 ++++++++++++++--------
 xen/drivers/char/scif-uart.c       | 16 ++++++++++++----
 4 files changed, 44 insertions(+), 20 deletions(-)

-- 
2.43.0

base-commit: 077dcf9841ad7df4e63c718249d8ac95f8a709ff
branch: amoi_dfmea_scifv3


 


Rackspace

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