From: Igor Mammedov <imammedo@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org, stefanha@redhat.com
Subject: Re: [Qemu-devel] [PATCH] call HotplugHandler->plug() as the last step in device realization
Date: Thu, 18 Oct 2018 11:57:42 +0200 [thread overview]
Message-ID: <20181018115742.7a5f840e@redhat.com> (raw)
In-Reply-To: <2890bcd3-1ebf-7b56-f99a-cadf9f8be7d8@redhat.com>
On Wed, 17 Oct 2018 13:40:00 +0200
Paolo Bonzini <pbonzini@redhat.com> wrote:
> On 16/10/2018 15:33, Igor Mammedov wrote:
> > TODO:
> > remove usage of Error** from plug() callback, we need to factor out
> > pre_plug part from plug() callbacks, before proceeding with it.
> > DavidH has recently finished it for pc-dimm/memory_devices, cpus
> > mostly have pre_plug parts factored out, but there still are parts
> > that could fail so it needs some more work to eliminate failure points
> > from plug() callbacks. Meanwhile, I'll plan to treat other misc
> > handlers (pci[e]/acpi/usb/...) and introduce pre_plug() where
> > necessary.
>
> I am not sure it's a good idea to do this first, rather than last (so
> that we risk introducing a ping-pong of bugs that appear now and are
> fixed when the other changes are made), but if others disagree I am okay
> with the patch.
It will take a time to cleanup Error** handling, but it's not
must have req for moving plug() handler to the right place,
even if error gets triggered on this patch ever it cleanly fails
device_realize().
I'm posting this first, so post_plug() won't confuse people and
won't introduce a new code that would depend on it or even worse
some plug handler would depend on plug() happening before reset.
This patch should prevent that from happening. (Error** concerns
are secondary here and I'll deal with it later on, hopefully
during 3.2 cycle)
PS:
post_plug() is recurring idea which indicates that current plug()
is misplaced. (previous instance that's slipped in, was nvdimm's
75b0713e1 which was removed later on by c7f8d0f3a5).
[...]
next prev parent reply other threads:[~2018-10-18 9:57 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-16 13:33 [Qemu-devel] [PATCH] call HotplugHandler->plug() as the last step in device realization Igor Mammedov
2018-10-16 13:56 ` Igor Mammedov
2018-10-24 13:09 ` [Qemu-devel] [qemu-s390x] " David Hildenbrand
2018-10-30 15:15 ` Igor Mammedov
2018-10-30 15:40 ` David Hildenbrand
2018-10-17 9:53 ` [Qemu-devel] " Stefan Hajnoczi
2018-10-17 10:56 ` Cornelia Huck
2018-10-17 13:05 ` Pierre Morel
2018-10-17 11:40 ` Paolo Bonzini
2018-10-18 9:57 ` Igor Mammedov [this message]
2018-10-18 14:49 ` Paolo Bonzini
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=20181018115742.7a5f840e@redhat.com \
--to=imammedo@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--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 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).