qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/7] hw/ide: Untangle ISA/PCI abuses of ide_init_ioport()
@ 2023-02-08  0:07 Philippe Mathieu-Daudé
  2023-02-08  0:07 ` [PATCH 1/7] hw/isa: Un-inline isa_bus_from_device() Philippe Mathieu-Daudé
                   ` (7 more replies)
  0 siblings, 8 replies; 17+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-02-08  0:07 UTC (permalink / raw)
  To: qemu-devel
  Cc: BALATON Zoltan, Paolo Bonzini, qemu-block, Bernhard Beschow,
	Mark Cave-Ayland, John Snow, Philippe Mathieu-Daudé

Background thread:
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



^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2023-03-01 12:15 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-08  0:07 [PATCH 0/7] hw/ide: Untangle ISA/PCI abuses of ide_init_ioport() Philippe Mathieu-Daudé
2023-02-08  0:07 ` [PATCH 1/7] hw/isa: Un-inline isa_bus_from_device() Philippe Mathieu-Daudé
2023-02-08  0:07 ` [PATCH 2/7] hw/isa: Use isa_address_space_io() to reduce access on global 'isabus' Philippe Mathieu-Daudé
2023-02-08  0:07 ` [PATCH 3/7] hw/ide: Rename ISA specific ide_init_ioport() as ide_init_ioport_isa() Philippe Mathieu-Daudé
2023-02-08  0:07 ` [PATCH 4/7] hw/ide: Introduce generic ide_init_ioport() Philippe Mathieu-Daudé
2023-02-08  0:07 ` [PATCH 5/7] hw/ide/piix: Use " Philippe Mathieu-Daudé
2023-02-09  9:04   ` Bernhard Beschow
2023-02-10 16:34     ` Bernhard Beschow
2023-02-15 20:59       ` Philippe Mathieu-Daudé
2023-03-01 12:14       ` Mark Cave-Ayland
2023-02-08  0:07 ` [PATCH 6/7] hw/isa: Assert isa_register_portio_list() gets non-NULL ISA device Philippe Mathieu-Daudé
     [not found]   ` <8bcc1035-c9fc-762a-7a32-6b0344539345@linaro.org>
2023-02-14 10:18     ` Philippe Mathieu-Daudé
2023-02-14 18:49       ` Richard Henderson
2023-02-15  7:12         ` Philippe Mathieu-Daudé
2023-02-08  0:07 ` [PATCH 7/7] hw/ide/piix: Remove dead code in pci_piix_init_ports() Philippe Mathieu-Daudé
2023-02-08 19:40   ` Richard Henderson
2023-02-08  0:09 ` [PATCH 0/7] hw/ide: Untangle ISA/PCI abuses of ide_init_ioport() Philippe Mathieu-Daudé

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).