Skip to content

pci: Partial conversion to realize

Markus Armbruster qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest10 patches 10 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/10pci: Convert core to realizehw/pci/pci.c+49 -440 replies
2/10pci: Permit incremental conversion of device models to realizehw/pci/pci.c include/hw/pci/pci.h+21 -60 replies
3/10pci: Trivial device model conversions to realizehw/acpi/piix4.c hw/audio/ac97.c hw/audio/es1370.c +31 more+87 -1520 replies
4/10pcnet: pcnet_common_init() always returns 0, change to voidhw/net/lance.c hw/net/pcnet-pci.c hw/net/pcnet.c +1 more+6 -60 replies
5/10pcnet: Convert to realizehw/net/pcnet-pci.c+2 -30 replies
6/10serial-pci: Convert to realizehw/char/serial-pci.c+9 -130 replies
7/10ide/ich: Convert to realizehw/ide/ich.c+6 -70 replies
8/10cirrus-vga: Convert to realizehw/display/cirrus_vga.c+5 -60 replies
9/10qxl: Convert to realizehw/display/qxl.c+17 -190 replies
10/10pci-assign: Convert to realizehw/i386/kvm/pci-assign.c+4 -60 replies

Reviews trailers per patch

None of the 10 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchGonglei
SeriesR-b
1/10
2/10
3/10
4/10
5/10
6/10
7/10
8/10
9/10
10/10

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [Qemu-devel] [PATCH 00/10] pci: Partial conversion to realize

I posted this series as RFC back in October, but it depended on patches then still under review, so I put it aside, and promptly forgot. Fortunately, rebasing and updating it wasn't much trouble.

While discussing Gonglei's "[PATCH v2 00/19] usb: convert device init to realize", Paolo called the PCI conversion job "Gargantuan". This series attempts to crack it into manageable jobs.

The basic idea comes from qdev core: have the core deal with just realize, but default the device models' realize() method to one that calls the old init() method. Unconverted device models don't set their realize(), thus get one that calls their init(). We can then convert device by device instead of having to convert of all of PCI in one Gargantuan go.

Since PCI's exit() cannot fail, I chose not to add an unrealize().
Precedence: USBDeviceClass method handle_destroy(), called on USB unrealize.

Aside: USBDeviceClass also has an unrealize() method, but it's never set and never called.

PATCH 01 converts the interface between PCI core and qdev to realize.

PATCH 02 adds realize to the interface between PCI core and PCI device models. Once all device models are converted to realize, the old init interface can be dropped, completing the Gargantuan job.

PATCH 03-04 convert device models that cannot fail initialization.

PATCH 05-10 convert a few that can fail, but are really easy to convert.

Markus Armbruster (10):
pci: Convert core to realize
pci: Permit incremental conversion of device models to realize
pci: Trivial device model conversions to realize
pcnet: pcnet_common_init() always returns 0, change to void
pcnet: Convert to realize
serial-pci: Convert to realize
ide/ich: Convert to realize
cirrus-vga: Convert to realize
qxl: Convert to realize
pci-assign: Convert to realize

 hw/acpi/piix4.c            |   5 +-
 hw/audio/ac97.c            |   5 +-
 hw/audio/es1370.c          |   5 +-
 hw/audio/intel-hda.c       |   6 +--
 hw/char/serial-pci.c       |  22 ++++-----
 hw/display/cirrus_vga.c    |  11 ++---
 hw/display/qxl.c           |  36 +++++++--------
 hw/display/vga-pci.c       |  11 ++---
 hw/display/vmware_vga.c    |   6 +--
 hw/i2c/smbus_ich9.c        |   5 +-
 hw/i386/kvm/pci-assign.c   |  10 ++--
 hw/ide/cmd646.c            |   5 +-
 hw/ide/ich.c               |  13 +++---
 hw/ide/piix.c              |  10 ++--
 hw/ide/via.c               |   6 +--
 hw/ipack/tpci200.c         |   6 +--
 hw/isa/i82378.c            |   6 +--
 hw/isa/piix4.c             |   5 +-
 hw/isa/vt82c686.c          |  24 ++++------
 hw/misc/pci-testdev.c      |   6 +--
 hw/net/e1000.c             |   6 +--
 hw/net/eepro100.c          |   6 +--
 hw/net/lance.c             |   3 +-
 hw/net/ne2000.c            |   6 +--
 hw/net/pcnet-pci.c         |   6 +--
 hw/net/pcnet.c             |   4 +-
 hw/net/pcnet.h             |   2 +-
 hw/net/rtl8139.c           |   6 +--
 hw/net/vmxnet3.c           |   6 +--
 hw/pci-bridge/dec.c        |   5 +-
 hw/pci-host/apb.c          |   5 +-
 hw/pci-host/bonito.c       |   6 +--
 hw/pci-host/grackle.c      |   5 +-
 hw/pci-host/piix.c         |  12 ++---
 hw/pci-host/ppce500.c      |   6 +--
 hw/pci-host/prep.c         |   6 +--
 hw/pci-host/q35.c          |   5 +-
 hw/pci-host/uninorth.c     |  20 ++++----
 hw/pci-host/versatile.c    |   5 +-
 hw/pci/pci.c               | 113 ++++++++++++++++++++++++++-------------------
 hw/sd/sdhci.c              |   5 +-
 hw/usb/hcd-ehci-pci.c      |   6 +--
 hw/usb/hcd-xhci.c          |   6 +--
 hw/watchdog/wdt_i6300esb.c |   6 +--
 include/hw/pci/pci.h       |   3 +-
 45 files changed, 203 insertions(+), 259 deletions(-)
Signature · 1 line
1.9.3