qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Question] Regarding containers "unattached/peripheral/anonymous" - their relation with hot(un)plug of devices
@ 2020-01-24 11:20 Salil Mehta
  2020-01-24 13:54 ` Igor Mammedov
  0 siblings, 1 reply; 11+ messages in thread
From: Salil Mehta @ 2020-01-24 11:20 UTC (permalink / raw)
  To: qemu-devel@nongnu.org
  Cc: pbonzini, imammedo@redhat.com, eric.auger@redhat.com,
	mst@redhat.com

Hello,
I am working on vCPU Hotplug feature for ARM64 and I am in mid of understanding some aspect of device_add/device_del interface of the QEMU.

Observations:
1. Any object initialised by qmp_device_add() gets into /machine/unattached container. I traced the flow to code leg inside  device_set_realized()
2. I could see the reverse qmp_device_del() expects the device to be in  /machine/peripheral container.
3. I could see any object initially added to unattached container did not had their parents until object_add_property_child() was called further in the leg.
    which effectively meant a new property was created and property table populated and child was parented.
4. Generally, container  /machine/peripheral was being used wherever DEVICE(dev)->id was present and non-null.

Question:
1. Wanted to confirm my understanding about the use of having separate containers like unattached, peripheral and anonymous.
2. At init time all the vcpus goes under *unattached* container. Now, qmp_device_del() cannot be used to unplug them. I am wondering
   if all the hotplug devices need to go under the *peripheral* container while they are hotplugged and during object init time as well?
3. I could not see any device being place under *anonymous* container during init time. What is the use of this container?

I would be thankful for your valuable insights and answers and help in highlighting any gap in my understanding.

Thanks in anticipation!

Best Regards
Salil


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

end of thread, other threads:[~2020-06-04 11:09 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-01-24 11:20 [Question] Regarding containers "unattached/peripheral/anonymous" - their relation with hot(un)plug of devices Salil Mehta
2020-01-24 13:54 ` Igor Mammedov
2020-01-24 15:02   ` Salil Mehta
2020-01-24 16:06     ` Igor Mammedov
2020-01-24 18:44       ` Salil Mehta
2020-01-27 15:03         ` Igor Mammedov
2020-06-03 15:13           ` Salil Mehta
2020-06-04  9:54             ` Igor Mammedov
2020-06-04 11:08               ` Salil Mehta
2020-02-03 10:40   ` Michael S. Tsirkin
2020-02-03 15:48     ` 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).