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: Philippe Mathieu-Daudé
Subject: Re: [PATCH v3 13/15] qapi: add HOTPLUG_STATE event
Date: Thu, 9 Feb 2023 22:28:51 +0100
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.7.2

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"?

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

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

No real clue, just wondering...



reply via email to

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