From: Eric Blake <eblake@redhat.com>
To: Dongli Zhang <dongli.zhang@oracle.com>, qemu-devel@nongnu.org
Cc: berrange@redhat.com, ehabkost@redhat.com, mst@redhat.com,
joe.jin@oracle.com, dgilbert@redhat.com, armbru@redhat.com,
pbonzini@redhat.com, joao.m.martins@oracle.com
Subject: Re: [PATCH RFC 1/2] qdev: add debug interface to kick/call eventfd
Date: Tue, 19 Jan 2021 16:20:39 -0600 [thread overview]
Message-ID: <40324953-8c06-f4c9-60d0-224c1c9adff3@redhat.com> (raw)
In-Reply-To: <20210115002730.1279-2-dongli.zhang@oracle.com>
On 1/14/21 6:27 PM, Dongli Zhang wrote:
> The virtio device/driver (e.g., vhost-scsi) may hang due to the lost of IRQ
s/lost/loss/
> or the lost of doorbell register kick, e.g.,
and again
>
> https://lists.gnu.org/archive/html/qemu-devel/2018-12/msg01711.html
>
> This patch adds a new debug interface 'DeviceEvent' to DeviceClass to help
> narrow down if the issue is due to lost of irq/kick. So far the new
and again
> interface handles only two events: 'call' and 'kick'. Any device (e.g.,
> e1000e or vhost-scsi) may implement (e.g., via eventfd, MSI-X or legacy
> IRQ).
>
> The 'call' is to inject irq on purpose by admin for a specific device (e.g.,
> vhost-scsi) from QEMU/host to VM, while the 'kick' is to kick the doorbell
> on purpose by admin at QEMU/host side for a specific device.
>
> Signed-off-by: Dongli Zhang <dongli.zhang@oracle.com>
> ---
> +++ b/qapi/qdev.json
> @@ -124,3 +124,33 @@
> ##
> { 'event': 'DEVICE_DELETED',
> 'data': { '*device': 'str', 'path': 'str' } }
> +
> +##
> +# @x-debug-device-event:
> +#
> +# Generate device event for a specific device queue
> +#
> +# @dev: device path
> +#
> +# @event: event (e.g., kick or call) to trigger
> +#
> +# @queue: queue id
> +#
> +# Returns: Nothing on success
> +#
> +# Since: 5.3
The next release is named 6.0, not 5.3.
> +#
> +# Notes: This is used to debug VM driver hang issue. The 'kick' event is to
> +# send notification to QEMU/vhost while the 'call' event is to
> +# interrupt VM on purpose.
> +#
> +# Example:
> +#
> +# -> { "execute": "x-debug-device_event",
> +# "arguments": { "dev": "/machine/peripheral/vscsi0", "event": "kick",
> +# "queue": "1" } }
Your example has queue typed as a string...
> +# <- { "return": {} }
> +#
> +##
> +{ 'command': 'x-debug-device-event',
> + 'data': {'dev': 'str', 'event': 'str', 'queue': 'int'} }
...which does not match its actual type as an integer.
event should be an enum type (the finite choice of 'kick' or 'call', and
introspectible if we add new choices in the future) rather than an
open-coded str.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
next prev parent reply other threads:[~2021-01-19 22:21 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-15 0:27 [PATCH RFC 0/2] Add debug interface to kick/call on purpose Dongli Zhang
2021-01-15 0:27 ` [PATCH RFC 1/2] qdev: add debug interface to kick/call eventfd Dongli Zhang
2021-01-19 22:20 ` Eric Blake [this message]
2021-01-15 0:27 ` [PATCH RFC 2/2] vhost-scsi: implement DeviceEvent Dongli Zhang
2021-01-15 10:27 ` [PATCH RFC 0/2] Add debug interface to kick/call on purpose Daniel P. Berrangé
2021-01-18 16:59 ` Dr. David Alan Gilbert
2021-01-19 22:11 ` Dongli Zhang
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=40324953-8c06-f4c9-60d0-224c1c9adff3@redhat.com \
--to=eblake@redhat.com \
--cc=armbru@redhat.com \
--cc=berrange@redhat.com \
--cc=dgilbert@redhat.com \
--cc=dongli.zhang@oracle.com \
--cc=ehabkost@redhat.com \
--cc=joao.m.martins@oracle.com \
--cc=joe.jin@oracle.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/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).