[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v4 12/15] Add optional parameters to QMP command
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH v4 12/15] Add optional parameters to QMP command query-cpu-definitions |
Date: |
Tue, 31 Mar 2015 13:50:57 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 |
On 03/31/2015 01:46 PM, Eduardo Habkost wrote:
> On Mon, Mar 30, 2015 at 04:28:25PM +0200, Michael Mueller wrote:
> [...]
>> ##
>> # @query-cpu-definitions:
>> #
>> # Return a list of supported virtual CPU definitions
>> #
>> +# @machine: #optional machine type (since 2.4)
>> +#
>> +# @accel: #optional accelerator id (since 2.4)
>> +#
>> # Returns: a list of CpuDefInfo
>> #
>> # Since: 1.2.0
>> ##
>> -{ 'command': 'query-cpu-definitions', 'returns': ['CpuDefinitionInfo'] }
>> +{ 'command': 'query-cpu-definitions',
>> + 'data': { '*machine': 'str', '*accel': 'AccelId' },
>> + 'returns': ['CpuDefinitionInfo'] }
>
> What happens if the new parameters are provided to an old QEMU version
> that doesn't accept them? It looks like we need an introspection
> mechanism or a new command name.
Providing an optional parameter that a new qemu understands to an older
qemu gracefully errors out about an unknown parameter. But it's
annoying to have to probe for whether the parameter is understood by
exploiting that particular error message from older qemu.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PATCH v4 08/15] target-s390x: Add KVM VM attribute interface for cpu models, (continued)
- [Qemu-devel] [PATCH v4 08/15] target-s390x: Add KVM VM attribute interface for cpu models, Michael Mueller, 2015/03/30
- [Qemu-devel] [PATCH v4 10/15] target-s390x: Prepare accelerator during cpu object realization, Michael Mueller, 2015/03/30
- [Qemu-devel] [PATCH v4 14/15] target-s390x: Introduce facility test routine, Michael Mueller, 2015/03/30
- [Qemu-devel] [PATCH v4 15/15] target-s390x: Enable cpu model usage, Michael Mueller, 2015/03/30
- [Qemu-devel] [PATCH v4 12/15] Add optional parameters to QMP command query-cpu-definitions, Michael Mueller, 2015/03/30
- [Qemu-devel] [PATCH v4 02/15] target-s390x: Introduce cpu facilities, Michael Mueller, 2015/03/30
- [Qemu-devel] [PATCH v4 13/15] target-s390x: Extend QMP command query-cpu-definitions, Michael Mueller, 2015/03/30
- [Qemu-devel] [PATCH v4 07/15] target-s390x: Update linux-headers/asm-s390/kvm.h, Michael Mueller, 2015/03/30
- [Qemu-devel] [PATCH v4 01/15] Introduce stub routine cpu_desc_avail, Michael Mueller, 2015/03/30