qemu-devel
[Top][All Lists]
Advanced

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

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


From: Daniel Henrique Barboza
Subject: Re: [PATCH 1/4] qapi/qdev.json: add DEVICE_NOT_DELETED event
Date: Tue, 23 Mar 2021 15:12:27 -0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1



On 3/23/21 3:00 PM, Eric Blake wrote:
On 3/12/21 2:07 PM, Daniel Henrique Barboza wrote:
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

acknowledge

+# 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

This is a new event, and we've missed feature freeze; is this fixing a
bug that was not present in 5.2 (in which case it is fine for -rc1), or
is this a long-standing problem where one more release without the
mechanism won't make life any worse?

I believe these events I'm trying to add can be postponed to the next release.




+#
+# 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

You'll want to fix that.


Yep, in both patches (1 and 3).


Thanks,


DHB






reply via email to

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