All of lore.kernel.org
 help / color / mirror / Atom feed
From: Igor Mammedov <imammedo@redhat.com>
To: Zhu Guihua <zhugh.fnst@cn.fujitsu.com>
Cc: mst@redhat.com, qemu-devel@nongnu.org, tangchen@cn.fujitsu.com,
	izumi.taku@jp.fujitsu.com, guz.fnst@cn.fujitsu.com,
	pbonzini@redhat.com
Subject: Re: [Qemu-devel] [RESEND PATCH v4 3/6] pc-dimm: Add memory hot unplug request support for pc-dimm
Date: Mon, 16 Mar 2015 14:56:13 +0100	[thread overview]
Message-ID: <20150316145613.7b815850@nial.brq.redhat.com> (raw)
In-Reply-To: <b80aad6efa7a32e5188fc8161c38699fe254392b.1426494342.git.zhugh.fnst@cn.fujitsu.com>

On Mon, 16 Mar 2015 16:58:15 +0800
Zhu Guihua <zhugh.fnst@cn.fujitsu.com> wrote:

> From: Tang Chen <tangchen@cn.fujitsu.com>
> 
> Implement memory unplug request cb for pc-dimm, and call it in
> pc_machine_device_unplug_request_cb().
Please, merge this patch with 2/6.

> 
> Signed-off-by: Tang Chen <tangchen@cn.fujitsu.com>
> Signed-off-by: Zhu Guihua <zhugh.fnst@cn.fujitsu.com>
> ---
>  hw/i386/pc.c | 28 ++++++++++++++++++++++++++--
>  1 file changed, 26 insertions(+), 2 deletions(-)
> 
> diff --git a/hw/i386/pc.c b/hw/i386/pc.c
> index b5b2aad..9c7c318 100644
> --- a/hw/i386/pc.c
> +++ b/hw/i386/pc.c
> @@ -1669,6 +1669,26 @@ out:
>      error_propagate(errp, local_err);
>  }
>  
> +static void pc_dimm_unplug_request(HotplugHandler *hotplug_dev,
> +                                   DeviceState *dev, Error **errp)
> +{
> +    HotplugHandlerClass *hhc;
> +    Error *local_err = NULL;
> +    PCMachineState *pcms = PC_MACHINE(hotplug_dev);
> +
> +    if (!pcms->acpi_dev) {
> +        error_setg(&local_err,
> +                   "memory hotplug is not enabled: missing acpi device");
> +        goto out;
> +    }
> +
> +    hhc = HOTPLUG_HANDLER_GET_CLASS(pcms->acpi_dev);
> +    hhc->unplug_request(HOTPLUG_HANDLER(pcms->acpi_dev), dev, &local_err);
> +
> +out:
> +    error_propagate(errp, local_err);
> +}
> +
>  static void pc_cpu_plug(HotplugHandler *hotplug_dev,
>                          DeviceState *dev, Error **errp)
>  {
> @@ -1711,8 +1731,12 @@ static void pc_machine_device_plug_cb(HotplugHandler *hotplug_dev,
>  static void pc_machine_device_unplug_request_cb(HotplugHandler *hotplug_dev,
>                                                  DeviceState *dev, Error **errp)
>  {
> -    error_setg(errp, "acpi: device unplug request for not supported device"
> -               " type: %s", object_get_typename(OBJECT(dev)));
> +    if (object_dynamic_cast(OBJECT(dev), TYPE_PC_DIMM)) {
> +        pc_dimm_unplug_request(hotplug_dev, dev, errp);
> +    } else {
> +        error_setg(errp, "acpi: device unplug request for not supported device"
> +                   " type: %s", object_get_typename(OBJECT(dev)));
> +    }
>  }
>  
>  static void pc_machine_device_unplug_cb(HotplugHandler *hotplug_dev,

  reply	other threads:[~2015-03-16 13:56 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-16  8:58 [Qemu-devel] [RESEND PATCH v4 0/6] QEMU memory hot unplug support Zhu Guihua
2015-03-16  8:58 ` [Qemu-devel] [RESEND PATCH v4 1/6] acpi, mem-hotplug: Add acpi_memory_slot_status() to get MemStatus Zhu Guihua
2015-03-16 13:58   ` Michael S. Tsirkin
2015-03-19  1:52     ` Zhu Guihua
2015-03-19  5:59       ` Michael S. Tsirkin
2015-03-16  8:58 ` [Qemu-devel] [RESEND PATCH v4 2/6] acpi, mem-hotplug: Add unplug request cb for memory device Zhu Guihua
2015-03-16 13:53   ` Igor Mammedov
2015-03-16  8:58 ` [Qemu-devel] [RESEND PATCH v4 3/6] pc-dimm: Add memory hot unplug request support for pc-dimm Zhu Guihua
2015-03-16 13:56   ` Igor Mammedov [this message]
2015-03-16  8:58 ` [Qemu-devel] [RESEND PATCH v4 4/6] acpi, mem-hotplug: Add unplug cb for memory device Zhu Guihua
2015-03-16 14:10   ` Igor Mammedov
2015-03-16  8:58 ` [Qemu-devel] [RESEND PATCH v4 5/6] pc-dimm: Add memory hot unplug support for pc-dimm Zhu Guihua
2015-03-16 14:20   ` Igor Mammedov
2015-03-16  8:58 ` [Qemu-devel] [RESEND PATCH v4 6/6] acpi: Add hardware implementation for memory hot unplug Zhu Guihua
2015-03-16 14:59   ` Igor Mammedov
2015-03-23 10:59     ` Zhu Guihua
2015-03-23 12:47       ` Igor Mammedov
2015-03-24  9:34         ` Zhu Guihua
2015-03-24 10:26           ` Igor Mammedov
2015-03-25  6:13             ` Zhu Guihua
2015-03-25 10:40               ` Igor Mammedov
2015-03-24  9:38     ` Zhu Guihua
2015-03-24 10:31       ` Igor Mammedov
2015-03-24 10:48         ` Zhu Guihua
2015-03-25 10:35           ` Igor Mammedov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150316145613.7b815850@nial.brq.redhat.com \
    --to=imammedo@redhat.com \
    --cc=guz.fnst@cn.fujitsu.com \
    --cc=izumi.taku@jp.fujitsu.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=tangchen@cn.fujitsu.com \
    --cc=zhugh.fnst@cn.fujitsu.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.