From: Eduardo Habkost <ehabkost@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Damien Hedde <damien.hedde@greensocs.com>,
Igor Mammedov <imammedo@redhat.com>,
QEMU Developers <qemu-devel@nongnu.org>,
Stefan Hajnoczi <stefanha@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: qom device lifecycle interaction with hotplug/hotunplug ?
Date: Fri, 29 Nov 2019 17:05:45 -0300 [thread overview]
Message-ID: <20191129200545.GG14595@habkost.net> (raw)
In-Reply-To: <CAFEAcA_gcxqu+N5iV0L5WLyWmm5yxTFNMtmqQryBgVd4CCCT8A@mail.gmail.com>
On Fri, Nov 29, 2019 at 12:45:09PM +0000, 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.
So, to summarize the current issues:
1) realize triggers a plug operation implicitly.
2) unplug triggers unrealize implicitly.
Do you expect to see use cases that will require us to implement
realize-without-plug?
Similarly, do you expect use cases that will require us to
implement unplug-without-unrealize?
--
Eduardo
next prev parent reply other threads:[~2019-11-29 20:09 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
2019-11-29 14:23 ` Igor Mammedov
2019-11-29 20:05 ` Eduardo Habkost [this message]
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=20191129200545.GG14595@habkost.net \
--to=ehabkost@redhat.com \
--cc=damien.hedde@greensocs.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 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.