qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v6 2/4] qapi: add DEVICE_ON and query-hotplug infrastructure


From: Vladimir Sementsov-Ogievskiy
Subject: Re: [PATCH v6 2/4] qapi: add DEVICE_ON and query-hotplug infrastructure
Date: Fri, 10 Mar 2023 00:55:14 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2

On 07.03.23 20:31, Michael S. Tsirkin wrote:
On Tue, Mar 07, 2023 at 07:05:35PM +0300, Vladimir Sementsov-Ogievskiy wrote:
We have DEVICE_DELETED event, that signals that device_del command is
actually completed. But we don't have a counter-part for device_add.
Still it's sensible for SHPC and PCIe-native hotplug, as there are time
when the device in some intermediate state. Let's add an event that say
that the device is finally powered on, power indicator is on and
everything is OK for next manipulation on that device.

Motivations:
1. To be sure that device is "accepted" by guest. Guest may ignore
hotplugged device for some reason (for example during OS booting).
Management wants to catch this and handle the problem, instead of
silent assume that everything is OK. So, if we don't get the event by
some timeout, we can report an error, try to unplug/plug the disk again
or do some other things to handle the problem.

2. The device can't be removed (by blockdev-del) while power indicator
of hotplug controller is blinking (QEMU reports "guest is busy (power
indicator blinking)"). So, management should avoid removing the device
until it gets the DEVICE_ON event.
(Probably, better solution for this point is to automatically postpone
deletion until power indicator stops blinking)

3. Also, management tool may make a GUI visualization of power
indicator with help of this event.

As a counter-part add query-hotplug command, that shows "device-on"
state as well as some addtional information.

I wanted to say s/as/and/ :)


Signed-off-by: Vladimir Sementsov-Ogievskiy<vsementsov@yandex-team.ru>
 From commit log it sounds you are just adding one new event.
In fact there's more new stuff in qdev.json

Pls document in commit log too.



But yes "some additional information" is not enough. Maybe, something like:

"""
New query-hotplug command in additon to "device-on" state also provides
SHPC/PCIe-native specific hotplug controller properties (like leds) that
may help to determine real state of hotplug controller. That may help to
get additional information for further debugging when DEVICE_ON / DEVICE_DELETED
not come in time as expected.
"""



--
Best regards,
Vladimir




reply via email to

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