qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Question] Regarding containers "unattached/peripheral/anonymous" - thei


From: Salil Mehta
Subject: [Question] Regarding containers "unattached/peripheral/anonymous" - their relation with hot(un)plug of devices
Date: Fri, 24 Jan 2020 11:20:15 +0000

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]