From: Eduardo Habkost <ehabkost@redhat.com>
To: Eric Blake <eblake@redhat.com>
Cc: qemu-devel@nongnu.org, Markus Armbruster <armbru@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
Marcel Apfelbaum <marcel@redhat.com>,
Laine Stump <laine@redhat.com>,
libvir-list@redhat.com, Igor Mammedov <imammedo@redhat.com>
Subject: Re: [Qemu-devel] [RFC v4 00/13] qmp: query-device-slots command
Date: Tue, 15 Aug 2017 16:44:27 -0300 [thread overview]
Message-ID: <20170815194427.GV3108@localhost.localdomain> (raw)
In-Reply-To: <aaa8f7cd-5f55-0e3b-6eee-c45c9b45cbff@redhat.com>
On Tue, Aug 15, 2017 at 01:57:50PM -0500, Eric Blake wrote:
> On 08/14/2017 04:57 PM, Eduardo Habkost wrote:
> > Changelog
> > ---------
> >
> > Changes v3 -> v4:
> > * New compact representation of slot sets.
> > * New generic code to automatically merge similar slots
> > into a single entry in the command output while keeping
> > implementations of the method simpler.
> > * Example implementation of IDE and USB bus enumeration
>
> >
> > Slot sets are represented by a list of option names and sets of
> > possible values for each of those options. The command uses a
> > compact representation for the set of valid values for an option.
> > For example, the following set of 5 PCI functions:
> >
> > bus: pcie.0
> > device-number: 31
> > functions: 1,4,5,6,7
> >
> > would be represented in the JSON data as:
> >
> > {"available":false,"count":5,
> > "device-types":["pci-device"],"hotpluggable":false,
> > "opts":[
> > {"option":"function","values":[1,[4,7]]},
>
> A list (and not just a single-type list, but a list that mixes scalar
> and sublist),
>
> > {"option":"device-number","values":31},
>
> vs. a scalar. Why not a one-element array?
It was just to keep the representation as compact as possible, in
the common case of single-value sets. Probably we can drop that
feature as it saves only 2 bytes in the JSON representation.
>
> > {"option":"bus","values":"pcie.0"}],
> > "opts-complete":true}
> >
> > I planned to use QAPI alternates to model/document that in the
> > schema, but it would require implementing a few missing features
> > in QAPI alternate support.
>
> Yeah, I can see how existing QAPI alternates do not yet support arrays,
> which becomes important to your representation. Do you need help
> getting the QAPI generator improved to support a particular feature that
> you found to be lacking?
I think the lack of support for lists on alternates was the main
obstacle.
Probably we would also need to remove the restriction against
alternates with ambiguous string representations, to allow a
list/number/string/bool alternate to be defined.
Being able to set constraints on the number of elements of a list
would be nice to have, but not required.
--
Eduardo
prev parent reply other threads:[~2017-08-15 19:44 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-14 21:57 [Qemu-devel] [RFC v4 00/13] qmp: query-device-slots command Eduardo Habkost
2017-08-14 21:57 ` [Qemu-devel] [RFC v4 01/13] qmp: Define " Eduardo Habkost
2017-08-14 21:57 ` [Qemu-devel] [RFC v4 02/13] qapi: qobject_compare() helper Eduardo Habkost
2017-08-15 16:16 ` Eric Blake
2017-08-15 17:59 ` Eduardo Habkost
2017-08-14 21:57 ` [Qemu-devel] [RFC v4 03/13] qdev: Add BusClass::device_type field Eduardo Habkost
2017-08-14 21:57 ` [Qemu-devel] [RFC v4 04/13] qdev: Slot info helpers Eduardo Habkost
2017-08-14 21:57 ` [Qemu-devel] [RFC v4 05/13] query-device-slots: Collapse similar entries Eduardo Habkost
2017-08-14 21:57 ` [Qemu-devel] [RFC v4 06/13] qdev core: generic enumerate_slots implementation Eduardo Habkost
2017-08-14 21:57 ` [Qemu-devel] [RFC v4 07/13] qdev: Enumerate CPU slots on query-device-slots Eduardo Habkost
2017-08-14 21:57 ` [Qemu-devel] [RFC v4 08/13] ide: enumerate_slots implementation Eduardo Habkost
2017-08-16 21:46 ` John Snow
2017-08-17 4:54 ` Markus Armbruster
2017-08-17 18:40 ` John Snow
2017-08-18 16:57 ` Eduardo Habkost
2017-08-21 21:46 ` John Snow
2017-08-14 21:57 ` [Qemu-devel] [RFC v4 09/13] pci: pci_bus_has_pcie_upstream_port() function Eduardo Habkost
2017-08-14 21:57 ` [Qemu-devel] [RFC v4 10/13] pci: device-number & function properties Eduardo Habkost
2017-08-14 21:57 ` [Qemu-devel] [RFC v4 11/13] pci: enumerate_slots implementation Eduardo Habkost
2017-08-14 21:57 ` [Qemu-devel] [RFC v4 12/13] usb: " Eduardo Habkost
2017-08-21 11:44 ` Gerd Hoffmann
2017-08-23 17:17 ` Eduardo Habkost
2017-08-14 21:57 ` [Qemu-devel] [RFC v4 13/13] tests: Experimental query-device-slots test code Eduardo Habkost
2017-08-14 22:37 ` [Qemu-devel] [libvirt] [RFC v4 00/13] qmp: query-device-slots command no-reply
2017-08-15 18:57 ` [Qemu-devel] " Eric Blake
2017-08-15 19:44 ` Eduardo Habkost [this message]
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=20170815194427.GV3108@localhost.localdomain \
--to=ehabkost@redhat.com \
--cc=armbru@redhat.com \
--cc=eblake@redhat.com \
--cc=imammedo@redhat.com \
--cc=laine@redhat.com \
--cc=libvir-list@redhat.com \
--cc=marcel@redhat.com \
--cc=mst@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 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.