From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53735) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WwZzI-0003DM-E9 for qemu-devel@nongnu.org; Mon, 16 Jun 2014 12:42:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WwZzC-0001eJ-9B for qemu-devel@nongnu.org; Mon, 16 Jun 2014 12:42:28 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40361) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WwZzC-0001eA-0z for qemu-devel@nongnu.org; Mon, 16 Jun 2014 12:42:22 -0400 Date: Mon, 16 Jun 2014 18:42:16 +0200 From: Igor Mammedov Message-ID: <20140616184216.1fb37263@nial.usersys.redhat.com> In-Reply-To: <539F17D8.7080903@redhat.com> References: <1401978968-7733-1-git-send-email-imammedo@redhat.com> <1401978968-7733-4-git-send-email-imammedo@redhat.com> <539F17D8.7080903@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 3/5] acpi: implement ospm_status() method for PIIX4/ICH9_LPC devices List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: pkrempa@redhat.com, mst@redhat.com, qemu-devel@nongnu.org, armbru@redhat.com, lcapitulino@redhat.com, vasilis.liaskovitis@profitbricks.com On Mon, 16 Jun 2014 10:14:16 -0600 Eric Blake wrote: > On 06/05/2014 08:36 AM, Igor Mammedov wrote: > > ... using TYPE_ACPI_DEVICE_IF interface. > > Which provides status reporting of ACPI declared memory devices > > > > Signed-off-by: Igor Mammedov > > --- > > v2: > > - set slot-type to DIMM > > - take into account that 'device' field could be optional > > --- > > hw/acpi/ich9.c | 7 +++++++ > > hw/acpi/memory_hotplug.c | 31 +++++++++++++++++++++++++++++++ > > hw/acpi/piix4.c | 11 +++++++++++ > > hw/isa/lpc_ich9.c | 3 +++ > > include/hw/acpi/ich9.h | 3 +++ > > include/hw/acpi/memory_hotplug.h | 1 + > > 6 files changed, 56 insertions(+), 0 deletions(-) > > > > > +void acpi_memory_ospm_status(MemHotplugState *mem_st, ACPIOSTInfoList ***list); > > Triple indirection looks unusual, but that doesn't make it wrong :) I plan to move ACPI code inside of interface handlers and drop piix4/ich9 stubs in favor of using QOM casting directly. So it would be -1 layer of indirection and not only for ospm_status(). In addition interface allows to avoid adding global function + stub where functionality is not implemented. > > Reviewed-by: Eric Blake >