Skip to content

Clean up PCI IDE device models

Bernhard Beschow qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest13 patches 63 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/13hw/ide/pci: Expose legacy interrupts as GPIOshw/ide/pci.c+8 -02 replies
2/13hw/ide/via: Implement ISA IRQ routinghw/ide/via.c hw/isa/vt82c686.c+21 -26 replies
3/13hw/isa/vt82c686: Remove via_isa_set_irq()hw/isa/vt82c686.c include/hw/isa/vt82c686.h+0 -81 reply
4/13hw/ide: Extract IDEBus assignment into bmdma_init()hw/ide/cmd646.c hw/ide/pci.c hw/ide/piix.c +2 more+1 -43 replies
5/13hw/ide: Extract pci_ide_class_init()hw/ide/cmd646.c hw/ide/pci.c hw/ide/piix.c +3 more+26 -527 replies
6/13hw/ide: Extract bmdma_init_ops()hw/ide/cmd646.c hw/ide/pci.c hw/ide/piix.c +2 more+20 -553 replies
7/13hw/ide: Extract pci_ide_{cmd, data}_le_ops initialization into base class constructorhw/ide/cmd646.c hw/ide/pci.c hw/ide/via.c+10 -223 replies
8/13hw/ide: Rename PCIIDEState::*_bar attributeshw/ide/cmd646.c hw/ide/pci.c hw/ide/piix.c +2 more+23 -234 replies
9/13hw/ide/piix: Disuse isa_get_irq()hw/ide/piix.c+20 -35 replies
10/13hw/ide/piix: Reuse PCIIDEState::{cmd,data}_opshw/ide/piix.c+13 -1711 replies
11/13hw/ide/sii3112: Reuse PCIIDEState::{cmd,data}_opshw/ide/pci.c hw/ide/sii3112.c include/hw/ide/pci.h+20 -369 replies
12/13hw/ide/sii3112: Reuse PCIIDEState::bmdma_opshw/ide/pci.c hw/ide/sii3112.c hw/ide/trace-events +1 more+60 -432 replies
13/13hw/ide: Extract bmdma_clear_status()hw/ide/cmd646.c hw/ide/pci.c hw/ide/piix.c +4 more+17 -107 replies

Reviews trailers per patch

8 of 13 patches have a Reviewed-by or Acked-by.

PatchBALATON ZoltanPhilippe Mathieu-DaudéMark Cave-Ayland
1/13R-b
2/13R-b
3/13R-b
4/13R-b R-b R-b
5/13
6/13R-b R-b
7/13R-b R-b
8/13
9/13
10/13
11/13R-b
12/13R-b
13/13

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v1 thread

Cover letter [PATCH 00/13] Clean up PCI IDE device models

This series is yet another attempt to clean up the PCI IDE models. It is mainly inspired the Mark's invaluable input from previous discussions. In particular, this series attempts to follow the "PCI IDE controller specification" closer. As a side effect, it also resolves usage of the isabus global in PIIX. Last but not least it fixes the VIA IDE controller to not depend on its south bridge which fixes a circular dependency.

The series is structured as follows: The first three commits resolve a circular dependency between the VIA IDE controller and its south bridge, thereby implementing legacy PCI IDE interrupt routing which was missing so far. The next five patches factor out common code into the PCI IDE base class. The next two patches resolve usage of the isabus global in PIIX by reusing now common code from the base class. The same is then done for the SIL3112 controller. Finally, a small convenience function is introduced which should hide some implementation details in the PCI IDE base class.

Testing done:
* make check
* make check-avocado
* `qemu-system-ppc -machine pegasos2 -rtc base=localtime -device \
ati-vga,guest_hwcursor=true,romfile="" -cdrom morphos-3.17.iso -kernel morphos-3.17/boot.img`
The machine booted successfully and a startup sound was hearable
* `qemu-system-ppc -machine pegasos2 -rtc base=localtime -device \
ati-vga,guest_hwcursor=true,romfile="" -cdrom morphos-3.17.iso -kernel morphos-3.17/boot.img`
The machine booted successfully and applications could be started.
* qemu-system-x86_64 was used for hours during work

Bernhard Beschow (13):
hw/ide/pci: Expose legacy interrupts as GPIOs hw/ide/via: Implement ISA IRQ routing
hw/isa/vt82c686: Remove via_isa_set_irq()
hw/ide: Extract IDEBus assignment into bmdma_init() hw/ide: Extract pci_ide_class_init()
hw/ide: Extract bmdma_init_ops()
hw/ide: Extract pci_ide_{cmd,data}_le_ops initialization into base
class constructor
hw/ide: Rename PCIIDEState::*_bar attributes hw/ide/piix: Disuse isa_get_irq()
hw/ide/piix: Reuse PCIIDEState::{cmd,data}_ops hw/ide/sii3112: Reuse PCIIDEState::{cmd,data}_ops hw/ide/sii3112: Reuse PCIIDEState::bmdma_ops
hw/ide: Extract bmdma_clear_status()

 include/hw/ide/pci.h      |  12 ++-
 include/hw/isa/vt82c686.h |   2 -
 hw/ide/cmd646.c           |  59 ++-------------
 hw/ide/pci.c              |  73 ++++++++++++++++++-
 hw/ide/piix.c             |  88 ++++++++--------------
 hw/ide/sii3112.c          | 150 +++++++++++++++++++-------------------
 hw/ide/via.c              |  64 +++-------------
 hw/isa/vt82c686.c         |  23 ++++--
 hw/ide/trace-events       |   7 +-
 9 files changed, 221 insertions(+), 257 deletions(-)
Signature · 1 line
2.40.0