qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH Part2 10/13] acpi, ich9: Add memory hot unplug s


From: Zhu Guihua
Subject: Re: [Qemu-devel] [PATCH Part2 10/13] acpi, ich9: Add memory hot unplug support for ich9.
Date: Mon, 17 Nov 2014 14:17:49 +0800

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 <address@hidden>
> ---
>  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)





reply via email to

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