From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53814) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YBIfC-0006Rh-IE for qemu-devel@nongnu.org; Wed, 14 Jan 2015 02:46:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YBIfB-00046u-H4 for qemu-devel@nongnu.org; Wed, 14 Jan 2015 02:46:50 -0500 Received: from [59.151.112.132] (port=6743 helo=heian.cn.fujitsu.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YBIfB-0003xh-3K for qemu-devel@nongnu.org; Wed, 14 Jan 2015 02:46:49 -0500 From: Zhu Guihua Date: Wed, 14 Jan 2015 15:45:01 +0800 Message-ID: <997c331339daa9b59e030829e46f4340e2e01176.1421214664.git.zhugh.fnst@cn.fujitsu.com> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain Subject: [Qemu-devel] [PATCH v2 08/11] acpi/ich9: add cpu hot unplug support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Zhu Guihua , tangchen@cn.fujitsu.com, guz.fnst@cn.fujitsu.com, isimatu.yasuaki@jp.fujitsu.com, anshul.makkar@profitbricks.com, chen.fan.fnst@cn.fujitsu.com, imammedo@redhat.com, afaerber@suse.de From: Gu Zheng Signed-off-by: Gu Zheng Signed-off-by: Zhu Guihua --- hw/acpi/ich9.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/hw/acpi/ich9.c b/hw/acpi/ich9.c index b795f8f..a892e5d 100644 --- a/hw/acpi/ich9.c +++ b/hw/acpi/ich9.c @@ -316,8 +316,12 @@ 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 (object_dynamic_cast(OBJECT(dev), TYPE_CPU)) { + acpi_cpu_unplug_cb(&pm->acpi_regs, pm->irq, &pm->gpe_cpu, dev, errp); + } 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) -- 1.9.3