[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 0/6] refactor PC machine, i440fx and piix3 to ta
From: |
Wanpeng Li |
Subject: |
Re: [Qemu-devel] [PATCH 0/6] refactor PC machine, i440fx and piix3 to take advantage of QOM |
Date: |
Mon, 26 Mar 2012 20:57:57 +0800 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Mon, Mar 26, 2012 at 02:47:19PM +0200, Andreas Färber wrote:
>Am 26.03.2012 04:06, schrieb Wanpeng Li:
>> From: Anthony Liguori <address@hidden>
>
>Resending an old cover letter is not a good idea. This looks like a v2,
>so please mark it as such in the subjects; it's missing a Change Log
>against Anthony's version. I take it, some patches were dropped?
>
No, I just help him rebase his patches.
>> This series aggressively refactors the PC machine initialization to be more
>> modelled and less ad-hoc. The highlights of this series are:
>>
>> 1) Things like -m and -bios-name are now device model properties
>>
>> 2) The i440fx and piix3 are now modelled in a thorough fashion
>>
>> 3) Most of the chipset features of the piix3 are modelled through
>> composition
>>
>> 4) i440fx_init is trivialized to creating devices and setting properties
>>
>> 5) convert MemoryRegion to QOM
>>
>> 6) convert PCI host bridge to QOM
>>
>> The point (4) is the most important one. As we refactor in this fashion,
>> we should quickly get to the point where machine->init disappears completely
>> in
>> favor of just creating a handful of devices.
>
>I agree that machine->init needs to be refactored, however I don't think
>it'll disappear, just be moved into initfn/realize functions.
>
>Andreas
>
>>
>> The two stage initialization of QOM is important here. instance_init() is
>> when
>> composed devices are created which means that after you've created a device,
>> all
>> of its children are visible in the device model. This lets you set
>> properties
>> of the parent and its children.
>>
>> realize() (which is still called DeviceState::init today) will be called
>> right
>> before the guest starts up for the first time.
>>
>> Signed-off-by: Anthony Liguori <address@hidden>
>> Signed-off-by: Wanpeng Li <address@hidden>
>>
>> ---
>> Makefile.target | 3 +-
>> hw/hpet.c | 39 +---
>> hw/hpet_emul.h | 41 +++
>> hw/i440fx.c | 431 ++++++++++++++++++++++++++
>> hw/i440fx.h | 78 +++++
>> hw/i8254_internal.h | 2 +-
>> hw/mc146818rtc.c | 26 --
>> hw/mc146818rtc.h | 29 ++
>> hw/pc.c | 838
>> +++++++++++++++++++++++++++++++++++++++++++++------
>> hw/pc.h | 46 +---
>> hw/pc_piix.c | 762 ----------------------------------------------
>> hw/pci_host.c | 26 ++
>> hw/pci_host.h | 5 +
>> hw/piix3.c | 274 +++++++++++++++++
>> hw/piix3.h | 79 +++++
>> hw/piix_pci.c | 600 ------------------------------------
>> memory.c | 94 +++++--
>> memory.h | 8 +
>> 18 files changed, 1795 insertions(+), 1586 deletions(-)
>> create mode 100644 hw/i440fx.c
>> create mode 100644 hw/i440fx.h
>> delete mode 100644 hw/pc_piix.c
>> create mode 100644 hw/piix3.c
>> create mode 100644 hw/piix3.h
>> delete mode 100644 hw/piix_pci.c
>> --
>
>--
>SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
>GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
>
--
LTC China, IBM, Shanghai
- Re: [Qemu-devel] [PATCH 5/6] merge pc_piix.c to pc.c, (continued)
[Qemu-devel] [PATCH 1/6] eliminate piix_pci.c and module i440fx and piix3, Wanpeng Li, 2012/03/25
Re: [Qemu-devel] [PATCH 0/6] refactor PC machine, i440fx and piix3 to take advantage of QOM, Jan Kiszka, 2012/03/26
Re: [Qemu-devel] [PATCH 0/6] refactor PC machine, i440fx and piix3 to take advantage of QOM, Andreas Färber, 2012/03/26
- Re: [Qemu-devel] [PATCH 0/6] refactor PC machine, i440fx and piix3 to take advantage of QOM,
Wanpeng Li <=
Re: [Qemu-devel] [PATCH 0/6] refactor PC machine, i440fx and piix3 to take advantage of QOM, Blue Swirl, 2012/03/26
- Re: [Qemu-devel] [PATCH 0/6] refactor PC machine, i440fx and piix3 to take advantage of QOM, Anthony Liguori, 2012/03/26
- Re: [Qemu-devel] [PATCH 0/6] refactor PC machine, i440fx and piix3 to take advantage of QOM, Blue Swirl, 2012/03/26
- Re: [Qemu-devel] [PATCH 0/6] refactor PC machine, i440fx and piix3 to take advantage of QOM, Anthony Liguori, 2012/03/26
- Re: [Qemu-devel] [PATCH 0/6] refactor PC machine, i440fx and piix3 to take advantage of QOM, Blue Swirl, 2012/03/26
- Re: [Qemu-devel] [PATCH 0/6] refactor PC machine, i440fx and piix3 to take advantage of QOM, Anthony Liguori, 2012/03/26
- Re: [Qemu-devel] [PATCH 0/6] refactor PC machine, i440fx and piix3 to take advantage of QOM, Blue Swirl, 2012/03/26
Re: [Qemu-devel] [PATCH 0/6] refactor PC machine, i440fx and piix3 to take advantage of QOM, Anthony Liguori, 2012/03/26