Received: from eggs.gnu.org ([2001:4830:134:3::10]:44523) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XqFeF-0002kc-DS for qemu-devel@nongnu.org; Mon, 17 Nov 2014 01:18:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XqFeA-0007rz-PE for qemu-devel@nongnu.org; Mon, 17 Nov 2014 01:18:51 -0500 Received: from [59.151.112.132] (port=35494 helo=heian.cn.fujitsu.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XqFeA-0007rP-CJ for qemu-devel@nongnu.org; Mon, 17 Nov 2014 01:18:46 -0500 Message-ID: <1416205069.18367.5.camel@G08FNSTD140041> From: Zhu Guihua Date: Mon, 17 Nov 2014 14:17:49 +0800 In-Reply-To: <1416200620-11968-11-git-send-email-tangchen@cn.fujitsu.com> References: <1416200620-11968-1-git-send-email-tangchen@cn.fujitsu.com> <1416200620-11968-11-git-send-email-tangchen@cn.fujitsu.com> Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH Part2 10/13] acpi, ich9: Add memory hot unplug support for ich9. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Tang Chen Cc: mst@redhat.com, hutao@cn.fujitsu.com, qemu-devel@nongnu.org, isimatu.yasuaki@jp.fujitsu.com, pbonzini@redhat.com, guz.fnst@cn.fujitsu.com, imammedo@redhat.com On Mon, 2014-11-17 at 13:03 +0800, Tang Chen wrote: > Call memory unplug cb in ich9_pm_device_unplug_cb(). > > Signed-off-by: Tang Chen > --- > hw/acpi/ich9.c | 10 ++++++++-- > 1 file changed, 8 insertions(+), 2 deletions(-) > > diff --git a/hw/acpi/ich9.c b/hw/acpi/ich9.c > index 841f57d..691299f 100644 > --- a/hw/acpi/ich9.c > +++ b/hw/acpi/ich9.c > @@ -317,8 +317,14 @@ void ich9_pm_device_unplug_request_cb(ICH9LPCPMRegs *pm, DeviceState *dev, > void ich9_pm_device_unplug_cb(ICH9LPCPMRegs *pm, DeviceState *dev, > Error **errp) > { > - error_setg(errp, "acpi: device unplug for not supported device" > - " type: %s", object_get_typename(OBJECT(dev))); > + if (pm->acpi_memory_hotplug.is_enabled && > + object_dynamic_cast(OBJECT(dev), TYPE_PC_DIMM)) { > + acpi_memory_unplug_request_cb(&pm->acpi_regs, pm->irq, > + &pm->acpi_memory_hotplug, dev, errp); This should invoke acpi_memory_unplug_cb(). Regards, Zhu > + } else { > + error_setg(errp, "acpi: device unplug for not supported device" > + " type: %s", object_get_typename(OBJECT(dev))); > + } > } > > void ich9_pm_ospm_status(AcpiDeviceIf *adev, ACPIOSTInfoList ***list)