qemu-block
[Top][All Lists]
Advanced

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

Re: [PATCH v8 0/8] hmp, qmp: Add commands to introspect virtio devices


From: Dr. David Alan Gilbert
Subject: Re: [PATCH v8 0/8] hmp, qmp: Add commands to introspect virtio devices
Date: Thu, 28 Oct 2021 10:04:47 +0100
User-agent: Mutt/2.0.7 (2021-05-04)

* Jonah Palmer (jonah.palmer@oracle.com) wrote:
> 
> On 10/27/21 07:55, Daniel P. Berrangé wrote:
> > On Wed, Oct 27, 2021 at 07:41:41AM -0400, Jonah Palmer wrote:
> > > This series introduces new QMP/HMP commands to dump the status of a
> > > virtio device at different levels.
> > > 
> > > [Jonah: Rebasing previous patchset from Oct. 5 (v7). Original patches
> > >   are from Laurent Vivier from May 2020.
> > > 
> > >   Rebase from v7 to v8 includes an additional assert to make sure
> > >   we're not returning NULL in virtio_id_to_name(). Rebase also
> > >   includes minor additions/edits to qapi/virtio.json.]
> > > 
> > > 1. Main command
> > > 
> > > HMP Only:
> > > 
> > >      virtio [subcommand]
> > > 
> > >      Example:
> > > 
> > >          List all sub-commands:
> > > 
> > >          (qemu) virtio
> > >          virtio query  -- List all available virtio devices
> > >          virtio status path -- Display status of a given virtio device
> > >          virtio queue-status path queue -- Display status of a given 
> > > virtio queue
> > >          virtio vhost-queue-status path queue -- Display status of a 
> > > given vhost queue
> > >          virtio queue-element path queue [index] -- Display element of a 
> > > given virtio queue
> > I don't see a compelling reason why these are setup as sub-commands
> > under a new "virtio" top level. This HMP approach and the QMP 
> > 'x-debug-query'
> > naming just feels needlessly different from the current QEMU practices.
> > 
> > IMHO they should just be "info" subcommands for HMP. ie
> > 
> >           info virtio  -- List all available virtio devices
> >           info virtio-status path -- Display status of a given virtio device
> >           info virtio-queue-status path queue -- Display status of a given 
> > virtio queue
> >           info virtio-vhost-queue-status path queue -- Display status of a 
> > given vhost queue
> >           info virtio-queue-element path queue [index] -- Display element 
> > of a given virtio queue
> > 
> > While the corresponding QMP commands ought to be
> > 
> >           x-query-virtio
> >           x-query-virtio-status
> >           x-query-virtio-queue-status
> >           x-query-virtio-vhost-queue-status
> >           x-query-virtio-queue-element
> > 
> > 
> > Regards,
> > Daniel
> 
> Sure, I don't mind changing it to this if this is what others would prefer.
> If there aren't any objections, I'll switch it to this in the next revision.

I agree with Dan that there's no need for the extra level; however
you could do it all in one HMP command I think:

  info virtio -- list all available virtio devices
  info virtio path  -- Display status of a given virtio device
  info virtio path queue -- Display status of a given virtio queue
  info virtio -h path queue -- Display status of a given vhost queue
  info virtio -e path queue [index] -- Display element of a given virtio
queue

It wouldn't need to change the qmp commands underneath unless it made
sense.

Dave

> Jonah
-- 
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK




reply via email to

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