All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonah Palmer <jonah.palmer@oracle.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: fam@euphon.net, mst@redhat.com, jasowang@redhat.com,
	qemu-devel@nongnu.org, kraxel@redhat.com, si-wei.liu@oracle.com,
	joao.m.martins@oracle.com, qemu-block@nongnu.org,
	david@redhat.com, marcandre.lureau@redhat.com, thuth@redhat.com,
	amit@kernel.org, michael.roth@amd.com, dgilbert@redhat.com,
	eric.auger@redhat.com, dmitrii.stepanov@cloud.ionos.com,
	stefanha@redhat.com, Boris Ostrovsky <boris.ostrovsky@oracle.com>,
	kwolf@redhat.com, laurent@vivier.eu, mreitz@redhat.com,
	pbonzini@redhat.com
Subject: Re: [PATCH v6 2/6] qmp: add QMP command x-debug-virtio-status
Date: Tue, 10 Aug 2021 02:50:04 -0400	[thread overview]
Message-ID: <e735058a-a3d0-ea1a-7cf3-90757a6ccc78@oracle.com> (raw)
In-Reply-To: <87bl69e89m.fsf@dusky.pond.sub.org>

[-- Attachment #1: Type: text/plain, Size: 2886 bytes --]


On 8/7/21 8:42 AM, Markus Armbruster wrote:
> Jonah Palmer <jonah.palmer@oracle.com> writes:
>
>> From: Laurent Vivier <lvivier@redhat.com>
>>
>> This new command shows the status of a VirtIODevice
>> (features, endianness and number of virtqueues)
>>
>> Next patch will improve output by decoding feature bits.
>>
>> Signed-off-by: Laurent Vivier <lvivier@redhat.com>
>> Signed-off-by: Jonah Palmer <jonah.palmer@oracle.com>
> [...]
>
>> diff --git a/qapi/virtio.json b/qapi/virtio.json
>> index 804adbe..4bd09c9 100644
>> --- a/qapi/virtio.json
>> +++ b/qapi/virtio.json
>> @@ -70,3 +70,79 @@
>>   ##
>>   
>>   { 'command': 'x-debug-query-virtio', 'returns': ['VirtioInfo'] }
>> +
>> +##
>> +# @VirtioStatusEndianness:
>> +#
>> +# Enumeration of endianness for VirtioDevice
>> +#
>> +# Since: 6.1
> 6.2 now, here, below, and in the remainder of this series.
>
>> +##
>> +{ 'enum': 'VirtioStatusEndianness',
>> +  'data': [ 'unknown', 'little', 'big' ]
>> +}
>> +
>> +##
>> +# @VirtioStatus:
>> +#
>> +# @device-id: VirtIODevice status
> "status"?  Really?

I'll change it to 'VirtIODevice ID' instead

>
>> +#
>> +# @device-endian: VirtIODevice device_endian
>> +#
>> +# @guest-features: VirtIODevice guest_features
>> +#
>> +# @host-features: VirtIODevice host_features
>> +#
>> +# @backend-features: VirtIODevice backend_features
>> +#
>> +# @num-vqs: number of VirtIODevice queues
>> +#
>> +# Since: 6.1
>> +#
>> +##
>> +
>> +{ 'struct': 'VirtioStatus',
>> +  'data': {
>> +    'device-id': 'int',
> VirtIODevice member @device_id is uint64_t.  Should this be 'uint16'?

Ah, yes this should be uint16. I'll update this.

>
>> +    'device-endian': 'VirtioStatusEndianness',
>> +    'guest-features': 'uint64',
>> +    'host-features': 'uint64',
>> +    'backend-features': 'uint64',
>> +    'num-vqs': 'uint16'
> virtio_get_num_queues() returns int.  Sure 'uint16' is the right type?

Yes, you're right, it should be an 'int' instead. I'll also update this.

>
>> +  }
>> +}
>> +
>> +##
>> +# @x-debug-virtio-status:
>> +#
>> +# Return the status of virtio device
> "of a virtio device"

Oops! Forgot the article, thank you.

>
>> +#
>> +# @path: QOBject path of the VirtIODevice
> "QOM path", please.
>
>> +#
>> +# Returns: status of the VirtIODevice
>> +#
>> +# Since: 6.1
>> +#
>> +# Example:
>> +#
>> +# -> { "execute": "x-debug-virtio-status",
>> +#      "arguments": {
>> +#          "path": "/machine/peripheral-anon/device[3]/virtio-backend"
>> +#      }
>> +#   }
>> +# <- { "return": {
>> +#          "backend-features": 0,
>> +#          "guest-features": 5111807911,
>> +#          "num-vqs": 3,
>> +#          "host-features": 6337593319,
>> +#          "device-endian": "little",
>> +#          "device-id": 1
>> +#      }
>> +#    }
>> +#
>> +##
>> +
>> +{ 'command': 'x-debug-virtio-status',
>> +  'data': { 'path': 'str' },
>> +  'returns': 'VirtioStatus'
>> +}

[-- Attachment #2: Type: text/html, Size: 5211 bytes --]

  reply	other threads:[~2021-08-10  6:51 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-12 10:35 [PATCH v6 0/6] hmp, qmp: Add some commands to introspect virtio devices Jonah Palmer
2021-07-12 10:35 ` [PATCH v6 1/6] qmp: add QMP command x-debug-query-virtio Jonah Palmer
2021-08-07 12:35   ` Markus Armbruster
2021-08-10  6:36     ` Jonah Palmer
2021-08-23 13:27       ` Markus Armbruster
2021-08-26  6:18         ` Jonah Palmer
2021-09-01 11:15           ` Markus Armbruster
2021-07-12 10:35 ` [PATCH v6 2/6] qmp: add QMP command x-debug-virtio-status Jonah Palmer
2021-08-07 12:42   ` Markus Armbruster
2021-08-10  6:50     ` Jonah Palmer [this message]
2021-09-03  8:26   ` Michael S. Tsirkin
2021-07-12 10:35 ` [PATCH v6 3/6] qmp: decode feature bits in virtio-status Jonah Palmer
2021-07-12 10:35 ` [PATCH v6 4/6] qmp: add QMP command x-debug-virtio-queue-status Jonah Palmer
2021-07-14  2:37   ` Jason Wang
2021-07-21  8:59     ` Jonah Palmer
2021-07-22  9:22       ` Jason Wang
2021-07-26  9:33         ` Jonah Palmer
2021-08-26  6:25           ` Jonah Palmer
2021-08-27  3:11             ` Jason Wang
2021-08-07 12:45   ` Markus Armbruster
2021-08-10  7:25     ` Jonah Palmer
2021-07-12 10:35 ` [PATCH v6 5/6] qmp: add QMP command x-debug-virtio-queue-element Jonah Palmer
2021-07-12 10:35 ` [PATCH v6 6/6] hmp: add virtio commands Jonah Palmer
2021-07-14  2:40   ` Jason Wang
2021-07-21  9:11     ` Jonah Palmer
2021-07-22  9:18       ` Jason Wang
2021-07-26  9:38         ` Jonah Palmer
2021-07-13 15:25 ` [PATCH v6 0/6] hmp,qmp: Add some commands to introspect virtio devices Michael S. Tsirkin
2021-07-14  2:42 ` [PATCH v6 0/6] hmp, qmp: " Jason Wang
2021-07-21  8:53   ` Jonah Palmer
2021-07-22  9:16     ` Jason Wang
2021-07-26  9:11       ` Jonah Palmer

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=e735058a-a3d0-ea1a-7cf3-90757a6ccc78@oracle.com \
    --to=jonah.palmer@oracle.com \
    --cc=amit@kernel.org \
    --cc=armbru@redhat.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=david@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=dmitrii.stepanov@cloud.ionos.com \
    --cc=eric.auger@redhat.com \
    --cc=fam@euphon.net \
    --cc=jasowang@redhat.com \
    --cc=joao.m.martins@oracle.com \
    --cc=kraxel@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=laurent@vivier.eu \
    --cc=marcandre.lureau@redhat.com \
    --cc=michael.roth@amd.com \
    --cc=mreitz@redhat.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=si-wei.liu@oracle.com \
    --cc=stefanha@redhat.com \
    --cc=thuth@redhat.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.