From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:59039) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SC9KU-0000JS-Um for qemu-devel@nongnu.org; Mon, 26 Mar 2012 08:47:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SC9KT-0000pz-3X for qemu-devel@nongnu.org; Mon, 26 Mar 2012 08:47:22 -0400 Received: from cantor2.suse.de ([195.135.220.15]:35457 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SC9KS-0000ph-QZ for qemu-devel@nongnu.org; Mon, 26 Mar 2012 08:47:21 -0400 Message-ID: <4F706557.4040305@suse.de> Date: Mon, 26 Mar 2012 14:47:19 +0200 From: =?ISO-8859-15?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1332727608-26523-1-git-send-email-liwp@linux.vnet.ibm.com> In-Reply-To: <1332727608-26523-1-git-send-email-liwp@linux.vnet.ibm.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 0/6] refactor PC machine, i440fx and piix3 to take advantage of QOM List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Wanpeng Li Cc: Gavin Shan , Anthony Liguori , qemu-devel@nongnu.org, Avi Kivity Am 26.03.2012 04:06, schrieb Wanpeng Li: > From: Anthony Liguori 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? > This series aggressively refactors the PC machine initialization to be = more > modelled and less ad-hoc. The highlights of this series are: >=20 > 1) Things like -m and -bios-name are now device model properties >=20 > 2) The i440fx and piix3 are now modelled in a thorough fashion >=20 > 3) Most of the chipset features of the piix3 are modelled through comp= osition >=20 > 4) i440fx_init is trivialized to creating devices and setting properti= es >=20 > 5) convert MemoryRegion to QOM >=20 > 6) convert PCI host bridge to QOM >=20 > The point (4) is the most important one. As we refactor in this fashio= n, > we should quickly get to the point where machine->init disappears compl= etely 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 >=20 > 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 de= vice, all > of its children are visible in the device model. This lets you set pro= perties > of the parent and its children. >=20 > realize() (which is still called DeviceState::init today) will be calle= d right > before the guest starts up for the first time. >=20 > Signed-off-by: Anthony Liguori > Signed-off-by: Wanpeng Li >=20 > --- > 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 > -- --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg