[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/2] qdev: add HotplugHandler->post_plug() callb
From: |
Igor Mammedov |
Subject: |
Re: [Qemu-devel] [PATCH 1/2] qdev: add HotplugHandler->post_plug() callback |
Date: |
Wed, 11 Jul 2018 16:15:02 +0200 |
On Wed, 11 Jul 2018 15:32:12 +0200
Paolo Bonzini <address@hidden> wrote:
> On 11/07/2018 15:29, Stefan Hajnoczi wrote:
> >> if (dev->hotplugged) {
> >> device_reset(dev);
> >> +
> >> + if (hotplug_ctrl) {
> > In the final patch I will move this out of if (dev->hotplugged) since
> > the other HotplugHandler callbacks are also invoked unconditionally.
>
> I'm not even sure why the reset is needed (removing it would also fix
> the bug!), and why it's only done on hotplug; however, it is probably
> there because it updates some bus-level state, so it's dangerous to
> remove it.
it might be also so that each device won't have to call reset manually from
their realize (5ab28c834) to initialize device into initial state.
> Paolo
>
> >> + hotplug_handler_post_plug(hotplug_ctrl, dev, &local_err);
> >> + if (local_err != NULL) {
> >> + goto child_realize_fail;
> >> + }
> >> + }
> >> }
> >> dev->pending_deleted_event = false;
>
[Qemu-devel] [PATCH 2/2] virtio-scsi: fix hotplug ->reset() vs event race, Stefan Hajnoczi, 2018/07/10
Re: [Qemu-devel] [PATCH 0/2] virtio-scsi: fix hotplug ->reset() vs event race, Fam Zheng, 2018/07/10
Re: [Qemu-devel] [PATCH 0/2] virtio-scsi: fix hotplug ->reset() vs event race, l00284672, 2018/07/10