qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 2/2] Add PIIX4 properties to control PM system s


From: Gleb Natapov
Subject: Re: [Qemu-devel] [PATCH 2/2] Add PIIX4 properties to control PM system states.
Date: Wed, 23 May 2012 18:16:27 +0300

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ärber 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.
> 
> 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.
> 
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.
> 
> Yes, that does make more sense.
> 
> Regards,
> 
> Anthony Liguori
> 
> >
> >Paolo

--
                        Gleb.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]