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

[PATCH v2 19/27] i8259.c: properly cascade secondary i8259 from primary i8259


  • To: pbonzini@xxxxxxxxxx, richard.henderson@xxxxxxxxxx, mst@xxxxxxxxxx, sstabellini@xxxxxxxxxx, anthony@xxxxxxxxxxxxxx, edgar.iglesias@xxxxxxxxx, qemu-devel@xxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: Mark Cave-Ayland <mark.caveayland@xxxxxxxxxxx>
  • Date: Fri, 16 Oct 2026 15:19:25 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nutanix.com; dmarc=pass action=none header.from=nutanix.com; dkim=pass header.d=nutanix.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=zJLaHMP800ZLe/QLftrXKhy1QBGER7Qp7toLitf2O64=; b=yPd9eUoxOEy5Ikxa+wR1cAvGtFz919fXRPRw38QK3hSCNkBJTwwoWddOBjXw5i5YoM1evXuVwxQPVrGSMEmERt9z3/RRtLW8GFJPtogl17Pw0UHUFF1sZRbd6rMVtHqilFGBSTWTLg/Zck/NiPWNKebgacHCrN0HFiM/Z/ukpduPv3k39GlG3wL3jmlEEHql3DXh4gVgfku5wwWJ5FzeMSu5RDjHJjkebwXqRmfuBqcwPXJs24CLm/SJFg9cg1uIS0qgTwwmdWGzn+0xqpcd5SBKqmxYZXAHu8PfgUtGnVknqH2CHhxbOMM9OM5BU+oZvEN88S+pwUAD9Y7sYqVliA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=msLAGvLrzh3XOHIHFv1gDlfjhqJQGeYmwiu70oCinv6TKfM2Az2Ppd+3nM71Z9Zv1WosBrwqbgGBjAYmmEzeDS67QECsZgh8+fy1ToY6ulAJ67HH0zZsqVeGQU/R46DdbfhW+srrfW7W32xDMIzSbTcy6Q6O8oB9IW5oTgnXNAkjIRjF/C9GIq4iL/FEueTgAsS6lOVtdV6WBDzrOn7KdN92hmdLkRRkNELLMFNFIXjNM/RjATxjoW9+oXoxLsN4bSRQb5zRRx7rebM+HgA4DfjPMfei4aG189z69xjbX8Gbi1yL1UYRpokXMHmh2YvRTtION/jxMSBBTnjC3aRCkw==
  • Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=proofpoint20171006 header.d=nutanix.com header.i="@nutanix.com" header.h="Content-Transfer-Encoding:Content-Type:Date:From:In-Reply-To:Message-ID:MIME-Version:References:Subject:To"; dkim=pass header.s=selector1 header.d=nutanix.com header.i="@nutanix.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"
  • Authentication-results: mx.microsoft.com 1; dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nutanix.com;
  • Delivery-date: Fri, 16 Oct 2026 14:22:19 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Currently the cascaded output from the secondary i8259 is returned directly in
the pass_irqs[] array, instead of being connected to the relevant input of the
primary i8259.

This is a bug fix since in a cascaded configuration on real hardware it is
possible (although unlikely) that the cascaded input from the secondary i8259
can be masked on the primary i8259.

Signed-off-by: Mark Cave-Ayland <mark.caveayland@xxxxxxxxxxx>
---
 hw/intc/i8259.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/hw/intc/i8259.c b/hw/intc/i8259.c
index bfe01067b7..5f90edbe60 100644
--- a/hw/intc/i8259.c
+++ b/hw/intc/i8259.c
@@ -519,7 +519,8 @@ static void i8259_pic_realize(DeviceState *dev, Error 
**errp)
     }
 
     /* Wire up secondary cascade */
-    qdev_connect_gpio_out(sec_dev, 0, s->pass_irqs[2]);
+    qdev_connect_gpio_out(sec_dev, 0,
+                          qdev_get_gpio_in(pri_dev, 2));
 
     for (i = 8; i < ISA_NUM_IRQS; i++) {
         s->pass_irqs[i] = qdev_get_gpio_in(sec_dev, i - 8);
-- 
2.43.0




 


Rackspace

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