qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v3 13/15] qapi: add HOTPLUG_STATE event


From: Vladimir Sementsov-Ogievskiy
Subject: Re: [PATCH v3 13/15] qapi: add HOTPLUG_STATE event
Date: Fri, 10 Feb 2023 13:47:05 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2

On 10.02.23 00:28, Philippe Mathieu-Daudé wrote:
On 9/2/23 21:08, Vladimir Sementsov-Ogievskiy wrote:
For PCIe and SHPC hotplug it's important to track led indicators,
especially the power led. Add an event that helps.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
---
  qapi/qdev.json       | 62 ++++++++++++++++++++++++++++++++++++++++++++
  include/hw/pci/pci.h | 15 +++++++++++
  hw/pci/pci.c         | 33 +++++++++++++++++++++++
  hw/pci/pcie.c        | 49 ++++++++++++++++++++++++++++++++++
  hw/pci/shpc.c        | 42 ++++++++++++++++++++++++++++++
  5 files changed, 201 insertions(+)

diff --git a/qapi/qdev.json b/qapi/qdev.json
index 2708fb4e99..40dc34f091 100644
--- a/qapi/qdev.json
+++ b/qapi/qdev.json
@@ -158,3 +158,65 @@
  ##
  { 'event': 'DEVICE_UNPLUG_GUEST_ERROR',
    'data': { '*device': 'str', 'path': 'str' } }
+
+##
+# @HotplugLedState:
+#
+# Since: 8.0
+##
+{ 'enum': 'HotplugLedState',
+  'data': [ 'on', 'blink', 'off' ] }

Could this be more helpful as generic state in "hw/misc/led.h"?

Hmm. LEDState ? Doesn't look similar..


+##
+# @HotplugPowerState:
+#
+# Since: 8.0
+##
+{ 'enum': 'HotplugPowerState',
+  'data': [ 'on', 'off' ] }

Could it be better to have a generic SwitchState in qapi/common.json?


Hmm not sure. This way I stress that it's part of PCIe spec.. Hmm. But still I 
didn't call it PCIE_*... Maybe generic OnOff in qapi/common.json would be the 
best.


--
Best regards,
Vladimir




reply via email to

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