From: Roman Kagan <rvkagan@yandex-team.ru>
To: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Cc: Markus Armbruster <armbru@redhat.com>,
qemu-devel@nongnu.org, eblake@redhat.com, eduardo@habkost.net,
berrange@redhat.com, pbonzini@redhat.com, mst@redhat.com,
yc-core@yandex-team.ru
Subject: Re: [PATCH] virtio: add VIRTQUEUE_ERROR QAPI event
Date: Tue, 20 Sep 2022 18:46:40 +0300 [thread overview]
Message-ID: <YyngYCZ0JBT/r877@rvkaganb> (raw)
In-Reply-To: <fefba94b-03c3-4c43-55bb-032740f4bd47@yandex-team.ru>
On Tue, Sep 20, 2022 at 06:10:08PM +0300, Vladimir Sementsov-Ogievskiy wrote:
> On 9/20/22 17:47, Markus Armbruster wrote:
> > Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> writes:
> >
> > > For now we only log the vhost device error, when virtqueue is actually
> > > stopped. Let's add a QAPI event, which makes possible:
> > >
> > > - collect statistics of such errors
> > > - make immediate actions: take coredums or do some other debugging
+ inform the user through a management API or UI, so that (s)he can
react somehow, e.g. reset the device driver in the guest or even build
up some automation to do so
Note that basically every inconsistency discovered during virtqueue
processing results in a silent virtqueue stop. The guest then just sees
the requests getting stuck somewhere in the device for no visible
reason. This event provides a means to inform the management layer of
this situation in a timely fashion.
> >
> > Core dumps, I presume.
> >
> > Is QMP the right tool for the job? Or could a trace point do?
>
> Management tool already can collect QMP events. So, if we want to
> forward some QMP events to other subsystems (to immediately inform
> support team, or to update some statistics) it's simple to realize for
> QMP events. But I'm not sure how to do it for trace-events.. Scanning
> trace logs is not convenient.
Right. Trace points are a debugging tool: when you expect the problem
to reproduce, you activate them and watch the logs. On the contrary,
QMP events can trigger some logic in the management layer and provide
for some recovery action.
> > > +##
> > > +# @VIRTQUEUE_ERROR:
> > > +#
> > > +# Emitted when a device virtqueue fails in runtime.
> > > +#
> > > +# @device: the device's ID if it has one
> > > +# @path: the device's QOM path
> > > +# @virtqueue: virtqueue index
> > > +# @error: error identifier
> > > +# @description: human readable description
> > > +#
> > > +# Since: 7.2
> > > +##
> > > +{ 'event': 'VIRTQUEUE_ERROR',
> > > + 'data': { '*device': 'str', 'path': 'str', 'virtqueue': 'int',
> > > + 'error': 'VirtqueueError', 'description': 'str'} }
> >
> > Can the guest trigger the event?
>
> Yes, but as I understand, only once per virtqueue.
Right, in the sense that every relevant dataplane implementation would
stop the virtqueue on such an error, so in order to trigger a new one
the driver would need to reset the device first. I guess rate-limiting
is unnecessary here.
Thanks,
Roman.
next prev parent reply other threads:[~2022-09-20 20:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-19 19:48 [PATCH] virtio: add VIRTQUEUE_ERROR QAPI event Vladimir Sementsov-Ogievskiy
2022-09-20 14:47 ` Markus Armbruster
2022-09-20 15:10 ` Vladimir Sementsov-Ogievskiy
2022-09-20 15:46 ` Roman Kagan [this message]
2022-10-12 13:24 ` Vladimir Sementsov-Ogievskiy
2022-11-01 16:54 ` Vladimir Sementsov-Ogievskiy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YyngYCZ0JBT/r877@rvkaganb \
--to=rvkagan@yandex-team.ru \
--cc=armbru@redhat.com \
--cc=berrange@redhat.com \
--cc=eblake@redhat.com \
--cc=eduardo@habkost.net \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=vsementsov@yandex-team.ru \
--cc=yc-core@yandex-team.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).