[PATCH v3 0/7] VIA and general PCI IDE cleanup

Bernhard Beschow posted 7 patches 10 months, 3 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20230531211043.41724-1-shentey@gmail.com
Maintainers: John Snow <jsnow@redhat.com>, BALATON Zoltan <balaton@eik.bme.hu>, Huacai Chen <chenhuacai@kernel.org>, "Philippe Mathieu-Daudé" <philmd@linaro.org>, Jiaxun Yang <jiaxun.yang@flygoat.com>
include/hw/ide/pci.h      |  1 +
include/hw/isa/vt82c686.h |  2 --
hw/ide/cmd646.c           |  3 +--
hw/ide/pci.c              | 16 ++++++++++++++++
hw/ide/piix.c             |  8 +++-----
hw/ide/sii3112.c          |  7 ++-----
hw/ide/via.c              |  9 +++++----
hw/isa/vt82c686.c         | 11 +++++------
8 files changed, 33 insertions(+), 24 deletions(-)
[PATCH v3 0/7] VIA and general PCI IDE cleanup
Posted by Bernhard Beschow 10 months, 3 weeks ago
This series is split off from a more general PCI IDE refactoring aiming for a
common implementation of the PCI IDE controller specification for all
TYPE_PCI_IDE models [1].

The first three patches resolve a circular dependency between the VIA IDE
controller and its south bridge. The next three patches resolves redundant code
accross all TYPE_PCI_IDE models. The last patch modernizes VM state setup in
PIIX IDE.

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 \
   -bios pegasos2.rom`
   The machine booted successfully and a startup sound was hearable
* `qemu-system-ppc -machine sam460ex -rtc base=localtime -drive \
   if=none,id=cd,file=morphos-3.17.iso,format=raw -device \
   ide-cd,drive=cd,bus=ide.1`
   The machine booted successfully into graphical desktop environment

v3:
* Fix formatting (Mark) ... and split into two commits (Bernhard)

v2:
* Add missing Signed-off-by tag to last commit (Zoltan)

Changes since [1]:
* Turn legacy IRQs into named GPIOs (Mark)
* Don't make VIA IDE legacy IRQs routable; just wire up in host device (Zoltan)
* Rename extracted bmdma_clear_status() (Zoltan)
   ... to bmdma_status_writeb() (Mark)

[1] https://lore.kernel.org/qemu-devel/20230422150728.176512-1-shentey@gmail.com/

Bernhard Beschow (7):
  hw/ide/pci: Expose legacy interrupts as named GPIOs
  hw/ide/via: Wire up IDE legacy interrupts in host device
  hw/isa/vt82c686: Remove via_isa_set_irq()
  hw/ide: Extract IDEBus assignment into bmdma_init()
  hw/ide: Extract bmdma_status_writeb()
  hw/ide/pci: Replace some magic numbers by constants
  hw/ide/piix: Move registration of VMStateDescription to DeviceClass

 include/hw/ide/pci.h      |  1 +
 include/hw/isa/vt82c686.h |  2 --
 hw/ide/cmd646.c           |  3 +--
 hw/ide/pci.c              | 16 ++++++++++++++++
 hw/ide/piix.c             |  8 +++-----
 hw/ide/sii3112.c          |  7 ++-----
 hw/ide/via.c              |  9 +++++----
 hw/isa/vt82c686.c         | 11 +++++------
 8 files changed, 33 insertions(+), 24 deletions(-)

-- 
2.40.1

Re: [PATCH v3 0/7] VIA and general PCI IDE cleanup
Posted by Bernhard Beschow 9 months, 1 week ago

Am 31. Mai 2023 21:10:36 UTC schrieb Bernhard Beschow <shentey@gmail.com>:
>This series is split off from a more general PCI IDE refactoring aiming for a
>
>common implementation of the PCI IDE controller specification for all
>
>TYPE_PCI_IDE models [1].
>
>
>
>The first three patches resolve a circular dependency between the VIA IDE
>
>controller and its south bridge. The next three patches resolves redundant code
>
>accross all TYPE_PCI_IDE models. The last patch modernizes VM state setup in
>
>PIIX IDE.
>
>
>
>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 \
>
>   -bios pegasos2.rom`
>
>   The machine booted successfully and a startup sound was hearable
>
>* `qemu-system-ppc -machine sam460ex -rtc base=localtime -drive \
>
>   if=none,id=cd,file=morphos-3.17.iso,format=raw -device \
>
>   ide-cd,drive=cd,bus=ide.1`
>
>   The machine booted successfully into graphical desktop environment
>
>
>
>v3:
>
>* Fix formatting (Mark) ... and split into two commits (Bernhard)
>
>
>
>v2:
>
>* Add missing Signed-off-by tag to last commit (Zoltan)
>
>
>
>Changes since [1]:
>
>* Turn legacy IRQs into named GPIOs (Mark)
>
>* Don't make VIA IDE legacy IRQs routable; just wire up in host device (Zoltan)
>
>* Rename extracted bmdma_clear_status() (Zoltan)
>
>   ... to bmdma_status_writeb() (Mark)
>
>
>
>[1] https://lore.kernel.org/qemu-devel/20230422150728.176512-1-shentey@gmail.com/
>
>
>
>Bernhard Beschow (7):
>
>  hw/ide/pci: Expose legacy interrupts as named GPIOs
>
>  hw/ide/via: Wire up IDE legacy interrupts in host device
>
>  hw/isa/vt82c686: Remove via_isa_set_irq()
>
>  hw/ide: Extract IDEBus assignment into bmdma_init()
>
>  hw/ide: Extract bmdma_status_writeb()
>
>  hw/ide/pci: Replace some magic numbers by constants
>
>  hw/ide/piix: Move registration of VMStateDescription to DeviceClass
>

Ping

AFAICS all patches are reviewed.

Best regards,
Bernhard

>
>
> include/hw/ide/pci.h      |  1 +
>
> include/hw/isa/vt82c686.h |  2 --
>
> hw/ide/cmd646.c           |  3 +--
>
> hw/ide/pci.c              | 16 ++++++++++++++++
>
> hw/ide/piix.c             |  8 +++-----
>
> hw/ide/sii3112.c          |  7 ++-----
>
> hw/ide/via.c              |  9 +++++----
>
> hw/isa/vt82c686.c         | 11 +++++------
>
> 8 files changed, 33 insertions(+), 24 deletions(-)
>
>
>
>-- >
>2.40.1
>
>
>
Re: [PATCH v3 0/7] VIA and general PCI IDE cleanup
Posted by Philippe Mathieu-Daudé 9 months, 1 week ago
On 31/5/23 23:10, Bernhard Beschow wrote:
> This series is split off from a more general PCI IDE refactoring aiming for a
> common implementation of the PCI IDE controller specification for all
> TYPE_PCI_IDE models [1].


> Bernhard Beschow (7):
>    hw/ide/pci: Expose legacy interrupts as named GPIOs
>    hw/ide/via: Wire up IDE legacy interrupts in host device
>    hw/isa/vt82c686: Remove via_isa_set_irq()
>    hw/ide: Extract IDEBus assignment into bmdma_init()
>    hw/ide: Extract bmdma_status_writeb()
>    hw/ide/pci: Replace some magic numbers by constants
>    hw/ide/piix: Move registration of VMStateDescription to DeviceClass

Queued to mips-next, thanks!