qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* qom device lifecycle interaction with hotplug/hotunplug ?
@ 2019-11-28 16:00 Peter Maydell
  2019-11-28 16:33 ` Eduardo Habkost
  2019-11-28 17:27 ` Igor Mammedov
  0 siblings, 2 replies; 20+ messages in thread
From: Peter Maydell @ 2019-11-28 16:00 UTC (permalink / raw)
  To: QEMU Developers
  Cc: Damien Hedde, Paolo Bonzini, Eduardo Habkost, Stefan Hajnoczi,
	Igor Mammedov

Hi; this is a question which came up in Damien's reset series
which I don't know the answer to:

What is the interaction of the QOM device lifecycle (instance_init/realize/
unrealize/instance_finalize) with hotplug and hot-unplug ? I couldn't
find any documentation of this but maybe I was looking in the wrong
place...

Looking at device_set_realized() it seems like we treat "realize"
as meaning "and also do the hot-plug if this is a device we're
trying to hotplug". On the other hand hot-unplug is I think the
other way around: when we get a hot-unplug event we assume that
it should also imply an "unrealize" (but just unrealizing doesn't
auto-hot-unplug) ?

Once a device is hot-unplugged (and thus unrealized) is it valid
for it to be re-hot-plugged, or is the assumption that it's then
destroyed and a fresh device is created if the user wants to plug
something in again later ? Put another way, is it valid for a qdev
device to see state transitions realize -> unrealize -> realize ?

thanks
-- PMM


^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2019-12-18 15:16 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

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).