From: Eduardo Habkost <ehabkost@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Damien Hedde <damien.hedde@greensocs.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
QEMU Developers <qemu-devel@nongnu.org>,
Stefan Hajnoczi <stefanha@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>,
Igor Mammedov <imammedo@redhat.com>,
Jens Freimann <jfreimann@redhat.com>
Subject: Re: qom device lifecycle interaction with hotplug/hotunplug ?
Date: Tue, 3 Dec 2019 18:40:04 -0300 [thread overview]
Message-ID: <20191203214004.GS14595@habkost.net> (raw)
In-Reply-To: <CAFEAcA-BkETOSpOwBegDcbO3bqxDO_a9xoTB7Fc8Ajw_+CDcFA@mail.gmail.com>
+jfreimann, +mst
On Sat, Nov 30, 2019 at 11:10:19AM +0000, Peter Maydell wrote:
> On Fri, 29 Nov 2019 at 20:05, Eduardo Habkost <ehabkost@redhat.com> wrote:
> > 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?
>
> I don't think so, but only because of the oddity that
> we put lots of devices on the 'sysbus' and claim that
> that's plugging them into the bus. The common case of
> 'realize' is where one device (say an SoC) has a bunch of child
> devices (like UARTs); the SoC's realize method realizes its child
> devices. Those devices all end up plugged into the 'sysbus'
> but there's no actual bus there, it's fictional and about
> the only thing it matters for is reset propagation (which
> we don't model right either). A few devices don't live on
> buses at all.
That's my impression as well.
>
> > Similarly, do you expect use cases that will require us to
> > implement unplug-without-unrealize?
>
> I don't know enough about hotplug to answer this one:
> it's essentially what I'm hoping you'd be able to answer.
> I vaguely had in mind that eg the user might be able to
> create a 'disk' object, plug it into a SCSI bus, then
> unplug it from the bus without the disk and all its data
> evaporating, and maybe plug it back into the SCSI
> bus (or some other SCSI bus) later ? But I don't know
> anything about how we expose that kind of thing to the
> user via QMP/HMP.
This ability isn't exposed to the user at all. Our existing
interfaces are -device, device_add and device_del.
We do have something new that sounds suspiciously similar to
"unplugged but not unrealized", though: the new hidden device
API, added by commit f3a850565693 ("qdev/qbus: add hidden device
support").
Jens, Michael, what exactly is the difference between a "hidden"
device and a "unplugged" device?
--
Eduardo
next prev parent reply other threads:[~2019-12-03 22:08 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
2019-11-30 11:10 ` Peter Maydell
2019-12-03 21:40 ` Eduardo Habkost [this message]
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=20191203214004.GS14595@habkost.net \
--to=ehabkost@redhat.com \
--cc=damien.hedde@greensocs.com \
--cc=imammedo@redhat.com \
--cc=jfreimann@redhat.com \
--cc=mst@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.