All of lore.kernel.org
 help / color / mirror / Atom feed
From: Igor Mammedov <imammedo@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Stefan Hajnoczi <stefanha@gmail.com>,
	Stefan Hajnoczi <stefanha@redhat.com>,
	qemu-devel@nongnu.org, l00284672 <lizhengui@huawei.com>,
	Fam Zheng <famz@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 1/2] qdev: add HotplugHandler->post_plug() callback
Date: Wed, 11 Jul 2018 16:15:02 +0200	[thread overview]
Message-ID: <20180711161502.7f087034@redhat.com> (raw)
In-Reply-To: <0a3e915f-2420-e81c-011e-132f6c518b3a@redhat.com>

On Wed, 11 Jul 2018 15:32:12 +0200
Paolo Bonzini <pbonzini@redhat.com> 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;  
> 

  reply	other threads:[~2018-07-11 14:15 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-10 15:50 [Qemu-devel] [PATCH 0/2] virtio-scsi: fix hotplug ->reset() vs event race Stefan Hajnoczi
2018-07-10 15:50 ` [Qemu-devel] [PATCH 1/2] qdev: add HotplugHandler->post_plug() callback Stefan Hajnoczi
2018-07-11 11:01   ` Paolo Bonzini
2018-07-11 13:29   ` Stefan Hajnoczi
2018-07-11 13:32     ` Paolo Bonzini
2018-07-11 14:15       ` Igor Mammedov [this message]
2018-07-11 15:22   ` Igor Mammedov
2018-07-11 16:48     ` Paolo Bonzini
2018-07-12  9:04       ` Igor Mammedov
2018-07-10 15:50 ` [Qemu-devel] [PATCH 2/2] virtio-scsi: fix hotplug ->reset() vs event race Stefan Hajnoczi
2018-07-11  1:43 ` [Qemu-devel] [PATCH 0/2] " Fam Zheng
2018-07-11  3:13 ` l00284672

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=20180711161502.7f087034@redhat.com \
    --to=imammedo@redhat.com \
    --cc=famz@redhat.com \
    --cc=lizhengui@huawei.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.com \
    --cc=stefanha@redhat.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.