qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] call HotplugHandler->plug() as the last step in


From: Igor Mammedov
Subject: Re: [Qemu-devel] [PATCH] call HotplugHandler->plug() as the last step in device realization
Date: Thu, 18 Oct 2018 11:57:42 +0200

On Wed, 17 Oct 2018 13:40:00 +0200
Paolo Bonzini <address@hidden> 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).

[...]



reply via email to

[Prev in Thread] Current Thread [Next in Thread]