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 <danielhb...@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