From: Damien Hedde <damien.hedde@greensocs.com>
To: Peter Maydell <peter.maydell@linaro.org>,
Igor Mammedov <imammedo@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
QEMU Developers <qemu-devel@nongnu.org>,
Stefan Hajnoczi <stefanha@redhat.com>,
Eduardo Habkost <ehabkost@redhat.com>
Subject: Re: qom device lifecycle interaction with hotplug/hotunplug ?
Date: Fri, 29 Nov 2019 14:05:23 +0100 [thread overview]
Message-ID: <119190aa-a9f6-ae5c-b51c-98568287036c@greensocs.com> (raw)
In-Reply-To: <CAFEAcA_gcxqu+N5iV0L5WLyWmm5yxTFNMtmqQryBgVd4CCCT8A@mail.gmail.com>
On 11/29/19 1:45 PM, Peter Maydell wrote:
> On Fri, 29 Nov 2019 at 12:26, Igor Mammedov <imammedo@redhat.com> wrote:
>> But from the my very limited understanding, on real hardware,
>> once device is uplugged it's gone (finalized) from machine
>> perspective, so it's unclear to my why someone would use
>> realize->unrealize->realize hotplug scenario.
>
> Well, on real hardware 'unplug' is different from 'unrealize'.
> So I think for QEMU if we wanted to allow this sort of 'unplug
> and replug the same device' we should do it by:
>
> instance_init -> realize -> plug -> unplug -> plug -> unplug ->
> unrealize -> finalize
>
> So unrealize/finalize is when the device is actually destroyed,
> and if you're going to replug the device you don't destroy it
> on unplug.
>
Hello everybody,
What I was initially wondering (or afraid of) when this question/problem
comes to me is;
Are there some cases where QEMU does the following (in the context of an
hotplugged device):
instance_init -> realize (and plug) -> unrealize -> change some
properties -> realize
with no unplug / plug in between
because I have the impression, the realize was here to allow setting
properties. But it may be pure nonsense as I do not know well the
underlying mechanisms there.
Regards,
--
Damien
next prev parent reply other threads:[~2019-11-29 13:57 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-28 16:00 qom device lifecycle interaction with hotplug/hotunplug ? Peter Maydell
2019-11-28 16:33 ` Eduardo Habkost
2019-11-29 12:40 ` Igor Mammedov
2019-11-29 19:53 ` Eduardo Habkost
2019-11-28 17:27 ` Igor Mammedov
2019-11-28 17:57 ` Peter Maydell
2019-11-29 12:26 ` Igor Mammedov
2019-11-29 12:45 ` Peter Maydell
2019-11-29 13:05 ` Damien Hedde [this message]
2019-11-29 14:23 ` Igor Mammedov
2019-11-29 20:05 ` Eduardo Habkost
2019-11-30 11:10 ` Peter Maydell
2019-12-03 21:40 ` Eduardo Habkost
2019-12-04 9:18 ` Jens Freimann
2019-12-04 14:35 ` Eduardo Habkost
2019-12-04 16:21 ` Jens Freimann
2019-12-04 18:51 ` Eduardo Habkost
2019-12-11 12:52 ` Damien Hedde
2019-12-18 15:14 ` Jens Freimann
2019-12-11 16:01 ` 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=119190aa-a9f6-ae5c-b51c-98568287036c@greensocs.com \
--to=damien.hedde@greensocs.com \
--cc=ehabkost@redhat.com \
--cc=imammedo@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--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).