qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PULL 00/20] Ide patches
@ 2020-03-17 23:23 John Snow
  2020-03-17 23:23 ` [PULL 01/20] cmd646: register cmd646_reset() function in DeviceClass John Snow
                   ` (20 more replies)
  0 siblings, 21 replies; 24+ messages in thread
From: John Snow @ 2020-03-17 23:23 UTC (permalink / raw)
  To: qemu-devel, Peter Maydell
  Cc: Laurent Vivier, Kevin Wolf, Thomas Huth, Eduardo Habkost,
	qemu-block, Michael S. Tsirkin, Philippe Mathieu-Daudé,
	Helge Deller, Mark Cave-Ayland, Max Reitz, Hervé Poussineau,
	Artyom Tarasenko, Aleksandar Markovic, Paolo Bonzini, qemu-ppc,
	Aleksandar Rikalo, David Gibson, John Snow, Aurelien Jarno,
	Richard Henderson

The following changes since commit 373c7068dd610e97f0b551b5a6d0a27cd6da4506:

  qemu.nsi: Install Sphinx documentation (2020-03-09 16:45:00 +0000)

are available in the Git repository at:

  https://github.com/jnsnow/qemu.git tags/ide-pull-request

for you to fetch changes up to 7d0776ca7f853d466b6174d96daa5c8afc43d1a4:

  hw/ide: Remove unneeded inclusion of hw/ide.h (2020-03-17 12:22:36 -0400)

----------------------------------------------------------------
Pull request

----------------------------------------------------------------

BALATON Zoltan (10):
  ide/via: Get rid of via_ide_init()
  pci: Honour wmask when resetting PCI_INTERRUPT_LINE
  hw/ide: Get rid of piix3_init functions
  hw/isa/piix4.c: Introduce variable to store devfn
  hw/ide: Get rid of piix4_init function
  hw/ide: Remove now unneded #include "hw/pci/pci.h" from hw/ide.h
  hw/ide/pci.c: Coding style update to fix checkpatch errors
  hw/ide: Do ide_drive_get() within pci_ide_create_devs()
  hw/ide: Move MAX_IDE_DEVS define to hw/ide/internal.h
  hw/ide: Remove unneeded inclusion of hw/ide.h

Mark Cave-Ayland (9):
  cmd646: register cmd646_reset() function in DeviceClass
  cmd646: register vmstate_ide_pci VMStateDescription in DeviceClass
  dp264: use pci_create_simple() to initialise the cmd646 device
  cmd646: remove unused pci_cmd646_ide_init() function
  via-ide: move registration of VMStateDescription to DeviceClass
  via-ide: ensure that PCI_INTERRUPT_LINE is hard-wired to its default
    value
  via-ide: initialise IDE controller in legacy mode
  via-ide: allow guests to write to PCI_CLASS_PROG
  via-ide: always use legacy IRQ 14/15 routing

Markus Armbruster (1):
  hd-geo-test: Clean up use of buf[] in create_qcow2_with_mbr()

 hw/hppa/hppa_sys.h            |  1 -
 hw/ide/ahci_internal.h        |  1 +
 include/hw/ide.h              |  9 ---------
 include/hw/ide/internal.h     |  2 ++
 include/hw/ide/pci.h          |  3 ++-
 include/hw/misc/macio/macio.h |  1 +
 include/hw/southbridge/piix.h |  3 +--
 hw/alpha/dp264.c              | 11 ++++-------
 hw/hppa/machine.c             |  1 -
 hw/i386/pc_piix.c             | 18 +++++++++---------
 hw/ide/cmd646.c               | 21 ++++-----------------
 hw/ide/pci.c                  | 11 +++++++----
 hw/ide/piix.c                 | 31 +------------------------------
 hw/ide/via.c                  | 21 +++++----------------
 hw/isa/piix4.c                | 23 ++++++++++-------------
 hw/mips/mips_fulong2e.c       |  8 ++++----
 hw/mips/mips_malta.c          |  2 +-
 hw/mips/mips_r4k.c            |  1 +
 hw/pci/pci.c                  |  5 ++++-
 hw/ppc/mac_newworld.c         |  1 -
 hw/ppc/mac_oldworld.c         |  1 -
 hw/ppc/prep.c                 |  1 -
 hw/sparc64/sun4u.c            |  6 +-----
 tests/qtest/hd-geo-test.c     |  6 +++---
 24 files changed, 61 insertions(+), 127 deletions(-)

-- 
2.21.1



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

* [PULL 01/20] cmd646: register cmd646_reset() function in DeviceClass
  2020-03-17 23:23 [PULL 00/20] Ide patches John Snow
@ 2020-03-17 23:23 ` John Snow
  2020-03-17 23:23 ` [PULL 02/20] cmd646: register vmstate_ide_pci VMStateDescription " John Snow
                   ` (19 subsequent siblings)
  20 siblings, 0 replies; 24+ messages in thread
From: John Snow @ 2020-03-17 23:23 UTC (permalink / raw)
  To: qemu-devel, Peter Maydell
  Cc: Laurent Vivier, Kevin Wolf, Thomas Huth, Eduardo Habkost,
	qemu-block, Michael S. Tsirkin, Philippe Mathieu-Daudé,
	Helge Deller, Mark Cave-Ayland, Max Reitz, Hervé Poussineau,
	Artyom Tarasenko, Aleksandar Markovic, Paolo Bonzini, qemu-ppc,
	Aleksandar Rikalo, David Gibson, John Snow, Aurelien Jarno,
	Richard Henderson

From: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-id: 20200307151536.32709-2-mark.cave-ayland@ilande.co.uk
Signed-off-by: John Snow <jsnow@redhat.com>
---
 hw/ide/cmd646.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/hw/ide/cmd646.c b/hw/ide/cmd646.c
index 335c060673..2f11d8de24 100644
--- a/hw/ide/cmd646.c
+++ b/hw/ide/cmd646.c
@@ -207,9 +207,9 @@ static void cmd646_set_irq(void *opaque, int channel, int level)
     cmd646_update_irq(pd);
 }
 
-static void cmd646_reset(void *opaque)
+static void cmd646_reset(DeviceState *dev)
 {
-    PCIIDEState *d = opaque;
+    PCIIDEState *d = PCI_IDE(dev);
     unsigned int i;
 
     for (i = 0; i < 2; i++) {
@@ -303,7 +303,6 @@ static void pci_cmd646_ide_realize(PCIDevice *dev, Error **errp)
     g_free(irq);
 
     vmstate_register(VMSTATE_IF(dev), 0, &vmstate_ide_pci, d);
-    qemu_register_reset(cmd646_reset, d);
 }
 
 static void pci_cmd646_ide_exitfn(PCIDevice *dev)
@@ -339,6 +338,7 @@ static void cmd646_ide_class_init(ObjectClass *klass, void *data)
     DeviceClass *dc = DEVICE_CLASS(klass);
     PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
 
+    dc->reset = cmd646_reset;
     k->realize = pci_cmd646_ide_realize;
     k->exit = pci_cmd646_ide_exitfn;
     k->vendor_id = PCI_VENDOR_ID_CMD;
-- 
2.21.1



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

* [PULL 02/20] cmd646: register vmstate_ide_pci VMStateDescription in DeviceClass
  2020-03-17 23:23 [PULL 00/20] Ide patches John Snow
  2020-03-17 23:23 ` [PULL 01/20] cmd646: register cmd646_reset() function in DeviceClass John Snow
@ 2020-03-17 23:23 ` John Snow
  2020-03-17 23:23 ` [PULL 03/20] dp264: use pci_create_simple() to initialise the cmd646 device John Snow
                   ` (18 subsequent siblings)
  20 siblings, 0 replies; 24+ messages in thread
From: John Snow @ 2020-03-17 23:23 UTC (permalink / raw)
  To: qemu-devel, Peter Maydell
  Cc: Laurent Vivier, Kevin Wolf, Thomas Huth, Eduardo Habkost,
	qemu-block, Michael S. Tsirkin, Philippe Mathieu-Daudé,
	Helge Deller, Mark Cave-Ayland, Max Reitz, Hervé Poussineau,
	Artyom Tarasenko, Aleksandar Markovic, Paolo Bonzini, qemu-ppc,
	Aleksandar Rikalo, David Gibson, John Snow, Aurelien Jarno,
	Richard Henderson

From: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-id: 20200307151536.32709-3-mark.cave-ayland@ilande.co.uk
Signed-off-by: John Snow <jsnow@redhat.com>
---
 hw/ide/cmd646.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/hw/ide/cmd646.c b/hw/ide/cmd646.c
index 2f11d8de24..3c4f765bd6 100644
--- a/hw/ide/cmd646.c
+++ b/hw/ide/cmd646.c
@@ -301,8 +301,6 @@ static void pci_cmd646_ide_realize(PCIDevice *dev, Error **errp)
         ide_register_restart_cb(&d->bus[i]);
     }
     g_free(irq);
-
-    vmstate_register(VMSTATE_IF(dev), 0, &vmstate_ide_pci, d);
 }
 
 static void pci_cmd646_ide_exitfn(PCIDevice *dev)
@@ -339,6 +337,7 @@ static void cmd646_ide_class_init(ObjectClass *klass, void *data)
     PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
 
     dc->reset = cmd646_reset;
+    dc->vmsd = &vmstate_ide_pci;
     k->realize = pci_cmd646_ide_realize;
     k->exit = pci_cmd646_ide_exitfn;
     k->vendor_id = PCI_VENDOR_ID_CMD;
-- 
2.21.1



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

* [PULL 03/20] dp264: use pci_create_simple() to initialise the cmd646 device
  2020-03-17 23:23 [PULL 00/20] Ide patches John Snow
  2020-03-17 23:23 ` [PULL 01/20] cmd646: register cmd646_reset() function in DeviceClass John Snow
  2020-03-17 23:23 ` [PULL 02/20] cmd646: register vmstate_ide_pci VMStateDescription " John Snow
@ 2020-03-17 23:23 ` John Snow
  2020-03-17 23:23 ` [PULL 04/20] cmd646: remove unused pci_cmd646_ide_init() function John Snow
                   ` (17 subsequent siblings)
  20 siblings, 0 replies; 24+ messages in thread
From: John Snow @ 2020-03-17 23:23 UTC (permalink / raw)
  To: qemu-devel, Peter Maydell
  Cc: Michael S. Tsirkin, Mark Cave-Ayland, qemu-block, Helge Deller,
	Hervé Poussineau, Aleksandar Rikalo, Richard Henderson,
	Philippe Mathieu-Daudé,
	Artyom Tarasenko, Laurent Vivier, Thomas Huth, Eduardo Habkost,
	Richard Henderson, John Snow, David Gibson, Kevin Wolf,
	Max Reitz, qemu-ppc, Aleksandar Markovic, Paolo Bonzini,
	Aurelien Jarno

From: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>

Remove the call to pci_cmd646_ide_init() since global device init functions
are deprecated in preference of using qdev directly.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-id: 20200307091313.24190-2-mark.cave-ayland@ilande.co.uk
Signed-off-by: John Snow <jsnow@redhat.com>
---
 hw/alpha/dp264.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/hw/alpha/dp264.c b/hw/alpha/dp264.c
index e5350a287f..27595767e5 100644
--- a/hw/alpha/dp264.c
+++ b/hw/alpha/dp264.c
@@ -16,6 +16,7 @@
 #include "sysemu/sysemu.h"
 #include "hw/rtc/mc146818rtc.h"
 #include "hw/ide.h"
+#include "hw/ide/pci.h"
 #include "hw/timer/i8254.h"
 #include "hw/isa/superio.h"
 #include "hw/dma/i8257.h"
@@ -101,9 +102,12 @@ static void clipper_init(MachineState *machine)
     /* IDE disk setup.  */
     {
         DriveInfo *hd[MAX_IDE_BUS * MAX_IDE_DEVS];
+        PCIDevice *pci_dev;
+
         ide_drive_get(hd, ARRAY_SIZE(hd));
 
-        pci_cmd646_ide_init(pci_bus, hd, 0);
+        pci_dev = pci_create_simple(pci_bus, -1, "cmd646-ide");
+        pci_ide_create_devs(pci_dev, hd);
     }
 
     /* Load PALcode.  Given that this is not "real" cpu palcode,
-- 
2.21.1



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

* [PULL 04/20] cmd646: remove unused pci_cmd646_ide_init() function
  2020-03-17 23:23 [PULL 00/20] Ide patches John Snow
                   ` (2 preceding siblings ...)
  2020-03-17 23:23 ` [PULL 03/20] dp264: use pci_create_simple() to initialise the cmd646 device John Snow
@ 2020-03-17 23:23 ` John Snow
  2020-03-17 23:23 ` [PULL 05/20] via-ide: move registration of VMStateDescription to DeviceClass John Snow
                   ` (16 subsequent siblings)
  20 siblings, 0 replies; 24+ messages in thread
From: John Snow @ 2020-03-17 23:23 UTC (permalink / raw)
  To: qemu-devel, Peter Maydell
  Cc: Michael S. Tsirkin, Mark Cave-Ayland, qemu-block, Helge Deller,
	Hervé Poussineau, Aleksandar Rikalo, Richard Henderson,
	Philippe Mathieu-Daudé,
	Artyom Tarasenko, Laurent Vivier, Thomas Huth, Eduardo Habkost,
	Richard Henderson, John Snow, David Gibson, Kevin Wolf,
	Max Reitz, qemu-ppc, Aleksandar Markovic, Paolo Bonzini,
	Aurelien Jarno

From: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-id: 20200307091313.24190-3-mark.cave-ayland@ilande.co.uk
Signed-off-by: John Snow <jsnow@redhat.com>
---
 include/hw/ide.h |  2 --
 hw/ide/cmd646.c  | 12 ------------
 2 files changed, 14 deletions(-)

diff --git a/include/hw/ide.h b/include/hw/ide.h
index 28d8a06439..0c7080ed92 100644
--- a/include/hw/ide.h
+++ b/include/hw/ide.h
@@ -12,8 +12,6 @@ ISADevice *isa_ide_init(ISABus *bus, int iobase, int iobase2, int isairq,
                         DriveInfo *hd0, DriveInfo *hd1);
 
 /* ide-pci.c */
-void pci_cmd646_ide_init(PCIBus *bus, DriveInfo **hd_table,
-                         int secondary_ide_enabled);
 PCIDevice *pci_piix3_xen_ide_init(PCIBus *bus, DriveInfo **hd_table, int devfn);
 PCIDevice *pci_piix3_ide_init(PCIBus *bus, DriveInfo **hd_table, int devfn);
 PCIDevice *pci_piix4_ide_init(PCIBus *bus, DriveInfo **hd_table, int devfn);
diff --git a/hw/ide/cmd646.c b/hw/ide/cmd646.c
index 3c4f765bd6..699f25824d 100644
--- a/hw/ide/cmd646.c
+++ b/hw/ide/cmd646.c
@@ -314,18 +314,6 @@ static void pci_cmd646_ide_exitfn(PCIDevice *dev)
     }
 }
 
-void pci_cmd646_ide_init(PCIBus *bus, DriveInfo **hd_table,
-                         int secondary_ide_enabled)
-{
-    PCIDevice *dev;
-
-    dev = pci_create(bus, -1, "cmd646-ide");
-    qdev_prop_set_uint32(&dev->qdev, "secondary", secondary_ide_enabled);
-    qdev_init_nofail(&dev->qdev);
-
-    pci_ide_create_devs(dev, hd_table);
-}
-
 static Property cmd646_ide_properties[] = {
     DEFINE_PROP_UINT32("secondary", PCIIDEState, secondary, 0),
     DEFINE_PROP_END_OF_LIST(),
-- 
2.21.1



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

* [PULL 05/20] via-ide: move registration of VMStateDescription to DeviceClass
  2020-03-17 23:23 [PULL 00/20] Ide patches John Snow
                   ` (3 preceding siblings ...)
  2020-03-17 23:23 ` [PULL 04/20] cmd646: remove unused pci_cmd646_ide_init() function John Snow
@ 2020-03-17 23:23 ` John Snow
  2020-03-17 23:23 ` [PULL 06/20] ide/via: Get rid of via_ide_init() John Snow
                   ` (15 subsequent siblings)
  20 siblings, 0 replies; 24+ messages in thread
From: John Snow @ 2020-03-17 23:23 UTC (permalink / raw)
  To: qemu-devel, Peter Maydell
  Cc: Michael S. Tsirkin, Mark Cave-Ayland, qemu-block, Helge Deller,
	Hervé Poussineau, Aleksandar Rikalo, Richard Henderson,
	Philippe Mathieu-Daudé,
	Artyom Tarasenko, Laurent Vivier, Thomas Huth, Eduardo Habkost,
	John Snow, David Gibson, Kevin Wolf, Max Reitz, qemu-ppc,
	Aleksandar Markovic, Paolo Bonzini, Aurelien Jarno

From: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: BALATON Zoltan <balaton@eik.bme.hu>
Message-id: 20200313082444.2439-2-mark.cave-ayland@ilande.co.uk
Signed-off-by: John Snow <jsnow@redhat.com>
---
 hw/ide/via.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/hw/ide/via.c b/hw/ide/via.c
index 096de8dba0..84f0efff94 100644
--- a/hw/ide/via.c
+++ b/hw/ide/via.c
@@ -190,8 +190,6 @@ static void via_ide_realize(PCIDevice *dev, Error **errp)
     bmdma_setup_bar(d);
     pci_register_bar(dev, 4, PCI_BASE_ADDRESS_SPACE_IO, &d->bmdma_bar);
 
-    vmstate_register(VMSTATE_IF(dev), 0, &vmstate_ide_pci, d);
-
     for (i = 0; i < 2; i++) {
         ide_bus_new(&d->bus[i], sizeof(d->bus[i]), DEVICE(d), i, 2);
         ide_init2(&d->bus[i], qemu_allocate_irq(via_ide_set_irq, d, i));
@@ -227,6 +225,7 @@ static void via_ide_class_init(ObjectClass *klass, void *data)
     PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
 
     dc->reset = via_ide_reset;
+    dc->vmsd = &vmstate_ide_pci;
     k->realize = via_ide_realize;
     k->exit = via_ide_exitfn;
     k->vendor_id = PCI_VENDOR_ID_VIA;
-- 
2.21.1



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

* [PULL 06/20] ide/via: Get rid of via_ide_init()
  2020-03-17 23:23 [PULL 00/20] Ide patches John Snow
                   ` (4 preceding siblings ...)
  2020-03-17 23:23 ` [PULL 05/20] via-ide: move registration of VMStateDescription to DeviceClass John Snow
@ 2020-03-17 23:23 ` John Snow
  2020-03-17 23:23 ` [PULL 07/20] pci: Honour wmask when resetting PCI_INTERRUPT_LINE John Snow
                   ` (14 subsequent siblings)
  20 siblings, 0 replies; 24+ messages in thread
From: John Snow @ 2020-03-17 23:23 UTC (permalink / raw)
  To: qemu-devel, Peter Maydell
  Cc: Michael S. Tsirkin, Mark Cave-Ayland, qemu-block, Helge Deller,
	Hervé Poussineau, Aleksandar Rikalo, Richard Henderson,
	Philippe Mathieu-Daudé,
	Artyom Tarasenko, Laurent Vivier, Thomas Huth, Eduardo Habkost,
	John Snow, David Gibson, Kevin Wolf, Max Reitz, qemu-ppc,
	Aleksandar Markovic, Paolo Bonzini, Aurelien Jarno

From: BALATON Zoltan <balaton@eik.bme.hu>

Follow example of CMD646 and remove via_ide_init function and do it
directly in board code instead.

Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Tested-by: BALATON Zoltan <balaton@eik.bme.hu>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Message-id: 20200313082444.2439-3-mark.cave-ayland@ilande.co.uk
Signed-off-by: John Snow <jsnow@redhat.com>
---
 include/hw/ide.h        | 1 -
 hw/ide/via.c            | 8 --------
 hw/mips/mips_fulong2e.c | 5 ++++-
 3 files changed, 4 insertions(+), 10 deletions(-)

diff --git a/include/hw/ide.h b/include/hw/ide.h
index 0c7080ed92..dea0ecf5be 100644
--- a/include/hw/ide.h
+++ b/include/hw/ide.h
@@ -16,7 +16,6 @@ PCIDevice *pci_piix3_xen_ide_init(PCIBus *bus, DriveInfo **hd_table, int devfn);
 PCIDevice *pci_piix3_ide_init(PCIBus *bus, DriveInfo **hd_table, int devfn);
 PCIDevice *pci_piix4_ide_init(PCIBus *bus, DriveInfo **hd_table, int devfn);
 int pci_piix3_xen_ide_unplug(DeviceState *dev, bool aux);
-void via_ide_init(PCIBus *bus, DriveInfo **hd_table, int devfn);
 
 /* ide-mmio.c */
 void mmio_ide_init_drives(DeviceState *dev, DriveInfo *hd0, DriveInfo *hd1);
diff --git a/hw/ide/via.c b/hw/ide/via.c
index 84f0efff94..3153be8862 100644
--- a/hw/ide/via.c
+++ b/hw/ide/via.c
@@ -211,14 +211,6 @@ static void via_ide_exitfn(PCIDevice *dev)
     }
 }
 
-void via_ide_init(PCIBus *bus, DriveInfo **hd_table, int devfn)
-{
-    PCIDevice *dev;
-
-    dev = pci_create_simple(bus, devfn, "via-ide");
-    pci_ide_create_devs(dev, hd_table);
-}
-
 static void via_ide_class_init(ObjectClass *klass, void *data)
 {
     DeviceClass *dc = DEVICE_CLASS(klass);
diff --git a/hw/mips/mips_fulong2e.c b/hw/mips/mips_fulong2e.c
index 4727b1d3a4..639ba2a091 100644
--- a/hw/mips/mips_fulong2e.c
+++ b/hw/mips/mips_fulong2e.c
@@ -37,6 +37,7 @@
 #include "qemu/log.h"
 #include "hw/loader.h"
 #include "hw/ide.h"
+#include "hw/ide/pci.h"
 #include "elf.h"
 #include "hw/isa/vt82c686.h"
 #include "hw/rtc/mc146818rtc.h"
@@ -239,6 +240,7 @@ static void vt82c686b_southbridge_init(PCIBus *pci_bus, int slot, qemu_irq intc,
     qemu_irq *i8259;
     ISABus *isa_bus;
     DriveInfo *hd[MAX_IDE_BUS * MAX_IDE_DEVS];
+    PCIDevice *dev;
 
     isa_bus = vt82c686b_isa_init(pci_bus, PCI_DEVFN(slot, 0));
     if (!isa_bus) {
@@ -256,8 +258,9 @@ static void vt82c686b_southbridge_init(PCIBus *pci_bus, int slot, qemu_irq intc,
     /* Super I/O */
     isa_create_simple(isa_bus, TYPE_VT82C686B_SUPERIO);
 
+    dev = pci_create_simple(pci_bus, PCI_DEVFN(slot, 1), "via-ide");
     ide_drive_get(hd, ARRAY_SIZE(hd));
-    via_ide_init(pci_bus, hd, PCI_DEVFN(slot, 1));
+    pci_ide_create_devs(dev, hd);
 
     pci_create_simple(pci_bus, PCI_DEVFN(slot, 2), "vt82c686b-usb-uhci");
     pci_create_simple(pci_bus, PCI_DEVFN(slot, 3), "vt82c686b-usb-uhci");
-- 
2.21.1



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

* [PULL 07/20] pci: Honour wmask when resetting PCI_INTERRUPT_LINE
  2020-03-17 23:23 [PULL 00/20] Ide patches John Snow
                   ` (5 preceding siblings ...)
  2020-03-17 23:23 ` [PULL 06/20] ide/via: Get rid of via_ide_init() John Snow
@ 2020-03-17 23:23 ` John Snow
  2020-03-17 23:23 ` [PULL 08/20] via-ide: ensure that PCI_INTERRUPT_LINE is hard-wired to its default value John Snow
                   ` (13 subsequent siblings)
  20 siblings, 0 replies; 24+ messages in thread
From: John Snow @ 2020-03-17 23:23 UTC (permalink / raw)
  To: qemu-devel, Peter Maydell
  Cc: Michael S. Tsirkin, Mark Cave-Ayland, qemu-block, Helge Deller,
	Hervé Poussineau, Aleksandar Rikalo, Richard Henderson,
	Philippe Mathieu-Daudé,
	Artyom Tarasenko, Laurent Vivier, Thomas Huth, Eduardo Habkost,
	John Snow, David Gibson, Kevin Wolf, Max Reitz, qemu-ppc,
	Aleksandar Markovic, Paolo Bonzini, Aurelien Jarno

From: BALATON Zoltan <balaton@eik.bme.hu>

The pci_do_device_reset() function (called from pci_device_reset)
clears the PCI_INTERRUPT_LINE config reg of devices on the bus but did
this without taking wmask into account. We'll have a device model now
that needs to set a constant value for this reg and this patch allows
to do that without additional workaround in device emulation to
reverse the effect of this PCI bus reset function.

Suggested-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Tested-by: BALATON Zoltan <balaton@eik.bme.hu>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Message-id: 20200313082444.2439-4-mark.cave-ayland@ilande.co.uk
Signed-off-by: John Snow <jsnow@redhat.com>
---
 hw/pci/pci.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/hw/pci/pci.c b/hw/pci/pci.c
index e1ed6677e1..b5bc842fac 100644
--- a/hw/pci/pci.c
+++ b/hw/pci/pci.c
@@ -302,8 +302,11 @@ static void pci_do_device_reset(PCIDevice *dev)
     pci_word_test_and_clear_mask(dev->config + PCI_STATUS,
                                  pci_get_word(dev->wmask + PCI_STATUS) |
                                  pci_get_word(dev->w1cmask + PCI_STATUS));
+    /* Some devices make bits of PCI_INTERRUPT_LINE read only */
+    pci_byte_test_and_clear_mask(dev->config + PCI_INTERRUPT_LINE,
+                              pci_get_word(dev->wmask + PCI_INTERRUPT_LINE) |
+                              pci_get_word(dev->w1cmask + PCI_INTERRUPT_LINE));
     dev->config[PCI_CACHE_LINE_SIZE] = 0x0;
-    dev->config[PCI_INTERRUPT_LINE] = 0x0;
     for (r = 0; r < PCI_NUM_REGIONS; ++r) {
         PCIIORegion *region = &dev->io_regions[r];
         if (!region->size) {
-- 
2.21.1



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

* [PULL 08/20] via-ide: ensure that PCI_INTERRUPT_LINE is hard-wired to its default value
  2020-03-17 23:23 [PULL 00/20] Ide patches John Snow
                   ` (6 preceding siblings ...)
  2020-03-17 23:23 ` [PULL 07/20] pci: Honour wmask when resetting PCI_INTERRUPT_LINE John Snow
@ 2020-03-17 23:23 ` John Snow
  2020-03-17 23:23 ` [PULL 09/20] via-ide: initialise IDE controller in legacy mode John Snow
                   ` (12 subsequent siblings)
  20 siblings, 0 replies; 24+ messages in thread
From: John Snow @ 2020-03-17 23:23 UTC (permalink / raw)
  To: qemu-devel, Peter Maydell
  Cc: Michael S. Tsirkin, Mark Cave-Ayland, qemu-block, Helge Deller,
	Hervé Poussineau, Aleksandar Rikalo, Richard Henderson,
	Philippe Mathieu-Daudé,
	Artyom Tarasenko, Laurent Vivier, Thomas Huth, Eduardo Habkost,
	John Snow, David Gibson, Kevin Wolf, Max Reitz, qemu-ppc,
	Aleksandar Markovic, Paolo Bonzini, Aurelien Jarno

From: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>

Some firmwares accidentally write to PCI_INTERRUPT_LINE on startup which has
no effect on real hardware since it is hard-wired to its default value, but
causes the guest OS to become confused trying to initialise IDE devices
when running under QEMU.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Tested-by: BALATON Zoltan <balaton@eik.bme.hu>
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Message-id: 20200313082444.2439-5-mark.cave-ayland@ilande.co.uk
Signed-off-by: John Snow <jsnow@redhat.com>
---
 hw/ide/via.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/ide/via.c b/hw/ide/via.c
index 3153be8862..8363bd4802 100644
--- a/hw/ide/via.c
+++ b/hw/ide/via.c
@@ -169,7 +169,7 @@ static void via_ide_realize(PCIDevice *dev, Error **errp)
 
     pci_config_set_prog_interface(pci_conf, 0x8f); /* native PCI ATA mode */
     pci_set_long(pci_conf + PCI_CAPABILITY_LIST, 0x000000c0);
-    dev->wmask[PCI_INTERRUPT_LINE] = 0xf;
+    dev->wmask[PCI_INTERRUPT_LINE] = 0;
 
     memory_region_init_io(&d->data_bar[0], OBJECT(d), &pci_ide_data_le_ops,
                           &d->bus[0], "via-ide0-data", 8);
-- 
2.21.1



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

* [PULL 09/20] via-ide: initialise IDE controller in legacy mode
  2020-03-17 23:23 [PULL 00/20] Ide patches John Snow
                   ` (7 preceding siblings ...)
  2020-03-17 23:23 ` [PULL 08/20] via-ide: ensure that PCI_INTERRUPT_LINE is hard-wired to its default value John Snow
@ 2020-03-17 23:23 ` John Snow
  2020-03-17 23:23 ` [PULL 10/20] via-ide: allow guests to write to PCI_CLASS_PROG John Snow
                   ` (11 subsequent siblings)
  20 siblings, 0 replies; 24+ messages in thread
From: John Snow @ 2020-03-17 23:23 UTC (permalink / raw)
  To: qemu-devel, Peter Maydell
  Cc: Michael S. Tsirkin, Mark Cave-Ayland, qemu-block, Helge Deller,
	Hervé Poussineau, Aleksandar Rikalo, Richard Henderson,
	Philippe Mathieu-Daudé,
	Artyom Tarasenko, Laurent Vivier, Thomas Huth, Eduardo Habkost,
	John Snow, David Gibson, Kevin Wolf, Max Reitz, qemu-ppc,
	Aleksandar Markovic, Paolo Bonzini, Aurelien Jarno

From: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>

According to both the VT82C686B and VT8231 datasheets the VIA Southbridge IDE
controller is initialised in legacy mode.

This allows Linux to correctly determine that legacy rather than PCI IRQ routing
should be used since the boot console text in the fulong2e test image changes from:

scsi0 : pata_via
scsi1 : pata_via
ata1: PATA max UDMA/100 cmd 0xffffffffbfd04050 ctl 0xffffffffbfd04062 \
  bmdma 0xffffffffbfd04040 irq 14
ata2: PATA max UDMA/100 cmd 0xffffffffbfd04058 ctl 0xffffffffbfd04066 \
  bmdma 0xffffffffbfd04048 irq 14

to:

scsi0 : pata_via
scsi1 : pata_via
ata1: PATA max UDMA/100 cmd 0xffffffffbfd001f0 ctl 0xffffffffbfd003f6 \
  bmdma 0xffffffffbfd04040 irq 14
ata2: PATA max UDMA/100 cmd 0xffffffffbfd00170 ctl 0xffffffffbfd00376 \
  bmdma 0xffffffffbfd04048 irq 15

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Tested-by: BALATON Zoltan <balaton@eik.bme.hu>
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Message-id: 20200313082444.2439-6-mark.cave-ayland@ilande.co.uk
Signed-off-by: John Snow <jsnow@redhat.com>
---
 hw/ide/via.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/ide/via.c b/hw/ide/via.c
index 8363bd4802..c8835de01b 100644
--- a/hw/ide/via.c
+++ b/hw/ide/via.c
@@ -167,7 +167,7 @@ static void via_ide_realize(PCIDevice *dev, Error **errp)
     uint8_t *pci_conf = dev->config;
     int i;
 
-    pci_config_set_prog_interface(pci_conf, 0x8f); /* native PCI ATA mode */
+    pci_config_set_prog_interface(pci_conf, 0x8a); /* legacy mode */
     pci_set_long(pci_conf + PCI_CAPABILITY_LIST, 0x000000c0);
     dev->wmask[PCI_INTERRUPT_LINE] = 0;
 
-- 
2.21.1



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

* [PULL 10/20] via-ide: allow guests to write to PCI_CLASS_PROG
  2020-03-17 23:23 [PULL 00/20] Ide patches John Snow
                   ` (8 preceding siblings ...)
  2020-03-17 23:23 ` [PULL 09/20] via-ide: initialise IDE controller in legacy mode John Snow
@ 2020-03-17 23:23 ` John Snow
  2020-03-17 23:23 ` [PULL 11/20] via-ide: always use legacy IRQ 14/15 routing John Snow
                   ` (10 subsequent siblings)
  20 siblings, 0 replies; 24+ messages in thread
From: John Snow @ 2020-03-17 23:23 UTC (permalink / raw)
  To: qemu-devel, Peter Maydell
  Cc: Michael S. Tsirkin, Mark Cave-Ayland, qemu-block, Helge Deller,
	Hervé Poussineau, Aleksandar Rikalo, Richard Henderson,
	Philippe Mathieu-Daudé,
	Artyom Tarasenko, Laurent Vivier, Thomas Huth, Eduardo Habkost,
	John Snow, David Gibson, Kevin Wolf, Max Reitz, qemu-ppc,
	Aleksandar Markovic, Paolo Bonzini, Aurelien Jarno

From: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>

MorphOS writes to PCI_CLASS_PROG during IDE initialisation to place the
controller in native mode, but thinks the initialisation has failed
because the native mode bits aren't set when reading the register back.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Tested-by: BALATON Zoltan <balaton@eik.bme.hu>
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Message-id: 20200313082444.2439-7-mark.cave-ayland@ilande.co.uk
Signed-off-by: John Snow <jsnow@redhat.com>
---
 hw/ide/via.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hw/ide/via.c b/hw/ide/via.c
index c8835de01b..3c4d474e48 100644
--- a/hw/ide/via.c
+++ b/hw/ide/via.c
@@ -170,6 +170,7 @@ static void via_ide_realize(PCIDevice *dev, Error **errp)
     pci_config_set_prog_interface(pci_conf, 0x8a); /* legacy mode */
     pci_set_long(pci_conf + PCI_CAPABILITY_LIST, 0x000000c0);
     dev->wmask[PCI_INTERRUPT_LINE] = 0;
+    dev->wmask[PCI_CLASS_PROG] = 5;
 
     memory_region_init_io(&d->data_bar[0], OBJECT(d), &pci_ide_data_le_ops,
                           &d->bus[0], "via-ide0-data", 8);
-- 
2.21.1



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

* [PULL 11/20] via-ide: always use legacy IRQ 14/15 routing
  2020-03-17 23:23 [PULL 00/20] Ide patches John Snow
                   ` (9 preceding siblings ...)
  2020-03-17 23:23 ` [PULL 10/20] via-ide: allow guests to write to PCI_CLASS_PROG John Snow
@ 2020-03-17 23:23 ` John Snow
  2020-03-17 23:23 ` [PULL 12/20] hd-geo-test: Clean up use of buf[] in create_qcow2_with_mbr() John Snow
                   ` (9 subsequent siblings)
  20 siblings, 0 replies; 24+ messages in thread
From: John Snow @ 2020-03-17 23:23 UTC (permalink / raw)
  To: qemu-devel, Peter Maydell
  Cc: Michael S. Tsirkin, Mark Cave-Ayland, qemu-block, Helge Deller,
	Hervé Poussineau, Aleksandar Rikalo, Richard Henderson,
	Philippe Mathieu-Daudé,
	Artyom Tarasenko, Laurent Vivier, Thomas Huth, Eduardo Habkost,
	John Snow, David Gibson, Kevin Wolf, Max Reitz, qemu-ppc,
	Aleksandar Markovic, Paolo Bonzini, Aurelien Jarno

From: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>

The existing code uses fixed PCI IRQ routing on IRQ 14 rather than legacy IRQ
14/15 routing as documented in the datasheet.

With the changes in this patchset guest OSs now correctly detect and configure
the VIA controller in legacy IRQ routing mode, allowing the incorrect fixed
PCI IRQ routing to be removed.

Note that this fixed legacy IRQ 14/15 routing is identical to similar behaviour
in the early PIIX IDE controllers.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Tested-by: BALATON Zoltan <balaton@eik.bme.hu>
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Message-id: 20200313082444.2439-8-mark.cave-ayland@ilande.co.uk
Signed-off-by: John Snow <jsnow@redhat.com>
---
 hw/ide/via.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/hw/ide/via.c b/hw/ide/via.c
index 3c4d474e48..8de4945cc1 100644
--- a/hw/ide/via.c
+++ b/hw/ide/via.c
@@ -113,10 +113,7 @@ static void via_ide_set_irq(void *opaque, int n, int level)
     }
 
     level = (d->config[0x70] & 0x80) || (d->config[0x78] & 0x80);
-    n = pci_get_byte(d->config + PCI_INTERRUPT_LINE);
-    if (n) {
-        qemu_set_irq(isa_get_irq(NULL, n), level);
-    }
+    qemu_set_irq(isa_get_irq(NULL, 14 + n), level);
 }
 
 static void via_ide_reset(DeviceState *dev)
-- 
2.21.1



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

* [PULL 12/20] hd-geo-test: Clean up use of buf[] in create_qcow2_with_mbr()
  2020-03-17 23:23 [PULL 00/20] Ide patches John Snow
                   ` (10 preceding siblings ...)
  2020-03-17 23:23 ` [PULL 11/20] via-ide: always use legacy IRQ 14/15 routing John Snow
@ 2020-03-17 23:23 ` John Snow
  2020-03-17 23:23 ` [PULL 13/20] hw/ide: Get rid of piix3_init functions John Snow
                   ` (8 subsequent siblings)
  20 siblings, 0 replies; 24+ messages in thread
From: John Snow @ 2020-03-17 23:23 UTC (permalink / raw)
  To: qemu-devel, Peter Maydell
  Cc: Michael S. Tsirkin, Mark Cave-Ayland, Sam Eiderman, qemu-block,
	Helge Deller, Markus Armbruster, Hervé Poussineau,
	Aleksandar Rikalo, Richard Henderson, Philippe Mathieu-Daudé,
	Artyom Tarasenko, Laurent Vivier, Thomas Huth, Eduardo Habkost,
	John Snow, David Gibson, Kevin Wolf, Max Reitz, qemu-ppc,
	Aleksandar Markovic, Paolo Bonzini, Aurelien Jarno

From: Markus Armbruster <armbru@redhat.com>

valgrind reports write unitialized bytes from buf[].  Clear them.

ASan reports we store to misaligned address in buf[].  Use stl_le_p()
for that.

Cc: Sam Eiderman <shmuel.eiderman@oracle.com>
Cc: John Snow <jsnow@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-id: 20200317092354.31831-1-armbru@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>
---
 tests/qtest/hd-geo-test.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tests/qtest/hd-geo-test.c b/tests/qtest/hd-geo-test.c
index a249800544..48e8e02d6e 100644
--- a/tests/qtest/hd-geo-test.c
+++ b/tests/qtest/hd-geo-test.c
@@ -421,7 +421,7 @@ static char *create_qcow2_with_mbr(MBRpartitions mbr, uint64_t sectors)
     char *raw_path = strdup(template);
     char *qcow2_path = strdup(template);
     char cmd[100 + 2 * PATH_MAX];
-    uint8_t buf[512];
+    uint8_t buf[512] = {};
     int i, ret, fd, offset;
     uint64_t qcow2_size = sectors * 512;
     uint8_t status, parttype, head, sector, cyl;
@@ -457,8 +457,8 @@ static char *create_qcow2_with_mbr(MBRpartitions mbr, uint64_t sectors)
         buf[offset + 0x6] = sector;
         buf[offset + 0x7] = cyl;
 
-        (*(uint32_t *)&buf[offset + 0x8]) = cpu_to_le32(mbr[i].start_sect);
-        (*(uint32_t *)&buf[offset + 0xc]) = cpu_to_le32(mbr[i].nr_sects);
+        stl_le_p(&buf[offset + 0x8], mbr[i].start_sect);
+        stl_le_p(&buf[offset + 0xc], mbr[i].nr_sects);
 
         offset += 0x10;
     }
-- 
2.21.1



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

* [PULL 13/20] hw/ide: Get rid of piix3_init functions
  2020-03-17 23:23 [PULL 00/20] Ide patches John Snow
                   ` (11 preceding siblings ...)
  2020-03-17 23:23 ` [PULL 12/20] hd-geo-test: Clean up use of buf[] in create_qcow2_with_mbr() John Snow
@ 2020-03-17 23:23 ` John Snow
  2020-03-17 23:23 ` [PULL 14/20] hw/isa/piix4.c: Introduce variable to store devfn John Snow
                   ` (7 subsequent siblings)
  20 siblings, 0 replies; 24+ messages in thread
From: John Snow @ 2020-03-17 23:23 UTC (permalink / raw)
  To: qemu-devel, Peter Maydell
  Cc: Michael S. Tsirkin, Mark Cave-Ayland, qemu-block, Helge Deller,
	Markus Armbruster, Hervé Poussineau, Aleksandar Rikalo,
	Richard Henderson, Philippe Mathieu-Daudé,
	Artyom Tarasenko, Laurent Vivier, Thomas Huth, Eduardo Habkost,
	John Snow, David Gibson, Kevin Wolf, Max Reitz, qemu-ppc,
	Aleksandar Markovic, Paolo Bonzini, Aurelien Jarno

From: BALATON Zoltan <balaton@eik.bme.hu>

This removes pci_piix3_ide_init() and pci_piix3_xen_ide_init()
functions similar to clean up done to other ide devices.

Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-id: adddfa21552783020d64e1314318cab6d24362c3.1584457537.git.balaton@eik.bme.hu
Signed-off-by: John Snow <jsnow@redhat.com>
---
 include/hw/ide.h  |  2 --
 hw/i386/pc_piix.c | 10 +++++-----
 hw/ide/pci.c      |  1 +
 hw/ide/piix.c     | 21 +--------------------
 4 files changed, 7 insertions(+), 27 deletions(-)

diff --git a/include/hw/ide.h b/include/hw/ide.h
index dea0ecf5be..883bbaeb9b 100644
--- a/include/hw/ide.h
+++ b/include/hw/ide.h
@@ -12,8 +12,6 @@ ISADevice *isa_ide_init(ISABus *bus, int iobase, int iobase2, int isairq,
                         DriveInfo *hd0, DriveInfo *hd1);
 
 /* ide-pci.c */
-PCIDevice *pci_piix3_xen_ide_init(PCIBus *bus, DriveInfo **hd_table, int devfn);
-PCIDevice *pci_piix3_ide_init(PCIBus *bus, DriveInfo **hd_table, int devfn);
 PCIDevice *pci_piix4_ide_init(PCIBus *bus, DriveInfo **hd_table, int devfn);
 int pci_piix3_xen_ide_unplug(DeviceState *dev, bool aux);
 
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index e2d98243bc..c399398739 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -39,6 +39,7 @@
 #include "hw/usb.h"
 #include "net/net.h"
 #include "hw/ide.h"
+#include "hw/ide/pci.h"
 #include "hw/irq.h"
 #include "sysemu/kvm.h"
 #include "hw/kvm/clock.h"
@@ -242,11 +243,10 @@ static void pc_init1(MachineState *machine,
     ide_drive_get(hd, ARRAY_SIZE(hd));
     if (pcmc->pci_enabled) {
         PCIDevice *dev;
-        if (xen_enabled()) {
-            dev = pci_piix3_xen_ide_init(pci_bus, hd, piix3_devfn + 1);
-        } else {
-            dev = pci_piix3_ide_init(pci_bus, hd, piix3_devfn + 1);
-        }
+
+        dev = pci_create_simple(pci_bus, piix3_devfn + 1,
+                                xen_enabled() ? "piix3-ide-xen" : "piix3-ide");
+        pci_ide_create_devs(dev, hd);
         idebus[0] = qdev_get_child_bus(&dev->qdev, "ide.0");
         idebus[1] = qdev_get_child_bus(&dev->qdev, "ide.1");
         pc_cmos_init(pcms, idebus[0], idebus[1], rtc_state);
diff --git a/hw/ide/pci.c b/hw/ide/pci.c
index 1a6a287e76..4fc76c5225 100644
--- a/hw/ide/pci.c
+++ b/hw/ide/pci.c
@@ -476,6 +476,7 @@ const VMStateDescription vmstate_ide_pci = {
     }
 };
 
+/* hd_table must contain 4 block drivers */
 void pci_ide_create_devs(PCIDevice *dev, DriveInfo **hd_table)
 {
     PCIIDEState *d = PCI_IDE(dev);
diff --git a/hw/ide/piix.c b/hw/ide/piix.c
index bc575b4d70..8bcd6b72c2 100644
--- a/hw/ide/piix.c
+++ b/hw/ide/piix.c
@@ -197,15 +197,6 @@ int pci_piix3_xen_ide_unplug(DeviceState *dev, bool aux)
     return 0;
 }
 
-PCIDevice *pci_piix3_xen_ide_init(PCIBus *bus, DriveInfo **hd_table, int devfn)
-{
-    PCIDevice *dev;
-
-    dev = pci_create_simple(bus, devfn, "piix3-ide-xen");
-    pci_ide_create_devs(dev, hd_table);
-    return dev;
-}
-
 static void pci_piix_ide_exitfn(PCIDevice *dev)
 {
     PCIIDEState *d = PCI_IDE(dev);
@@ -217,17 +208,6 @@ static void pci_piix_ide_exitfn(PCIDevice *dev)
     }
 }
 
-/* hd_table must contain 4 block drivers */
-/* NOTE: for the PIIX3, the IRQs and IOports are hardcoded */
-PCIDevice *pci_piix3_ide_init(PCIBus *bus, DriveInfo **hd_table, int devfn)
-{
-    PCIDevice *dev;
-
-    dev = pci_create_simple(bus, devfn, "piix3-ide");
-    pci_ide_create_devs(dev, hd_table);
-    return dev;
-}
-
 /* hd_table must contain 4 block drivers */
 /* NOTE: for the PIIX4, the IRQs and IOports are hardcoded */
 PCIDevice *pci_piix4_ide_init(PCIBus *bus, DriveInfo **hd_table, int devfn)
@@ -239,6 +219,7 @@ PCIDevice *pci_piix4_ide_init(PCIBus *bus, DriveInfo **hd_table, int devfn)
     return dev;
 }
 
+/* NOTE: for the PIIX3, the IRQs and IOports are hardcoded */
 static void piix3_ide_class_init(ObjectClass *klass, void *data)
 {
     DeviceClass *dc = DEVICE_CLASS(klass);
-- 
2.21.1



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

* [PULL 14/20] hw/isa/piix4.c: Introduce variable to store devfn
  2020-03-17 23:23 [PULL 00/20] Ide patches John Snow
                   ` (12 preceding siblings ...)
  2020-03-17 23:23 ` [PULL 13/20] hw/ide: Get rid of piix3_init functions John Snow
@ 2020-03-17 23:23 ` John Snow
  2020-03-17 23:23 ` [PULL 15/20] hw/ide: Get rid of piix4_init function John Snow
                   ` (6 subsequent siblings)
  20 siblings, 0 replies; 24+ messages in thread
From: John Snow @ 2020-03-17 23:23 UTC (permalink / raw)
  To: qemu-devel, Peter Maydell
  Cc: Michael S. Tsirkin, Mark Cave-Ayland, qemu-block, Helge Deller,
	Hervé Poussineau, Aleksandar Rikalo, Richard Henderson,
	Philippe Mathieu-Daudé,
	Artyom Tarasenko, Laurent Vivier, Thomas Huth, Eduardo Habkost,
	John Snow, David Gibson, Kevin Wolf, Max Reitz, qemu-ppc,
	Aleksandar Markovic, Paolo Bonzini, Aurelien Jarno

From: BALATON Zoltan <balaton@eik.bme.hu>

To avoid any problem with reassigning pci variable store devfn in a
variable instead of acessing it from the PCIDevice.

Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-id: 1020e0bfcfc6e364f967ccb2a9a3778ac174ccbe.1584457537.git.balaton@eik.bme.hu
Signed-off-by: John Snow <jsnow@redhat.com>
---
 hw/isa/piix4.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/hw/isa/piix4.c b/hw/isa/piix4.c
index 7edec5e149..2cbdcd7700 100644
--- a/hw/isa/piix4.c
+++ b/hw/isa/piix4.c
@@ -247,9 +247,10 @@ DeviceState *piix4_create(PCIBus *pci_bus, ISABus **isa_bus,
     DriveInfo **hd;
     PCIDevice *pci;
     DeviceState *dev;
+    int devfn = PCI_DEVFN(10, 0);
 
-    pci = pci_create_simple_multifunction(pci_bus, PCI_DEVFN(10, 0),
-                                          true, TYPE_PIIX4_PCI_DEVICE);
+    pci = pci_create_simple_multifunction(pci_bus, devfn,  true,
+                                          TYPE_PIIX4_PCI_DEVICE);
     dev = DEVICE(pci);
     if (isa_bus) {
         *isa_bus = ISA_BUS(qdev_get_child_bus(dev, "isa.0"));
@@ -257,11 +258,12 @@ DeviceState *piix4_create(PCIBus *pci_bus, ISABus **isa_bus,
 
     hd = g_new(DriveInfo *, ide_drives);
     ide_drive_get(hd, ide_drives);
-    pci_piix4_ide_init(pci_bus, hd, pci->devfn + 1);
+    pci_piix4_ide_init(pci_bus, hd, devfn + 1);
     g_free(hd);
-    pci_create_simple(pci_bus, pci->devfn + 2, "piix4-usb-uhci");
+
+    pci_create_simple(pci_bus, devfn + 2, "piix4-usb-uhci");
     if (smbus) {
-        *smbus = piix4_pm_init(pci_bus, pci->devfn + 3, 0x1100,
+        *smbus = piix4_pm_init(pci_bus, devfn + 3, 0x1100,
                                isa_get_irq(NULL, 9), NULL, 0, NULL);
    }
 
-- 
2.21.1



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

* [PULL 15/20] hw/ide: Get rid of piix4_init function
  2020-03-17 23:23 [PULL 00/20] Ide patches John Snow
                   ` (13 preceding siblings ...)
  2020-03-17 23:23 ` [PULL 14/20] hw/isa/piix4.c: Introduce variable to store devfn John Snow
@ 2020-03-17 23:23 ` John Snow
  2020-03-17 23:23 ` [PULL 16/20] hw/ide: Remove now unneded #include "hw/pci/pci.h" from hw/ide.h John Snow
                   ` (5 subsequent siblings)
  20 siblings, 0 replies; 24+ messages in thread
From: John Snow @ 2020-03-17 23:23 UTC (permalink / raw)
  To: qemu-devel, Peter Maydell
  Cc: Michael S. Tsirkin, Mark Cave-Ayland, qemu-block, Helge Deller,
	Markus Armbruster, Hervé Poussineau, Aleksandar Rikalo,
	Richard Henderson, Philippe Mathieu-Daudé,
	Artyom Tarasenko, Laurent Vivier, Thomas Huth, Eduardo Habkost,
	John Snow, David Gibson, Kevin Wolf, Max Reitz, qemu-ppc,
	Aleksandar Markovic, Paolo Bonzini, Aurelien Jarno

From: BALATON Zoltan <balaton@eik.bme.hu>

This removes pci_piix4_ide_init() function similar to clean up done to
other ide devices.

Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-id: fe46b6536abbae77695f6d1c711a04a3f4b5481d.1584457537.git.balaton@eik.bme.hu
Signed-off-by: John Snow <jsnow@redhat.com>
---
 include/hw/ide.h |  1 -
 hw/ide/piix.c    | 12 +-----------
 hw/isa/piix4.c   |  4 +++-
 3 files changed, 4 insertions(+), 13 deletions(-)

diff --git a/include/hw/ide.h b/include/hw/ide.h
index 883bbaeb9b..21bd8f23f1 100644
--- a/include/hw/ide.h
+++ b/include/hw/ide.h
@@ -12,7 +12,6 @@ ISADevice *isa_ide_init(ISABus *bus, int iobase, int iobase2, int isairq,
                         DriveInfo *hd0, DriveInfo *hd1);
 
 /* ide-pci.c */
-PCIDevice *pci_piix4_ide_init(PCIBus *bus, DriveInfo **hd_table, int devfn);
 int pci_piix3_xen_ide_unplug(DeviceState *dev, bool aux);
 
 /* ide-mmio.c */
diff --git a/hw/ide/piix.c b/hw/ide/piix.c
index 8bcd6b72c2..3b2de4c312 100644
--- a/hw/ide/piix.c
+++ b/hw/ide/piix.c
@@ -208,17 +208,6 @@ static void pci_piix_ide_exitfn(PCIDevice *dev)
     }
 }
 
-/* hd_table must contain 4 block drivers */
-/* NOTE: for the PIIX4, the IRQs and IOports are hardcoded */
-PCIDevice *pci_piix4_ide_init(PCIBus *bus, DriveInfo **hd_table, int devfn)
-{
-    PCIDevice *dev;
-
-    dev = pci_create_simple(bus, devfn, "piix4-ide");
-    pci_ide_create_devs(dev, hd_table);
-    return dev;
-}
-
 /* NOTE: for the PIIX3, the IRQs and IOports are hardcoded */
 static void piix3_ide_class_init(ObjectClass *klass, void *data)
 {
@@ -247,6 +236,7 @@ static const TypeInfo piix3_ide_xen_info = {
     .class_init    = piix3_ide_class_init,
 };
 
+/* NOTE: for the PIIX4, the IRQs and IOports are hardcoded */
 static void piix4_ide_class_init(ObjectClass *klass, void *data)
 {
     DeviceClass *dc = DEVICE_CLASS(klass);
diff --git a/hw/isa/piix4.c b/hw/isa/piix4.c
index 2cbdcd7700..706eb5be69 100644
--- a/hw/isa/piix4.c
+++ b/hw/isa/piix4.c
@@ -35,6 +35,7 @@
 #include "hw/timer/i8254.h"
 #include "hw/rtc/mc146818rtc.h"
 #include "hw/ide.h"
+#include "hw/ide/pci.h"
 #include "migration/vmstate.h"
 #include "sysemu/reset.h"
 #include "sysemu/runstate.h"
@@ -256,9 +257,10 @@ DeviceState *piix4_create(PCIBus *pci_bus, ISABus **isa_bus,
         *isa_bus = ISA_BUS(qdev_get_child_bus(dev, "isa.0"));
     }
 
+    pci = pci_create_simple(pci_bus, devfn + 1, "piix4-ide");
     hd = g_new(DriveInfo *, ide_drives);
     ide_drive_get(hd, ide_drives);
-    pci_piix4_ide_init(pci_bus, hd, devfn + 1);
+    pci_ide_create_devs(pci, hd);
     g_free(hd);
 
     pci_create_simple(pci_bus, devfn + 2, "piix4-usb-uhci");
-- 
2.21.1



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

* [PULL 16/20] hw/ide: Remove now unneded #include "hw/pci/pci.h" from hw/ide.h
  2020-03-17 23:23 [PULL 00/20] Ide patches John Snow
                   ` (14 preceding siblings ...)
  2020-03-17 23:23 ` [PULL 15/20] hw/ide: Get rid of piix4_init function John Snow
@ 2020-03-17 23:23 ` John Snow
  2020-03-17 23:23 ` [PULL 17/20] hw/ide/pci.c: Coding style update to fix checkpatch errors John Snow
                   ` (4 subsequent siblings)
  20 siblings, 0 replies; 24+ messages in thread
From: John Snow @ 2020-03-17 23:23 UTC (permalink / raw)
  To: qemu-devel, Peter Maydell
  Cc: Michael S. Tsirkin, Mark Cave-Ayland, qemu-block, Helge Deller,
	Markus Armbruster, Hervé Poussineau, Aleksandar Rikalo,
	Richard Henderson, Philippe Mathieu-Daudé,
	Artyom Tarasenko, Laurent Vivier, Thomas Huth, Eduardo Habkost,
	John Snow, David Gibson, Kevin Wolf, Max Reitz, qemu-ppc,
	Aleksandar Markovic, Paolo Bonzini, Aurelien Jarno

From: BALATON Zoltan <balaton@eik.bme.hu>

After previous patches we don't need hw/pci/pci.h any more in
hw/ide.h. Some files depended on implicit inclusion by this header
which are also fixed up here.

Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-id: 444a5e34331bf1f7880541b8d46e0353f470f5a6.1584457537.git.balaton@eik.bme.hu
Signed-off-by: John Snow <jsnow@redhat.com>
---
 hw/ide/ahci_internal.h        | 1 +
 include/hw/ide.h              | 1 -
 include/hw/ide/pci.h          | 1 +
 include/hw/misc/macio/macio.h | 1 +
 4 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/hw/ide/ahci_internal.h b/hw/ide/ahci_internal.h
index 73424516da..bab0459774 100644
--- a/hw/ide/ahci_internal.h
+++ b/hw/ide/ahci_internal.h
@@ -27,6 +27,7 @@
 #include "hw/ide/ahci.h"
 #include "hw/ide/internal.h"
 #include "hw/sysbus.h"
+#include "hw/pci/pci.h"
 
 #define AHCI_MEM_BAR_SIZE         0x1000
 #define AHCI_MAX_PORTS            32
diff --git a/include/hw/ide.h b/include/hw/ide.h
index 21bd8f23f1..d52c211f32 100644
--- a/include/hw/ide.h
+++ b/include/hw/ide.h
@@ -2,7 +2,6 @@
 #define HW_IDE_H
 
 #include "hw/isa/isa.h"
-#include "hw/pci/pci.h"
 #include "exec/memory.h"
 
 #define MAX_IDE_DEVS	2
diff --git a/include/hw/ide/pci.h b/include/hw/ide/pci.h
index a9f2c33e68..98ffa7dfcd 100644
--- a/include/hw/ide/pci.h
+++ b/include/hw/ide/pci.h
@@ -2,6 +2,7 @@
 #define HW_IDE_PCI_H
 
 #include "hw/ide/internal.h"
+#include "hw/pci/pci.h"
 
 #define BM_STATUS_DMAING 0x01
 #define BM_STATUS_ERROR  0x02
diff --git a/include/hw/misc/macio/macio.h b/include/hw/misc/macio/macio.h
index 070a694eb5..87335a991c 100644
--- a/include/hw/misc/macio/macio.h
+++ b/include/hw/misc/macio/macio.h
@@ -27,6 +27,7 @@
 #define MACIO_H
 
 #include "hw/char/escc.h"
+#include "hw/pci/pci.h"
 #include "hw/ide/internal.h"
 #include "hw/intc/heathrow_pic.h"
 #include "hw/misc/macio/cuda.h"
-- 
2.21.1



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

* [PULL 17/20] hw/ide/pci.c: Coding style update to fix checkpatch errors
  2020-03-17 23:23 [PULL 00/20] Ide patches John Snow
                   ` (15 preceding siblings ...)
  2020-03-17 23:23 ` [PULL 16/20] hw/ide: Remove now unneded #include "hw/pci/pci.h" from hw/ide.h John Snow
@ 2020-03-17 23:23 ` John Snow
  2020-03-17 23:23 ` [PULL 18/20] hw/ide: Do ide_drive_get() within pci_ide_create_devs() John Snow
                   ` (3 subsequent siblings)
  20 siblings, 0 replies; 24+ messages in thread
From: John Snow @ 2020-03-17 23:23 UTC (permalink / raw)
  To: qemu-devel, Peter Maydell
  Cc: Michael S. Tsirkin, Mark Cave-Ayland, qemu-block, Helge Deller,
	Markus Armbruster, Hervé Poussineau, Aleksandar Rikalo,
	Richard Henderson, Philippe Mathieu-Daudé,
	Artyom Tarasenko, Laurent Vivier, Thomas Huth, Eduardo Habkost,
	John Snow, David Gibson, Kevin Wolf, Max Reitz, qemu-ppc,
	Aleksandar Markovic, Paolo Bonzini, Aurelien Jarno

From: BALATON Zoltan <balaton@eik.bme.hu>

Spaces are required around a + operator and if statements should have
braces even for single line. Also make it simpler by reversing the
condition instead of breaking the loop.

Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-id: 0d50336ab26a56240c8c17ca1ec6135a4092fcc9.1584457537.git.balaton@eik.bme.hu
Signed-off-by: John Snow <jsnow@redhat.com>
---
 hw/ide/pci.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/hw/ide/pci.c b/hw/ide/pci.c
index 4fc76c5225..e0c84392e2 100644
--- a/hw/ide/pci.c
+++ b/hw/ide/pci.c
@@ -485,9 +485,9 @@ void pci_ide_create_devs(PCIDevice *dev, DriveInfo **hd_table)
     int i;
 
     for (i = 0; i < 4; i++) {
-        if (hd_table[i] == NULL)
-            continue;
-        ide_create_drive(d->bus+bus[i], unit[i], hd_table[i]);
+        if (hd_table[i]) {
+            ide_create_drive(d->bus + bus[i], unit[i], hd_table[i]);
+        }
     }
 }
 
-- 
2.21.1



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

* [PULL 18/20] hw/ide: Do ide_drive_get() within pci_ide_create_devs()
  2020-03-17 23:23 [PULL 00/20] Ide patches John Snow
                   ` (16 preceding siblings ...)
  2020-03-17 23:23 ` [PULL 17/20] hw/ide/pci.c: Coding style update to fix checkpatch errors John Snow
@ 2020-03-17 23:23 ` John Snow
  2020-03-17 23:23 ` [PULL 19/20] hw/ide: Move MAX_IDE_DEVS define to hw/ide/internal.h John Snow
                   ` (2 subsequent siblings)
  20 siblings, 0 replies; 24+ messages in thread
From: John Snow @ 2020-03-17 23:23 UTC (permalink / raw)
  To: qemu-devel, Peter Maydell
  Cc: Michael S. Tsirkin, Mark Cave-Ayland, qemu-block, Helge Deller,
	Markus Armbruster, Hervé Poussineau, Aleksandar Rikalo,
	Richard Henderson, Philippe Mathieu-Daudé,
	Artyom Tarasenko, Laurent Vivier, Thomas Huth, Eduardo Habkost,
	John Snow, David Gibson, Kevin Wolf, Max Reitz, qemu-ppc,
	Aleksandar Markovic, Paolo Bonzini, Aurelien Jarno

From: BALATON Zoltan <balaton@eik.bme.hu>

The pci_ide_create_devs() function takes a hd_table parameter but all
callers just pass what ide_drive_get() returns so we can do it locally
simplifying callers and removing hd_table parameter.

Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-id: e9713fdded4d212fa68ed03b844e531934226a6f.1584457537.git.balaton@eik.bme.hu
Signed-off-by: John Snow <jsnow@redhat.com>
---
 include/hw/ide/pci.h          |  2 +-
 include/hw/southbridge/piix.h |  3 +--
 hw/alpha/dp264.c              | 13 +++----------
 hw/i386/pc_piix.c             |  9 +++++----
 hw/ide/pci.c                  |  4 +++-
 hw/isa/piix4.c                | 10 ++--------
 hw/mips/mips_fulong2e.c       |  4 +---
 hw/mips/mips_malta.c          |  2 +-
 hw/sparc64/sun4u.c            |  6 +-----
 9 files changed, 18 insertions(+), 35 deletions(-)

diff --git a/include/hw/ide/pci.h b/include/hw/ide/pci.h
index 98ffa7dfcd..dd504e5a0b 100644
--- a/include/hw/ide/pci.h
+++ b/include/hw/ide/pci.h
@@ -63,7 +63,7 @@ static inline IDEState *bmdma_active_if(BMDMAState *bmdma)
 void bmdma_init(IDEBus *bus, BMDMAState *bm, PCIIDEState *d);
 void bmdma_cmd_writeb(BMDMAState *bm, uint32_t val);
 extern MemoryRegionOps bmdma_addr_ioport_ops;
-void pci_ide_create_devs(PCIDevice *dev, DriveInfo **hd_table);
+void pci_ide_create_devs(PCIDevice *dev);
 
 extern const VMStateDescription vmstate_ide_pci;
 extern const MemoryRegionOps pci_ide_cmd_le_ops;
diff --git a/include/hw/southbridge/piix.h b/include/hw/southbridge/piix.h
index 152628c6d9..02bd741209 100644
--- a/include/hw/southbridge/piix.h
+++ b/include/hw/southbridge/piix.h
@@ -68,7 +68,6 @@ extern PCIDevice *piix4_dev;
 
 PIIX3State *piix3_create(PCIBus *pci_bus, ISABus **isa_bus);
 
-DeviceState *piix4_create(PCIBus *pci_bus, ISABus **isa_bus,
-                          I2CBus **smbus, size_t ide_buses);
+DeviceState *piix4_create(PCIBus *pci_bus, ISABus **isa_bus, I2CBus **smbus);
 
 #endif
diff --git a/hw/alpha/dp264.c b/hw/alpha/dp264.c
index 27595767e5..f7751b18f6 100644
--- a/hw/alpha/dp264.c
+++ b/hw/alpha/dp264.c
@@ -15,7 +15,6 @@
 #include "qemu/error-report.h"
 #include "sysemu/sysemu.h"
 #include "hw/rtc/mc146818rtc.h"
-#include "hw/ide.h"
 #include "hw/ide/pci.h"
 #include "hw/timer/i8254.h"
 #include "hw/isa/superio.h"
@@ -58,6 +57,7 @@ static void clipper_init(MachineState *machine)
     const char *initrd_filename = machine->initrd_filename;
     AlphaCPU *cpus[4];
     PCIBus *pci_bus;
+    PCIDevice *pci_dev;
     ISABus *isa_bus;
     qemu_irq rtc_irq;
     long size, i;
@@ -100,15 +100,8 @@ static void clipper_init(MachineState *machine)
     isa_create_simple(isa_bus, TYPE_SMC37C669_SUPERIO);
 
     /* IDE disk setup.  */
-    {
-        DriveInfo *hd[MAX_IDE_BUS * MAX_IDE_DEVS];
-        PCIDevice *pci_dev;
-
-        ide_drive_get(hd, ARRAY_SIZE(hd));
-
-        pci_dev = pci_create_simple(pci_bus, -1, "cmd646-ide");
-        pci_ide_create_devs(pci_dev, hd);
-    }
+    pci_dev = pci_create_simple(pci_bus, -1, "cmd646-ide");
+    pci_ide_create_devs(pci_dev);
 
     /* Load PALcode.  Given that this is not "real" cpu palcode,
        but one explicitly written for the emulation, we might as
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index c399398739..9216596ec6 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -86,7 +86,6 @@ static void pc_init1(MachineState *machine,
     int piix3_devfn = -1;
     qemu_irq smi_irq;
     GSIState *gsi_state;
-    DriveInfo *hd[MAX_IDE_BUS * MAX_IDE_DEVS];
     BusState *idebus[MAX_IDE_BUS];
     ISADevice *rtc_state;
     MemoryRegion *ram_memory;
@@ -240,20 +239,22 @@ static void pc_init1(MachineState *machine,
 
     pc_nic_init(pcmc, isa_bus, pci_bus);
 
-    ide_drive_get(hd, ARRAY_SIZE(hd));
     if (pcmc->pci_enabled) {
         PCIDevice *dev;
 
         dev = pci_create_simple(pci_bus, piix3_devfn + 1,
                                 xen_enabled() ? "piix3-ide-xen" : "piix3-ide");
-        pci_ide_create_devs(dev, hd);
+        pci_ide_create_devs(dev);
         idebus[0] = qdev_get_child_bus(&dev->qdev, "ide.0");
         idebus[1] = qdev_get_child_bus(&dev->qdev, "ide.1");
         pc_cmos_init(pcms, idebus[0], idebus[1], rtc_state);
     }
 #ifdef CONFIG_IDE_ISA
-else {
+    else {
+        DriveInfo *hd[MAX_IDE_BUS * MAX_IDE_DEVS];
         int i;
+
+        ide_drive_get(hd, ARRAY_SIZE(hd));
         for (i = 0; i < MAX_IDE_BUS; i++) {
             ISADevice *dev;
             char busname[] = "ide.0";
diff --git a/hw/ide/pci.c b/hw/ide/pci.c
index e0c84392e2..97347f07f1 100644
--- a/hw/ide/pci.c
+++ b/hw/ide/pci.c
@@ -477,13 +477,15 @@ const VMStateDescription vmstate_ide_pci = {
 };
 
 /* hd_table must contain 4 block drivers */
-void pci_ide_create_devs(PCIDevice *dev, DriveInfo **hd_table)
+void pci_ide_create_devs(PCIDevice *dev)
 {
     PCIIDEState *d = PCI_IDE(dev);
+    DriveInfo *hd_table[2 * MAX_IDE_DEVS];
     static const int bus[4]  = { 0, 0, 1, 1 };
     static const int unit[4] = { 0, 1, 0, 1 };
     int i;
 
+    ide_drive_get(hd_table, ARRAY_SIZE(hd_table));
     for (i = 0; i < 4; i++) {
         if (hd_table[i]) {
             ide_create_drive(d->bus + bus[i], unit[i], hd_table[i]);
diff --git a/hw/isa/piix4.c b/hw/isa/piix4.c
index 706eb5be69..cc3e5cef8c 100644
--- a/hw/isa/piix4.c
+++ b/hw/isa/piix4.c
@@ -241,11 +241,8 @@ static void piix4_register_types(void)
 
 type_init(piix4_register_types)
 
-DeviceState *piix4_create(PCIBus *pci_bus, ISABus **isa_bus,
-                          I2CBus **smbus, size_t ide_buses)
+DeviceState *piix4_create(PCIBus *pci_bus, ISABus **isa_bus, I2CBus **smbus)
 {
-    size_t ide_drives = ide_buses * MAX_IDE_DEVS;
-    DriveInfo **hd;
     PCIDevice *pci;
     DeviceState *dev;
     int devfn = PCI_DEVFN(10, 0);
@@ -258,10 +255,7 @@ DeviceState *piix4_create(PCIBus *pci_bus, ISABus **isa_bus,
     }
 
     pci = pci_create_simple(pci_bus, devfn + 1, "piix4-ide");
-    hd = g_new(DriveInfo *, ide_drives);
-    ide_drive_get(hd, ide_drives);
-    pci_ide_create_devs(pci, hd);
-    g_free(hd);
+    pci_ide_create_devs(pci);
 
     pci_create_simple(pci_bus, devfn + 2, "piix4-usb-uhci");
     if (smbus) {
diff --git a/hw/mips/mips_fulong2e.c b/hw/mips/mips_fulong2e.c
index 639ba2a091..0f312b5a35 100644
--- a/hw/mips/mips_fulong2e.c
+++ b/hw/mips/mips_fulong2e.c
@@ -239,7 +239,6 @@ static void vt82c686b_southbridge_init(PCIBus *pci_bus, int slot, qemu_irq intc,
 {
     qemu_irq *i8259;
     ISABus *isa_bus;
-    DriveInfo *hd[MAX_IDE_BUS * MAX_IDE_DEVS];
     PCIDevice *dev;
 
     isa_bus = vt82c686b_isa_init(pci_bus, PCI_DEVFN(slot, 0));
@@ -259,8 +258,7 @@ static void vt82c686b_southbridge_init(PCIBus *pci_bus, int slot, qemu_irq intc,
     isa_create_simple(isa_bus, TYPE_VT82C686B_SUPERIO);
 
     dev = pci_create_simple(pci_bus, PCI_DEVFN(slot, 1), "via-ide");
-    ide_drive_get(hd, ARRAY_SIZE(hd));
-    pci_ide_create_devs(dev, hd);
+    pci_ide_create_devs(dev);
 
     pci_create_simple(pci_bus, PCI_DEVFN(slot, 2), "vt82c686b-usb-uhci");
     pci_create_simple(pci_bus, PCI_DEVFN(slot, 3), "vt82c686b-usb-uhci");
diff --git a/hw/mips/mips_malta.c b/hw/mips/mips_malta.c
index d380f73d7b..e4c4de1b4e 100644
--- a/hw/mips/mips_malta.c
+++ b/hw/mips/mips_malta.c
@@ -1403,7 +1403,7 @@ void mips_malta_init(MachineState *machine)
     pci_bus = gt64120_register(s->i8259);
 
     /* Southbridge */
-    dev = piix4_create(pci_bus, &isa_bus, &smbus, MAX_IDE_BUS);
+    dev = piix4_create(pci_bus, &isa_bus, &smbus);
 
     /* Interrupt controller */
     qdev_connect_gpio_out_named(dev, "intr", 0, i8259_irq);
diff --git a/hw/sparc64/sun4u.c b/hw/sparc64/sun4u.c
index d33e84f831..6abfcb30f8 100644
--- a/hw/sparc64/sun4u.c
+++ b/hw/sparc64/sun4u.c
@@ -50,7 +50,6 @@
 #include "hw/sparc/sparc64.h"
 #include "hw/nvram/fw_cfg.h"
 #include "hw/sysbus.h"
-#include "hw/ide.h"
 #include "hw/ide/pci.h"
 #include "hw/loader.h"
 #include "hw/fw-path-provider.h"
@@ -563,7 +562,6 @@ static void sun4uv_init(MemoryRegion *address_space_mem,
     PCIBus *pci_bus, *pci_busA, *pci_busB;
     PCIDevice *ebus, *pci_dev;
     SysBusDevice *s;
-    DriveInfo *hd[MAX_IDE_BUS * MAX_IDE_DEVS];
     DeviceState *iommu, *dev;
     FWCfgState *fw_cfg;
     NICInfo *nd;
@@ -663,12 +661,10 @@ static void sun4uv_init(MemoryRegion *address_space_mem,
         qemu_macaddr_default_if_unset(&macaddr);
     }
 
-    ide_drive_get(hd, ARRAY_SIZE(hd));
-
     pci_dev = pci_create(pci_busA, PCI_DEVFN(3, 0), "cmd646-ide");
     qdev_prop_set_uint32(&pci_dev->qdev, "secondary", 1);
     qdev_init_nofail(&pci_dev->qdev);
-    pci_ide_create_devs(pci_dev, hd);
+    pci_ide_create_devs(pci_dev);
 
     /* Map NVRAM into I/O (ebus) space */
     nvram = m48t59_init(NULL, 0, 0, NVRAM_SIZE, 1968, 59);
-- 
2.21.1



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

* [PULL 19/20] hw/ide: Move MAX_IDE_DEVS define to hw/ide/internal.h
  2020-03-17 23:23 [PULL 00/20] Ide patches John Snow
                   ` (17 preceding siblings ...)
  2020-03-17 23:23 ` [PULL 18/20] hw/ide: Do ide_drive_get() within pci_ide_create_devs() John Snow
@ 2020-03-17 23:23 ` John Snow
  2020-03-17 23:23 ` [PULL 20/20] hw/ide: Remove unneeded inclusion of hw/ide.h John Snow
  2020-03-19 12:33 ` [PULL 00/20] Ide patches Peter Maydell
  20 siblings, 0 replies; 24+ messages in thread
From: John Snow @ 2020-03-17 23:23 UTC (permalink / raw)
  To: qemu-devel, Peter Maydell
  Cc: Michael S. Tsirkin, Mark Cave-Ayland, qemu-block, Helge Deller,
	Markus Armbruster, Hervé Poussineau, Aleksandar Rikalo,
	Richard Henderson, Philippe Mathieu-Daudé,
	Artyom Tarasenko, Laurent Vivier, Thomas Huth, Eduardo Habkost,
	John Snow, David Gibson, Kevin Wolf, Max Reitz, qemu-ppc,
	Aleksandar Markovic, Paolo Bonzini, Aurelien Jarno

From: BALATON Zoltan <balaton@eik.bme.hu>

We can move this define now that less files use it to internal.h to
further reduce dependency on hw/ide.h.

Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-id: e68675d2f6252f229cf788b7cd163bb76fa3e26b.1584457537.git.balaton@eik.bme.hu
Signed-off-by: John Snow <jsnow@redhat.com>
---
 include/hw/ide.h          | 2 --
 include/hw/ide/internal.h | 2 ++
 hw/mips/mips_r4k.c        | 1 +
 3 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/include/hw/ide.h b/include/hw/ide.h
index d52c211f32..c5ce5da4f4 100644
--- a/include/hw/ide.h
+++ b/include/hw/ide.h
@@ -4,8 +4,6 @@
 #include "hw/isa/isa.h"
 #include "exec/memory.h"
 
-#define MAX_IDE_DEVS	2
-
 /* ide-isa.c */
 ISADevice *isa_ide_init(ISABus *bus, int iobase, int iobase2, int isairq,
                         DriveInfo *hd0, DriveInfo *hd1);
diff --git a/include/hw/ide/internal.h b/include/hw/ide/internal.h
index 1bc1fc73e5..55da35d768 100644
--- a/include/hw/ide/internal.h
+++ b/include/hw/ide/internal.h
@@ -27,6 +27,8 @@ typedef struct IDEDMAOps IDEDMAOps;
 #define TYPE_IDE_BUS "IDE"
 #define IDE_BUS(obj) OBJECT_CHECK(IDEBus, (obj), TYPE_IDE_BUS)
 
+#define MAX_IDE_DEVS 2
+
 /* Bits of HD_STATUS */
 #define ERR_STAT		0x01
 #define INDEX_STAT		0x02
diff --git a/hw/mips/mips_r4k.c b/hw/mips/mips_r4k.c
index ad8b75e286..3487013a4a 100644
--- a/hw/mips/mips_r4k.c
+++ b/hw/mips/mips_r4k.c
@@ -26,6 +26,7 @@
 #include "qemu/log.h"
 #include "hw/mips/bios.h"
 #include "hw/ide.h"
+#include "hw/ide/internal.h"
 #include "hw/loader.h"
 #include "elf.h"
 #include "hw/rtc/mc146818rtc.h"
-- 
2.21.1



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

* [PULL 20/20] hw/ide: Remove unneeded inclusion of hw/ide.h
  2020-03-17 23:23 [PULL 00/20] Ide patches John Snow
                   ` (18 preceding siblings ...)
  2020-03-17 23:23 ` [PULL 19/20] hw/ide: Move MAX_IDE_DEVS define to hw/ide/internal.h John Snow
@ 2020-03-17 23:23 ` John Snow
  2020-03-19 12:33 ` [PULL 00/20] Ide patches Peter Maydell
  20 siblings, 0 replies; 24+ messages in thread
From: John Snow @ 2020-03-17 23:23 UTC (permalink / raw)
  To: qemu-devel, Peter Maydell
  Cc: Michael S. Tsirkin, Mark Cave-Ayland, qemu-block, Helge Deller,
	Markus Armbruster, Hervé Poussineau, Aleksandar Rikalo,
	Richard Henderson, Philippe Mathieu-Daudé,
	Artyom Tarasenko, Laurent Vivier, Thomas Huth, Eduardo Habkost,
	John Snow, David Gibson, Kevin Wolf, Max Reitz, qemu-ppc,
	Aleksandar Markovic, Paolo Bonzini, Aurelien Jarno

From: BALATON Zoltan <balaton@eik.bme.hu>

After previous clean ups we can drop direct inclusion of hw/ide.h from
several places.

Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-id: a3f72b663e537701c63cec5fc9cb8ed4f4249f28.1584457537.git.balaton@eik.bme.hu
Signed-off-by: John Snow <jsnow@redhat.com>
---
 hw/hppa/hppa_sys.h      | 1 -
 hw/hppa/machine.c       | 1 -
 hw/i386/pc_piix.c       | 1 -
 hw/isa/piix4.c          | 1 -
 hw/mips/mips_fulong2e.c | 1 -
 hw/ppc/mac_newworld.c   | 1 -
 hw/ppc/mac_oldworld.c   | 1 -
 hw/ppc/prep.c           | 1 -
 8 files changed, 8 deletions(-)

diff --git a/hw/hppa/hppa_sys.h b/hw/hppa/hppa_sys.h
index 4d08501464..0b18271cc9 100644
--- a/hw/hppa/hppa_sys.h
+++ b/hw/hppa/hppa_sys.h
@@ -5,7 +5,6 @@
 
 #include "hw/pci/pci.h"
 #include "hw/pci/pci_host.h"
-#include "hw/ide.h"
 #include "hw/boards.h"
 #include "hw/intc/i8259.h"
 
diff --git a/hw/hppa/machine.c b/hw/hppa/machine.c
index 9175f4b790..00dd9f58d6 100644
--- a/hw/hppa/machine.c
+++ b/hw/hppa/machine.c
@@ -13,7 +13,6 @@
 #include "sysemu/reset.h"
 #include "sysemu/sysemu.h"
 #include "hw/rtc/mc146818rtc.h"
-#include "hw/ide.h"
 #include "hw/timer/i8254.h"
 #include "hw/char/serial.h"
 #include "hw/net/lasi_82596.h"
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index 9216596ec6..e6756216f9 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -38,7 +38,6 @@
 #include "hw/pci/pci_ids.h"
 #include "hw/usb.h"
 #include "net/net.h"
-#include "hw/ide.h"
 #include "hw/ide/pci.h"
 #include "hw/irq.h"
 #include "sysemu/kvm.h"
diff --git a/hw/isa/piix4.c b/hw/isa/piix4.c
index cc3e5cef8c..9a10fb9b3c 100644
--- a/hw/isa/piix4.c
+++ b/hw/isa/piix4.c
@@ -34,7 +34,6 @@
 #include "hw/dma/i8257.h"
 #include "hw/timer/i8254.h"
 #include "hw/rtc/mc146818rtc.h"
-#include "hw/ide.h"
 #include "hw/ide/pci.h"
 #include "migration/vmstate.h"
 #include "sysemu/reset.h"
diff --git a/hw/mips/mips_fulong2e.c b/hw/mips/mips_fulong2e.c
index 0f312b5a35..5040afd581 100644
--- a/hw/mips/mips_fulong2e.c
+++ b/hw/mips/mips_fulong2e.c
@@ -36,7 +36,6 @@
 #include "audio/audio.h"
 #include "qemu/log.h"
 #include "hw/loader.h"
-#include "hw/ide.h"
 #include "hw/ide/pci.h"
 #include "elf.h"
 #include "hw/isa/vt82c686.h"
diff --git a/hw/ppc/mac_newworld.c b/hw/ppc/mac_newworld.c
index b8189bf7a4..13164ee9d7 100644
--- a/hw/ppc/mac_newworld.c
+++ b/hw/ppc/mac_newworld.c
@@ -62,7 +62,6 @@
 #include "hw/char/escc.h"
 #include "hw/misc/macio/macio.h"
 #include "hw/ppc/openpic.h"
-#include "hw/ide.h"
 #include "hw/loader.h"
 #include "hw/fw-path-provider.h"
 #include "elf.h"
diff --git a/hw/ppc/mac_oldworld.c b/hw/ppc/mac_oldworld.c
index 440c406eb4..2d419d82fa 100644
--- a/hw/ppc/mac_oldworld.c
+++ b/hw/ppc/mac_oldworld.c
@@ -41,7 +41,6 @@
 #include "hw/nvram/fw_cfg.h"
 #include "hw/char/escc.h"
 #include "hw/misc/macio/macio.h"
-#include "hw/ide.h"
 #include "hw/loader.h"
 #include "hw/fw-path-provider.h"
 #include "elf.h"
diff --git a/hw/ppc/prep.c b/hw/ppc/prep.c
index 111cc80867..44be9d25a2 100644
--- a/hw/ppc/prep.c
+++ b/hw/ppc/prep.c
@@ -37,7 +37,6 @@
 #include "hw/boards.h"
 #include "qemu/error-report.h"
 #include "qemu/log.h"
-#include "hw/ide.h"
 #include "hw/irq.h"
 #include "hw/loader.h"
 #include "hw/rtc/mc146818rtc.h"
-- 
2.21.1



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

* Re: [PULL 00/20] Ide patches
  2020-03-17 23:23 [PULL 00/20] Ide patches John Snow
                   ` (19 preceding siblings ...)
  2020-03-17 23:23 ` [PULL 20/20] hw/ide: Remove unneeded inclusion of hw/ide.h John Snow
@ 2020-03-19 12:33 ` Peter Maydell
  2020-03-19 18:02   ` John Snow
  20 siblings, 1 reply; 24+ messages in thread
From: Peter Maydell @ 2020-03-19 12:33 UTC (permalink / raw)
  To: John Snow
  Cc: Laurent Vivier, Kevin Wolf, Thomas Huth, Eduardo Habkost,
	Qemu-block, Michael S. Tsirkin, Helge Deller, Mark Cave-Ayland,
	QEMU Developers, Max Reitz, Hervé Poussineau,
	Artyom Tarasenko, Aleksandar Markovic, Paolo Bonzini, qemu-ppc,
	Aleksandar Rikalo, David Gibson, Philippe Mathieu-Daudé,
	Aurelien Jarno, Richard Henderson

On Tue, 17 Mar 2020 at 23:23, John Snow <jsnow@redhat.com> wrote:
>
> The following changes since commit 373c7068dd610e97f0b551b5a6d0a27cd6da4506:
>
>   qemu.nsi: Install Sphinx documentation (2020-03-09 16:45:00 +0000)
>
> are available in the Git repository at:
>
>   https://github.com/jnsnow/qemu.git tags/ide-pull-request
>
> for you to fetch changes up to 7d0776ca7f853d466b6174d96daa5c8afc43d1a4:
>
>   hw/ide: Remove unneeded inclusion of hw/ide.h (2020-03-17 12:22:36 -0400)
>
> ----------------------------------------------------------------
> Pull request
>
> ----------------------------------------------------------------
>


Applied, thanks.

Please update the changelog at https://wiki.qemu.org/ChangeLog/5.0
for any user-visible changes.

-- PMM


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

* Re: [PULL 00/20] Ide patches
  2020-03-19 12:33 ` [PULL 00/20] Ide patches Peter Maydell
@ 2020-03-19 18:02   ` John Snow
  2020-03-23 22:27     ` Mark Cave-Ayland
  0 siblings, 1 reply; 24+ messages in thread
From: John Snow @ 2020-03-19 18:02 UTC (permalink / raw)
  To: Mark Cave-Ayland; +Cc: QEMU Developers, Qemu-block



On 3/19/20 8:33 AM, Peter Maydell wrote:
> On Tue, 17 Mar 2020 at 23:23, John Snow <jsnow@redhat.com> wrote:
>>
>> The following changes since commit 373c7068dd610e97f0b551b5a6d0a27cd6da4506:
>>
>>   qemu.nsi: Install Sphinx documentation (2020-03-09 16:45:00 +0000)
>>
>> are available in the Git repository at:
>>
>>   https://github.com/jnsnow/qemu.git tags/ide-pull-request
>>
>> for you to fetch changes up to 7d0776ca7f853d466b6174d96daa5c8afc43d1a4:
>>
>>   hw/ide: Remove unneeded inclusion of hw/ide.h (2020-03-17 12:22:36 -0400)
>>
>> ----------------------------------------------------------------
>> Pull request
>>
>> ----------------------------------------------------------------
>>
> 
> 
> Applied, thanks.
> 
> Please update the changelog at https://wiki.qemu.org/ChangeLog/5.0
> for any user-visible changes.
> 
> -- PMM
> 

Mark, I'm sorry to foist this on you, but would you mind updating the
changelog?

--js



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

* Re: [PULL 00/20] Ide patches
  2020-03-19 18:02   ` John Snow
@ 2020-03-23 22:27     ` Mark Cave-Ayland
  0 siblings, 0 replies; 24+ messages in thread
From: Mark Cave-Ayland @ 2020-03-23 22:27 UTC (permalink / raw)
  To: John Snow; +Cc: QEMU Developers, Qemu-block

On 19/03/2020 18:02, John Snow wrote:

> On 3/19/20 8:33 AM, Peter Maydell wrote:
>> On Tue, 17 Mar 2020 at 23:23, John Snow <jsnow@redhat.com> wrote:
>>>
>>> The following changes since commit 373c7068dd610e97f0b551b5a6d0a27cd6da4506:
>>>
>>>   qemu.nsi: Install Sphinx documentation (2020-03-09 16:45:00 +0000)
>>>
>>> are available in the Git repository at:
>>>
>>>   https://github.com/jnsnow/qemu.git tags/ide-pull-request
>>>
>>> for you to fetch changes up to 7d0776ca7f853d466b6174d96daa5c8afc43d1a4:
>>>
>>>   hw/ide: Remove unneeded inclusion of hw/ide.h (2020-03-17 12:22:36 -0400)
>>>
>>> ----------------------------------------------------------------
>>> Pull request
>>>
>>> ----------------------------------------------------------------
>>>
>>
>>
>> Applied, thanks.
>>
>> Please update the changelog at https://wiki.qemu.org/ChangeLog/5.0
>> for any user-visible changes.
>>
>> -- PMM
>>
> 
> Mark, I'm sorry to foist this on you, but would you mind updating the
> changelog?
> 
> --js

Done. I've added them under https://wiki.qemu.org/ChangeLog/5.0#Block_devices since
there doesn't seem to be a dedicated IDE section.


ATB,

Mark.


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

end of thread, other threads:[~2020-03-23 22:28 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-17 23:23 [PULL 00/20] Ide patches John Snow
2020-03-17 23:23 ` [PULL 01/20] cmd646: register cmd646_reset() function in DeviceClass John Snow
2020-03-17 23:23 ` [PULL 02/20] cmd646: register vmstate_ide_pci VMStateDescription " John Snow
2020-03-17 23:23 ` [PULL 03/20] dp264: use pci_create_simple() to initialise the cmd646 device John Snow
2020-03-17 23:23 ` [PULL 04/20] cmd646: remove unused pci_cmd646_ide_init() function John Snow
2020-03-17 23:23 ` [PULL 05/20] via-ide: move registration of VMStateDescription to DeviceClass John Snow
2020-03-17 23:23 ` [PULL 06/20] ide/via: Get rid of via_ide_init() John Snow
2020-03-17 23:23 ` [PULL 07/20] pci: Honour wmask when resetting PCI_INTERRUPT_LINE John Snow
2020-03-17 23:23 ` [PULL 08/20] via-ide: ensure that PCI_INTERRUPT_LINE is hard-wired to its default value John Snow
2020-03-17 23:23 ` [PULL 09/20] via-ide: initialise IDE controller in legacy mode John Snow
2020-03-17 23:23 ` [PULL 10/20] via-ide: allow guests to write to PCI_CLASS_PROG John Snow
2020-03-17 23:23 ` [PULL 11/20] via-ide: always use legacy IRQ 14/15 routing John Snow
2020-03-17 23:23 ` [PULL 12/20] hd-geo-test: Clean up use of buf[] in create_qcow2_with_mbr() John Snow
2020-03-17 23:23 ` [PULL 13/20] hw/ide: Get rid of piix3_init functions John Snow
2020-03-17 23:23 ` [PULL 14/20] hw/isa/piix4.c: Introduce variable to store devfn John Snow
2020-03-17 23:23 ` [PULL 15/20] hw/ide: Get rid of piix4_init function John Snow
2020-03-17 23:23 ` [PULL 16/20] hw/ide: Remove now unneded #include "hw/pci/pci.h" from hw/ide.h John Snow
2020-03-17 23:23 ` [PULL 17/20] hw/ide/pci.c: Coding style update to fix checkpatch errors John Snow
2020-03-17 23:23 ` [PULL 18/20] hw/ide: Do ide_drive_get() within pci_ide_create_devs() John Snow
2020-03-17 23:23 ` [PULL 19/20] hw/ide: Move MAX_IDE_DEVS define to hw/ide/internal.h John Snow
2020-03-17 23:23 ` [PULL 20/20] hw/ide: Remove unneeded inclusion of hw/ide.h John Snow
2020-03-19 12:33 ` [PULL 00/20] Ide patches Peter Maydell
2020-03-19 18:02   ` John Snow
2020-03-23 22:27     ` Mark Cave-Ayland

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).