[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 00/22] i8259: improve qdev PIC modelling (and misc fixes)
- 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: Mon, 12 Oct 2026 11:48:54 +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=2WuatbzrDRA+zw9dJ0d6/9J0dE5mRwP8MVtGHToXSHQ=; b=rzkpZ+ctxiTWP39WGrXZXF3u2rWLYvNwWFFoBADB5rjTJ3qFnm2p1txEKHs1Eovkm7DwZBhCeGdAv/GK+1z3wExR3TOzj1z+1KBrho5pDjXgz11HsKVcspm1Zp79V2PCjNzo/KxHGw3Ta+Uul5Ywg8TI8EkPeStGq/fIlMGSKur3ta5NDfie4kwC8PYg4utTUklh20Ir/qFTC0ipYud2K2aIvDsz3AzG5RuqHPL9WlNw8uxkP/seuCQz4N/RSj9qlL78giABEx95eWCwp5hpYGGgcHYnFk1Qbhe2+OdokZaBAJLsFgVJEJTWgh9rQ6uqxmm/aPRp9bUckvB3J16ung==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ENL0XGGXBzsoTABX0PAFyRZxSIHIaxZgia/KfPG1RdB4t7y/VS6zBKigOM1HEGr3Vglsb99kuVqTDPN9MX2s8QXSOpTt0LLJtB65I8W0GTX5iIPJwnXYByVsEflQNScsUNuOhgJe0JTBjW7m+JCwM2kql5a4b33I6uIA03bYCO/OHIJgq6WtUwL4NS3QTxK36sFeAZP9mKOEubXOZpjC4vU9HzCIOj9bt0pr7F34Nd8/ZulSoxRiTKaxb1+qzlY7XsHlzQb8GhBF8wKewK9I5fRUiuEPHwg0NuWpW9AyGWqSC9GYCiQdzJL1hvZLlIbdPcFutSmz7BVJJdhFcZOvMQ==
- 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: Mon, 12 Oct 2026 10:49:17 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 16/09/2026 11:43, Mark Cave-Ayland wrote:
This series attempts to improve the modelling of legacy x86 PICs within
QEMU. The initial aim was to have a qdev device with one output gpio, and
16 input gpios representing the legacy IRQ lines, however as I went about
trying to model this, I found a number of other inconsistencies/bugs: in
particular there seemed to be some fuzziness around the functionality that
belongs to an individual i8259 chip, and a cascaded i8259 configuration.
For the purposes of this patch an i8259 device is considered to be a single
i8259 chip whilst a PIC device is considered to be either a cascaded i8259
configuration (emulated/KVM) or standalone device (Xen) representing the set
of 16 legacy IRQs and a single output IRQ.
Due to the updated device names, there is currently one visible change in
the HMP monitor output for "info irq" where the isa-i8259 device now appears
as isa-i8259-pic and the kvm-i8259 device appears as kvm-i8259-pic (see
patch 19).
Signed-off-by: Mark Cave-Ayland <mark.caveayland@xxxxxxxxxxx>
Mark Cave-Ayland (22):
i8259_internal.h: rename PIC_COMMON to I8259_COMMON
i8259_internal.h: rename TYPE_I8259_COMMON to i8259-common
i8259_internal.h: rename PICCommonState to I8259CommonState
i8259_internal.h: rename PICCommonClass to I8259CommonClass
i8259.c: move parent_realize from PICClass to I8259CommonClass
kvm/i8259.c: move parent_realize from KVMPICClass to I8259CommonClass
i8259_common.c: use i8259/i8259_common prefix for functions
i8259.c: use i8259 prefix for functions
kvm/i8259.c: use kvm_i8259 prefix for functions
i8259_common.c: convert to use DEFINE_TYPES() macro
i8259.c: convert to use DEFINE_TYPES() macro
kvm/i8259.c: convert to use DEFINE_TYPES() macro
i8259.c: introduce TYPE_I8259_PIC device
i8259.c: properly cascade secondary i8259 from primary i8259
kvm/i8259.c: introduce TYPE_KVM_I8259_PIC device
xen-hvm.c: rename xen_interrupt_controller_init() to xen_i8259_init()
xen/xen-hvm.c: introduce TYPE_XEN_I8259_PIC device
i8259_common.c: remove unused i8259_init_chip() function
i8259: move InterruptStatsProviderClass get_statistics() from i8259 to
PIC
i8259.c: switch isa_pic from I8259CommonState to I8259PICState
i8259_common.c: remove static irq_count and irq_level variables
i8259_common.c: add missing 0x prefixes to "info pic" output
include/hw/intc/i8259.h | 12 +-
include/hw/isa/i8259_internal.h | 21 ++-
include/hw/xen/xen.h | 2 +-
hw/i386/kvm/i8259.c | 167 +++++++++++++----
hw/i386/pc.c | 2 +-
hw/i386/xen/xen-hvm.c | 40 +++-
hw/intc/i8259.c | 322 +++++++++++++++++++++-----------
hw/intc/i8259_common.c | 171 ++++++++---------
stubs/xen-hw-stub.c | 2 +-
9 files changed, 477 insertions(+), 262 deletions(-)
Ping?
ATB,
Mark.
|