[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC v4 00/13] qmp: query-device-slots command
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [RFC v4 00/13] qmp: query-device-slots command |
Date: |
Tue, 15 Aug 2017 13:57:50 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 |
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?
> {"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?
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [RFC v4 05/13] query-device-slots: Collapse similar entries, (continued)
- [Qemu-devel] [RFC v4 05/13] query-device-slots: Collapse similar entries, Eduardo Habkost, 2017/08/14
- [Qemu-devel] [RFC v4 06/13] qdev core: generic enumerate_slots implementation, Eduardo Habkost, 2017/08/14
- [Qemu-devel] [RFC v4 07/13] qdev: Enumerate CPU slots on query-device-slots, Eduardo Habkost, 2017/08/14
- [Qemu-devel] [RFC v4 09/13] pci: pci_bus_has_pcie_upstream_port() function, Eduardo Habkost, 2017/08/14
- [Qemu-devel] [RFC v4 08/13] ide: enumerate_slots implementation, Eduardo Habkost, 2017/08/14
- [Qemu-devel] [RFC v4 10/13] pci: device-number & function properties, Eduardo Habkost, 2017/08/14
- [Qemu-devel] [RFC v4 11/13] pci: enumerate_slots implementation, Eduardo Habkost, 2017/08/14
- [Qemu-devel] [RFC v4 12/13] usb: enumerate_slots implementation, Eduardo Habkost, 2017/08/14
- [Qemu-devel] [RFC v4 13/13] tests: Experimental query-device-slots test code, Eduardo Habkost, 2017/08/14
- Re: [Qemu-devel] [libvirt] [RFC v4 00/13] qmp: query-device-slots command, no-reply, 2017/08/14
- Re: [Qemu-devel] [RFC v4 00/13] qmp: query-device-slots command,
Eric Blake <=