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

Re: [PATCH 20/22] i8259.c: switch isa_pic from I8259CommonState to I8259PICState


  • To: Peter Maydell <peter.maydell@xxxxxxxxxx>
  • From: Mark Cave-Ayland <mark.caveayland@xxxxxxxxxxx>
  • Date: Wed, 14 Oct 2026 12:22:15 +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=UntIQfcG69Yt7u5iVkMIcsZ3ycgkHq/G3KI1rc32GQY=; b=GRVMEeKRrQWlIPSjnCUiIkg+SsWm6UGNsyEXuZdDU9SMUojj75R+J/eaA39IPKJ9bnNnkpb3fjveArKPabfRq4132W//q932OeAw+7Ms8WmrWmKa2qmMLgDcgbHh2d36yPR9Rs+OoXSQrKPY9YTfLFnELw/cNiIS745IFh/NJJtqcgDbC+dBU1bvfw6Szt3L1ZPQTZS8XNdj6S2llWDtzkpDXTPkswD4ztlrT5N61bG82GWfaqxwxSHG3diGMAfY7W41ZYJuDCZBden406a+OMWXTvvNIyARpnPU5j3uYhQLep7ICQcu6eI0ZvHrew+3TvEVG9KmQPI9ozLjlBVnrQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ZVsweAuqoYydf6q2FqQCJ37fkFvnTaxBtijuERGV2KJRPmcn/+ll+36+1EwDL9a6Giny5zYPqsYDp9eWHQNu3LYl7WRZX5ddIi6bJ2a09x//PZAVmu13Y7FUett1c3EmxsfUzhMrKMSam79xh6g6BocJJNpSkcLxP+blzF6OSZZuSarNP7vjJbg87u+blLng4/8R9SI5444Qp3shFdKIEBmpmbI1xlgR9sq2eCKJKrsHG8ylLqPTdNjRCiD/itV7diMjdWBL9x2zPLrLjiPcF+MMQQlxgILSd5J5lFQNpdllUVb5h7FUWLIXVCo++KzTafZ8vYT6E1suEbz5dOP0sg==
  • Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=proofpoint20171006 header.d=nutanix.com header.i="@nutanix.com" header.h="Cc: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;
  • Cc: pbonzini@xxxxxxxxxx, richard.henderson@xxxxxxxxxx, mst@xxxxxxxxxx, sstabellini@xxxxxxxxxx, anthony@xxxxxxxxxxxxxx, edgar.iglesias@xxxxxxxxx, qemu-devel@xxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Wed, 14 Oct 2026 11:22:32 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 13/10/2026 17:26, Peter Maydell wrote:

On Wed, 16 Sept 2026 at 11:49, Mark Cave-Ayland
<mark.caveayland@xxxxxxxxxxx> wrote:

The isa_pic variable exists to allow the output to be fetched or read (fetched
and acknowledged) from the x86 PIC. Since this can also contain a cascaded
interrupt from a slave i8259, switch isa_pic from I8259CommonState to
I8259PICState and update both pic_get_output() and pic_read_irq() accordingly.

This has the advantage that a i8259-based PIC device contains its own internal
reference to both the primary and secondary i8259s, and therefore it becomes
possible to completely remove the slave_pic variable.

Signed-off-by: Mark Cave-Ayland <mark.caveayland@xxxxxxxxxxx>
---

Reviewed-by: Peter Maydell <peter.maydell@xxxxxxxxxx>

(That isa_pic global is kind of ugly; in an ideal world the callers
would have a pointer to the PIC they cared about rather than relying
on there being exactly one in the system...)
That was actually one of the ultimate aims of this series, however I submitted the 8259 changes separately to avoid sending a much larger series :)


ATB,

Mark.




 


Rackspace

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