|
From: | Anthony Liguori |
Subject: | Re: [Qemu-devel] [PATCH 2/2] Add PIIX4 properties to control PM system states. |
Date: | Wed, 23 May 2012 10:11:08 -0500 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120329 Thunderbird/11.0.1 |
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.
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
[Prev in Thread] | Current Thread | [Next in Thread] |