Skip to content

use realizefn for SysBusDevice, part 1

Hu Tao qemu-devel 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest26 patches 16 repliesIn review
  2. v126 patches 20 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/26sysbus: document SysBusDeviceClass about @initinclude/hw/sysbus.h+10 -02 replies
2/26ohci: QOM'ify some morehw/usb/hcd-ohci.c+12 -81 reply
3/26ohci: use realize for ohcihw/usb/hcd-ohci.c+6 -81 reply
4/26i440fx-pcihost: use realize for i440fx-pcihosthw/pci-host/piix.c+15 -101 reply
5/26i440fx: use type-safe cast instead of directly access of parent devhw/pci-host/piix.c+7 -41 reply
6/26q35: use type-safe cast instead of directly access of parent devhw/pci-host/q35.c+18 -171 reply
7/26q35: use realize for q35 hosthw/pci-host/q35.c+15 -141 reply
8/26fdc: QOM'ify some morehw/block/fdc.c+20 -170 replies
9/26fdc: use realize for fdc.hw/block/fdc.c+41 -214 replies
10/26pflash-cfi01: QOM'ify some morehw/block/pflash_cfi01.c+8 -80 replies
11/26pflash_cfi01: use realize for pflash_cfi01hw/block/pflash_cfi01.c+5 -70 replies
12/26pflash-cfi02: QOM'ify some morehw/block/pflash_cfi02.c+8 -80 replies
13/26pflash_cfi02: use realize for pflash_cfi02hw/block/pflash_cfi02.c+7 -80 replies
14/26ahci: QOM'ify some morehw/ide/ahci.c+7 -40 replies
15/26ahci: use realize for ahcihw/ide/ahci.c+5 -71 reply
16/26fwcfg: QOM'ify some morehw/nvram/fw_cfg.c+6 -60 replies
17/26fwcfg: use realize for fwcfghw/nvram/fw_cfg.c+16 -102 replies
18/26scsi esp: QOM'ify some morehw/scsi/esp.c+9 -70 replies
19/26scsi esp: use realize for scsi esphw/scsi/esp.c+20 -104 replies
20/26hpet: QOM'ify some morehw/timer/hpet.c+9 -50 replies
21/26hpet: use realize for hpethw/timer/hpet.c+17 -130 replies
22/26kvmclock: QOM'ify some morehw/i386/kvm/clock.c+6 -31 reply
23/26kvmclock: use realize for kvmclockhw/i386/kvm/clock.c+2 -40 replies
24/26kvmvapic realizehw/i386/kvmvapic.c+5 -70 replies
25/26ioapic: use realize for ioapichw/intc/ioapic_common.c+5 -71 reply
26/26isa bus: remove isabus_bridge_init since it does nothinghw/isa/isa-bus.c+0 -80 replies

Reviews trailers per patch

1 of 26 patches has a Reviewed-by or Acked-by.

PatchHu TaoStefan Hajnoczi
1/26
2/26
3/26
4/26
5/26
6/26
7/26
8/26
9/26R-b R-b
10/26
11/26
12/26
13/26
14/26
15/26
16/26
17/26
18/26
19/26
20/26
21/26
22/26
23/26
24/26
25/26
26/26

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

Read the v2 thread

Cover letter [Qemu-devel] [PATCH v2 00/26] use realizefn for SysBusDevice, part 1

This series updates part of devices inheriting from SysbusDevice to use DeviceState::realize, and QOM'ify them.

These devices are default to x86_64-softmmu. I'm planning to make patches in the same manner, that is, each series is for devices default to each target. After all devices are converted to realizefn, SysBusDeviceClass::init can be removed.

v2 is based on qom-next at https://github.com/afaerber/qemu-cpu/tree/qom-next

Changes:

v2: 1. swap the order of some patches to first use type-cast macro
then convert to realizefn.
2. document SysBusDeviceClass::init
3. don't touch VMStateDescription::name
4. drop patch for ehci as the part's already been done by Andreas

Cc Andreas Färber <[email protected]>
Cc Peter Crosthwaite <[email protected]>
Cc Eduardo Habkost <[email protected]>
Cc Igor Mammedov <[email protected]>

Hu Tao (26):
sysbus: document SysBusDeviceClass about @init
ohci: QOM'ify some more
ohci: use realize for ohci
i440fx-pcihost: use realize for i440fx-pcihost
i440fx: use type-safe cast instead of directly access of parent dev
q35: use type-safe cast instead of directly access of parent dev
q35: use realize for q35 host
fdc: QOM'ify some more
fdc: use realize for fdc.
pflash-cfi01: QOM'ify some more
pflash_cfi01: use realize for pflash_cfi01
pflash-cfi02: QOM'ify some more
pflash_cfi02: use realize for pflash_cfi02
ahci: QOM'ify some more
ahci: use realize for ahci
fwcfg: QOM'ify some more
fwcfg: use realize for fwcfg
scsi esp: QOM'ify some more
scsi esp: use realize for scsi esp
hpet: QOM'ify some more
hpet: use realize for hpet
kvmclock: QOM'ify some more
kvmclock: use realize for kvmclock
kvmvapic realize
ioapic: use realize for ioapic
isa bus: remove isabus_bridge_init since it does nothing

 hw/block/fdc.c          | 87 +++++++++++++++++++++++++++++++------------------
 hw/block/pflash_cfi01.c | 28 ++++++++--------
 hw/block/pflash_cfi02.c | 31 +++++++++---------
 hw/i386/kvm/clock.c     | 15 +++++----
 hw/i386/kvmvapic.c      | 12 +++----
 hw/ide/ahci.c           | 21 ++++++------
 hw/intc/ioapic_common.c | 12 +++----
 hw/isa/isa-bus.c        |  8 -----
 hw/nvram/fw_cfg.c       | 36 +++++++++++---------
 hw/pci-host/piix.c      | 36 ++++++++++++--------
 hw/pci-host/q35.c       | 60 +++++++++++++++++-----------------
 hw/scsi/esp.c           | 46 ++++++++++++++++----------
 hw/timer/hpet.c         | 44 +++++++++++++++----------
 hw/usb/hcd-ohci.c       | 32 +++++++++---------
 include/hw/sysbus.h     | 10 ++++++
 15 files changed, 268 insertions(+), 210 deletions(-)
Signature · 1 line
1.8.3.1