From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:42519) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SrxJz-0007E8-0S for qemu-devel@nongnu.org; Thu, 19 Jul 2012 16:27:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SrxJx-0002bc-Ul for qemu-devel@nongnu.org; Thu, 19 Jul 2012 16:27:38 -0400 Received: from e39.co.us.ibm.com ([32.97.110.160]:33848) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SrxJx-0002bO-OA for qemu-devel@nongnu.org; Thu, 19 Jul 2012 16:27:37 -0400 Received: from /spool/local by e39.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 19 Jul 2012 14:27:36 -0600 Received: from d03relay02.boulder.ibm.com (d03relay02.boulder.ibm.com [9.17.195.227]) by d03dlp03.boulder.ibm.com (Postfix) with ESMTP id 59B6919D8039 for ; Thu, 19 Jul 2012 20:27:30 +0000 (WET) Received: from d03av04.boulder.ibm.com (d03av04.boulder.ibm.com [9.17.195.170]) by d03relay02.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q6JKRN35089422 for ; Thu, 19 Jul 2012 14:27:26 -0600 Received: from d03av04.boulder.ibm.com (loopback [127.0.0.1]) by d03av04.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q6JKRKqg023519 for ; Thu, 19 Jul 2012 14:27:21 -0600 From: Anthony Liguori In-Reply-To: <5006F5A8.9050101@redhat.com> References: <1342617545-9261-1-git-send-email-liwanp@linux.vnet.ibm.com> <5006F5A8.9050101@redhat.com> Date: Thu, 19 Jul 2012 15:27:17 -0500 Message-ID: <877gtzcx96.fsf@codemonkey.ws> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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: Paolo Bonzini , Wanpeng Li Cc: Ramachandra Pai , Gavin Shan , "Michael S. Tsirkin" , Jan Kiszka , Jason Baron , qemu-devel@nongnu.org, Liu Ping Fan , Blue Swirl , Stefan Weil , Avi Kivity Paolo Bonzini writes: > 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. My hope was that this series would undue the mess that the initial attempt to merge q35 did. As we discussed on the community call a few weeks ago, the break of things like pc_basic_init() creates a spaghetti maze that will be extremely difficult to resolve down the road. I think we need to spend some time refactoring pc init properly before adding q35. Regards, Anthony Liguori > > Paolo