From: Tang Chen <tangchen@cn.fujitsu.com>
To: Igor Mammedov <imammedo@redhat.com>
Cc: zhugh.fnst@cn.fujitsu.com, mst@redhat.com, hutao@cn.fujitsu.com,
qemu-devel@nongnu.org, isimatu.yasuaki@jp.fujitsu.com,
pbonzini@redhat.com
Subject: Re: [Qemu-devel] [RESEND PATCH v3 4/8] qdev: Add memory hot unplug support for bus-less devices.
Date: Tue, 16 Sep 2014 16:42:03 +0800 [thread overview]
Message-ID: <5417F7DB.8080604@cn.fujitsu.com> (raw)
In-Reply-To: <20140904152227.28adee98@nial.usersys.redhat.com>
Hi Igor,
On 09/04/2014 09:22 PM, Igor Mammedov wrote:
> On Wed, 27 Aug 2014 16:08:35 +0800
> Tang Chen <tangchen@cn.fujitsu.com> wrote:
>
>> From: Hu Tao <hutao@cn.fujitsu.com>
>>
>> Implement bus-less device hot-remove in qdev_unplug(). It will call PCMachine
>> callback introduced in previous patch.
>>
> subject/commit message doesn't need to mention memory hotplug/PCMachine,
> it's generic handling that applies to other devices even though
> pc-dimm is the only bus-less device handled here.
Followed.
>
>> Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>
>> Signed-off-by: Tang Chen <tangchen@cn.fujitsu.com>
>> ---
>> hw/core/qdev.c | 8 ++++++++
>> 1 file changed, 8 insertions(+)
>>
>> diff --git a/hw/core/qdev.c b/hw/core/qdev.c
>> index da1ba48..e365a74 100644
>> --- a/hw/core/qdev.c
>> +++ b/hw/core/qdev.c
>> @@ -228,6 +228,14 @@ void qdev_unplug(DeviceState *dev, Error **errp)
>>
>> if (dev->parent_bus && dev->parent_bus->hotplug_handler) {
>> hotplug_handler_unplug(dev->parent_bus->hotplug_handler, dev, errp);
>> + } else if (*errp == NULL) {
> what's the reason for ^^^ condition here?
It should be "else if (object_dynamic_cast(qdev_get_machine(),
TYPE_MACHINE)) "
Just like we do in device_set_realized().
Thanks.
>> + HotplugHandler *hotplug_ctrl;
>> + MachineState *machine = MACHINE(qdev_get_machine());
>> + MachineClass *mc = MACHINE_GET_CLASS(machine);
>> +
>> + hotplug_ctrl = mc->get_hotplug_handler(machine, dev);
>> + if (hotplug_ctrl)
>> + hotplug_handler_unplug(hotplug_ctrl, dev, errp);
>> } else {
>> assert(dc->unplug != NULL);
>> if (dc->unplug(dev) < 0) { /* legacy handler */
>
> .
>
next prev parent reply other threads:[~2014-09-16 8:40 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-27 8:08 [Qemu-devel] [RESEND PATCH v3 0/8] QEmu memory hot unplug support Tang Chen
2014-08-27 8:08 ` [Qemu-devel] [RESEND PATCH v3 1/8] acpi, piix4: Add memory hot unplug support for piix4 Tang Chen
2014-09-04 12:15 ` Igor Mammedov
2014-09-16 3:17 ` Tang Chen
2014-08-27 8:08 ` [Qemu-devel] [RESEND PATCH v3 2/8] acpi, ich9: Add memory hot unplug support for ich9 Tang Chen
2014-09-04 12:25 ` Igor Mammedov
2014-09-16 3:18 ` Tang Chen
2014-08-27 8:08 ` [Qemu-devel] [RESEND PATCH v3 3/8] pc: Add memory hot unplug support for pc machine Tang Chen
2014-09-04 12:44 ` Igor Mammedov
2014-09-04 13:16 ` Igor Mammedov
2014-08-27 8:08 ` [Qemu-devel] [RESEND PATCH v3 4/8] qdev: Add memory hot unplug support for bus-less devices Tang Chen
2014-09-04 13:22 ` Igor Mammedov
2014-09-16 8:42 ` Tang Chen [this message]
2014-08-27 8:08 ` [Qemu-devel] [RESEND PATCH v3 5/8] pc-dimm: Add pc_dimm_unrealize() for memory hot unplug support Tang Chen
2014-09-04 13:28 ` Igor Mammedov
2014-09-12 5:30 ` zhanghailiang
2014-09-12 13:17 ` Igor Mammedov
2014-09-24 7:02 ` Tang Chen
2014-08-27 8:08 ` [Qemu-devel] [RESEND PATCH v3 6/8] acpi: Add hardware implementation for memory hot unplug Tang Chen
2014-09-04 14:20 ` Igor Mammedov
2014-09-16 10:12 ` Tang Chen
2014-09-16 11:34 ` Igor Mammedov
2014-08-27 8:08 ` [Qemu-devel] [RESEND PATCH v3 7/8] pc, acpi bios: Add memory hot unplug interface Tang Chen
2014-09-04 13:53 ` Igor Mammedov
2014-08-27 8:08 ` [Qemu-devel] [RESEND PATCH v3 8/8] monitor: Add memory hot unplug support for device_del command Tang Chen
2014-09-04 14:02 ` 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=5417F7DB.8080604@cn.fujitsu.com \
--to=tangchen@cn.fujitsu.com \
--cc=hutao@cn.fujitsu.com \
--cc=imammedo@redhat.com \
--cc=isimatu.yasuaki@jp.fujitsu.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).