From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:55385) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SXDIl-0002sT-DQ for qemu-devel@nongnu.org; Wed, 23 May 2012 11:16:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SXDIe-0003FU-UN for qemu-devel@nongnu.org; Wed, 23 May 2012 11:16:38 -0400 Received: from mx1.redhat.com ([209.132.183.28]:10891) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SXDIe-0003Ek-LY for qemu-devel@nongnu.org; Wed, 23 May 2012 11:16:32 -0400 Date: Wed, 23 May 2012 18:16:27 +0300 From: Gleb Natapov Message-ID: <20120523151627.GK10209@redhat.com> References: <1337504561-20297-1-git-send-email-gleb@redhat.com> <1337504561-20297-2-git-send-email-gleb@redhat.com> <4FBCE5A5.7050308@codemonkey.ws> <4FBCF566.3060902@suse.de> <4FBCF772.3040300@redhat.com> <4FBCFE0C.9090407@codemonkey.ws> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <4FBCFE0C.9090407@codemonkey.ws> Subject: Re: [Qemu-devel] [PATCH 2/2] Add PIIX4 properties to control PM system states. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Paolo Bonzini , Andreas =?utf-8?Q?F=C3=A4rber?= , qemu-devel@nongnu.org On Wed, May 23, 2012 at 10:11:08AM -0500, Anthony Liguori wrote: > On 05/23/2012 09:42 AM, Paolo Bonzini wrote: > >Il 23/05/2012 16:34, Andreas F=C3=A4rber ha scritto: > >>>> > >>>>I see nothing wrong in principle here except that you should use a PTR > >>>>property to pass the fw_cfg object to the ACPI PM device. > >>Paolo was on a quest to eliminate the PTR properties so I don't think we > >>should advocate adding any more. Without having reviewed the code, I > >>would suggest to rather QOM'ify the fw_cfg object and to use a link<> > >>property if needed. >=20 > fw_cfg is already a QOM object. I think there's enough in the tree > already to do link<>s properly so that's definitely better than > doing a PTR. >=20 If I do what you suggested and return fw_cfg from pc_memory_init() to pass it to piix4_pm_init() I do not need any links since piix4_pm_init() is where it is used. > > > >Perhaps it should be the other way round. fw_cfg gets links to all the > >devices it has to expose information about. In the future it could be > >changed to an FWCfgProvider interface. >=20 > Yes, that does make more sense. >=20 > Regards, >=20 > Anthony Liguori >=20 > > > >Paolo -- Gleb.