qemu-ppc
[Top][All Lists]
Advanced

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

[PATCH 1/4] qapi/qdev.json: add DEVICE_NOT_DELETED event


From: Daniel Henrique Barboza
Subject: [PATCH 1/4] qapi/qdev.json: add DEVICE_NOT_DELETED event
Date: Fri, 12 Mar 2021 17:07:37 -0300

This new event informs QAPI listeners that a previously issued
'device_del' command failed to delete the device from the machine.

Note that no assertion can be made about the failure reason. The goal of
this event is to inform management that QEMU is not able to assess
whether the hotunplug is taking too long to complete or failed in the
guest and, as result, the device is not removed from QOM. When receiving
this event, users/management must check inside the guest to verify the
result of the hotunplug operation.

This scenario happens with architectures where the guest does not have
an official way to report the hotunplug error back to the hypervisor,
such as PowerPC and the pseries machine type.

Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
---
 qapi/qdev.json | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/qapi/qdev.json b/qapi/qdev.json
index b83178220b..df9a1b9e67 100644
--- a/qapi/qdev.json
+++ b/qapi/qdev.json
@@ -124,3 +124,31 @@
 ##
 { 'event': 'DEVICE_DELETED',
   'data': { '*device': 'str', 'path': 'str' } }
+
+##
+# @DEVICE_NOT_DELETED:
+#
+# Emitted whenever the device removal process expired and the device
+# still exists in QOM. This indicates that the guest took too long
+# to acknowlege the device removal, and we can not be sure of whether
+# the process will be completed in the guest later on or a guest
+# side error occurred.
+#
+# It is not safe to reuse the specified device ID.
+#
+# @device: device name
+#
+# @path: device path
+#
+# Since: 6.0
+#
+# Example:
+#
+# <- { "event": "DEVICE_NOT_DELETED",
+#      "data": { "device": "core1",
+#                "path": "/machine/peripheral/core1" },
+#      "timestamp": { "seconds": 1615570254, "microseconds": 573986 } }
+#
+##
+{ 'event': 'DEVICE_NOT_DELETED',
+  'data': { '*device': 'str', 'path': 'str' } }
\ No newline at end of file
-- 
2.29.2




reply via email to

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