From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:40534) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SrYHK-00030k-0z for qemu-devel@nongnu.org; Wed, 18 Jul 2012 13:43:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SrYHF-0005GV-LS for qemu-devel@nongnu.org; Wed, 18 Jul 2012 13:43:13 -0400 Received: from mail-wg0-f53.google.com ([74.125.82.53]:64678) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SrYHF-0005GR-Eq for qemu-devel@nongnu.org; Wed, 18 Jul 2012 13:43:09 -0400 Received: by wgbfm10 with SMTP id fm10so1327246wgb.10 for ; Wed, 18 Jul 2012 10:43:08 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <5006F5A8.9050101@redhat.com> Date: Wed, 18 Jul 2012 19:43:04 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1342617545-9261-1-git-send-email-liwanp@linux.vnet.ibm.com> In-Reply-To: <1342617545-9261-1-git-send-email-liwanp@linux.vnet.ibm.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v4 0/5] 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: Anthony Liguori , Gavin Shan , "Michael S. Tsirkin" , Jan Kiszka , Jason Baron , qemu-devel@nongnu.org, Ram Pai , Blue Swirl , Stefan Weil , Liu Ping Fan , Avi Kivity Il 18/07/2012 15:19, Wanpeng Li ha scritto: > [CCing ML] > > 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. > > 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 > Signed-off-by: Wanpeng Li Why should we include this? I assume it conflicts uselessly with the work Jason is doing on q35. Paolo