qemu-devel
[Top][All Lists]
Advanced

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

[PATCH 0/7] hw/ide: Untangle ISA/PCI abuses of ide_init_ioport()


From: Philippe Mathieu-Daudé
Subject: [PATCH 0/7] hw/ide: Untangle ISA/PCI abuses of ide_init_ioport()
Date: Wed, 8 Feb 2023 01:07:36 +0100

Background thread:
5095dffc-309b-6c72-d255-8cdaa6fd3d52@ilande.co.uk/">https://lore.kernel.org/qemu-devel/5095dffc-309b-6c72-d255-8cdaa6fd3d52@ilande.co.uk/

The ide_init_ioport() method expect an ISA device, but is
massaged to accept NULL device (IOW, non-ISA devices...).

A plausible explanation is QOM objects can only inherit one
parent, and ide_init_ioport() was first used with ISA children.
Later it was adapted to accept PCI children in a convoluted
way. The PIIX IDE function abuse it.

This series rename the current ide_init_ioport() as
ide_init_ioport_isa(), then add a generic ide_init_ioport()
which works with PCI devices.

This is required to proceed with more PIIX cleanups.

Philippe Mathieu-Daudé (7):
  hw/isa: Un-inline isa_bus_from_device()
  hw/isa: Use isa_address_space_io() to reduce access on global 'isabus'
  hw/ide: Rename ISA specific ide_init_ioport() as ide_init_ioport_isa()
  hw/ide: Introduce generic ide_init_ioport()
  hw/ide/piix: Use generic ide_init_ioport()
  hw/isa: Assert isa_register_portio_list() gets non-NULL ISA device
  hw/ide/piix: Remove dead code in pci_piix_init_ports()

 hw/ide/ioport.c           | 13 ++++++++++---
 hw/ide/isa.c              |  2 +-
 hw/ide/piix.c             | 21 ++++++---------------
 hw/isa/isa-bus.c          | 13 ++++++++++---
 include/hw/ide/internal.h |  4 +++-
 include/hw/isa/isa.h      |  5 +----
 6 files changed, 31 insertions(+), 27 deletions(-)

-- 
2.38.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]