qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 1/4] qdev: add DEVICE_RUNTIME_ERROR event


From: Konstantin Khlebnikov
Subject: Re: [PATCH 1/4] qdev: add DEVICE_RUNTIME_ERROR event
Date: Wed, 25 May 2022 11:26:04 +0300

24.05.2022, 22:04, "Vladimir Sementsov-Ogievskiy" <vsementsov@yandex-team.ru>:

First, cover letter is absent. Konstantin, could you please provide a description what the whole series does?

Generic device layer lack of common way to report runtime errors related to the particular device via qmp.
It seems useful to add qmp event with human readable error for device at the same level of abstraction as
qmp commands device_add \ device_del.
 
Virtio devices already have common way for reporting such errors to linking them is easy.
 
Second half is related to complete lack of handling errors for vhost backend.
For now I propose to handle them by forwarding to related virtio device.
 
Further It worth to add separate object for vhost-enpoint, because present
char-device approach doesn't provide an adequate abstraction level.

> Hmm. So we create temporary Error object just to pass it to qdev_report_runtime_error..
> I think we can avoid introducing this intermediate Error object together with new macro:
> just convert argument list to string with help of g_strdup_vprintf() in original virtio_error(),
> error_report this string and pass to qdev_report_runtime_error() (which should be simplified to get just a string).
 
This is an error path. Device going to be broken after that.
But this not end of the world situation where we could just dump everything and die.
So, we must pack full description in generic way and pass it into upper layer.
For now only human readable description is used. But it's easy to pass\use more.
 


Second, add maintainers to CC:
+Micheal
+Eric
+Markus

On 5/19/22 17:19, Konstantin Khlebnikov wrote:

 This event represents device runtime errors to give time and
 reason why device is broken.
 
 Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
 ---


The patch itself seems good to me:
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
 

--
Best regards,
Vladimir
 
 
-- 
Константин Хлебников
https://staff.yandex-team.ru/khlebnikov
 

reply via email to

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