Skip to content

RFC Refactor PC machine to take advantage of QOM

Hu Tao qemu-devel qemu-trivial 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest20 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/20i440fx: remove unused parameter i440fx_state of i440fx_init.hw/i386/pc_piix.c hw/pci-host/piix.c include/hw/i386/pc.h+6 -100 replies
2/20i440fx: rename i440FX to i440FX-PMChw/pci-host/piix.c include/hw/i386/pc.h+33 -330 replies
3/20i440fx: rename i440FX-pcihost to i440FXhw/pci-host/piix.c+12 -80 replies
4/20i440fx: prepare for compositionhw/pci-host/piix.c+31 -180 replies
5/20piix3: make PIIX3-xen a subclass of PIIX3hw/pci-host/piix.c+1 -110 replies
6/20piix3: prepare for compositionhw/pci-host/piix.c+20 -120 replies
7/20piix3: create piix3 through composition.hw/pci-host/piix.c+44 -300 replies
8/20rtc: remove rtc_set_dateinclude/hw/timer/mc146818rtc.h+0 -11 reply
9/20ich9: function renamehw/isa/lpc_ich9.c+7 -20 replies
10/20piix3, ich9: create the HPET through compositionhw/i386/pc.c hw/i386/pc_q35.c hw/isa/lpc_ich9.c +4 more+71 -250 replies
11/20add rtc_set_irqhw/timer/mc146818rtc.c include/hw/timer/mc146818rtc.h+7 -00 replies
12/20piix3, ich9: create the RTC through compositionhw/i386/pc.c hw/i386/pc_piix.c hw/i386/pc_q35.c +5 more+44 -110 replies
13/20piix3, ich9: create pit through compositionhw/i386/pc.c hw/isa/lpc_ich9.c hw/pci-host/piix.c +2 more+67 -150 replies
14/20piix3, ich9: create pc speaker through compositionhw/isa/lpc_ich9.c hw/pci-host/piix.c include/hw/i386/ich9.h+16 -40 replies
15/20i440fx pmc: create pmc through comositionhw/pci-host/piix.c+64 -370 replies
16/20i440fx-pmc: calculate PCI memory hole directlyhw/i386/pc_piix.c hw/pci-host/piix.c include/hw/i386/pc.h+24 -350 replies
17/20i440fx-pmc: create pci address spacehw/i386/pc_piix.c hw/pci-host/piix.c include/hw/i386/pc.h+25 -260 replies
18/20q35-mch: create pci address spacehw/i386/pc_q35.c hw/pci-host/q35.c include/hw/pci-host/q35.h+12 -140 replies
19/20i440fx-pmc: move ram initialization into i440fx-pmchw/i386/pc.c hw/i386/pc_piix.c hw/pci-host/piix.c +1 more+37 -400 replies
20/20q35-mch: move ram initialization into q35-mchhw/i386/pc_q35.c hw/pci-host/q35.c include/hw/pci-host/q35.h+40 -120 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [Qemu-devel] [RFC PATCH v1 00/20] Refactor PC machine to take advantage of QOM

This is a re-do of original series posted by Anthony Liguori at:
http://lists.gnu.org/archive/html/qemu-devel/2012-01/msg03501.html

I post this series because:
1. there are no news from Anthony since the first version for more than a year
2. Li Wanfeng di some work on the refactor last year, but no news for half a year
3. memory hotplug requires i440fx pmc refactor if I'm getting it right

     (http://lists.gnu.org/archive/html/qemu-devel/2012-12/msg02693.html)

Problems:

1. isapc is broken
2. too many code duplication between piix and ich
3. others

TODO:

1. make a proper ISA model
2. a base class PCSuperIO that piix and ich can inherit from. isapc may also be modelled with PCSuperIO. But there was argument on this.
(http://lists.gnu.org/archive/html/qemu-devel/2012-01/msg03626.html)
3. a base class MemoryController that i440fx-pmc and q35-mch can inherit from
4. others

Hu Tao (20):
i440fx: remove unused parameter i440fx_state of i440fx_init.
i440fx: rename i440FX to i440FX-PMC
i440fx: rename i440FX-pcihost to i440FX
i440fx: prepare for composition
piix3: make PIIX3-xen a subclass of PIIX3
piix3: prepare for composition
piix3: create piix3 through composition.
rtc: remove rtc_set_date
ich9: function rename
piix3,ich9: create the HPET through composition add rtc_set_irq
piix3,ich9: create the RTC through composition piix3,ich9: create pit through composition piix3,ich9: create pc speaker through composition i440fx pmc: create pmc through comosition
i440fx-pmc: calculate PCI memory hole directly
i440fx-pmc: create pci address space
q35-mch: create pci address space
i440fx-pmc: move ram initialization into i440fx-pmc
q35-mch: move ram initialization into q35-mch

 hw/i386/pc.c                   |  71 +------
 hw/i386/pc_piix.c              |  50 ++---
 hw/i386/pc_q35.c               |  35 ++--
 hw/isa/lpc_ich9.c              |  87 +++++++-
 hw/pci-host/piix.c             | 447 ++++++++++++++++++++++++++++-------------
 hw/pci-host/q35.c              |  48 ++++-
 hw/timer/hpet.c                |   2 +-
 hw/timer/mc146818rtc.c         |   8 +-
 include/hw/i386/ich9.h         |   5 +
 include/hw/i386/pc.h           |  20 +-
 include/hw/pci-host/q35.h      |  10 +-
 include/hw/timer/hpet.h        |   3 +
 include/hw/timer/i8254.h       |   3 +
 include/hw/timer/mc146818rtc.h |   2 +-
 14 files changed, 504 insertions(+), 287 deletions(-)
Signature · 1 line
1.8.2.3