[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <551AFAA1.8080003@redhat.com>
Date: Tue, 31 Mar 2015 13:50:57 -0600
From: Eric Blake <eblake@...hat.com>
To: Eduardo Habkost <ehabkost@...hat.com>,
Michael Mueller <mimu@...ux.vnet.ibm.com>
CC: qemu-devel@...gnu.org, kvm@...r.kernel.org,
linux-s390@...r.kernel.org, linux-kernel@...r.kernel.org,
Gleb Natapov <gleb@...nel.org>, Alexander Graf <agraf@...e.de>,
Christian Borntraeger <borntraeger@...ibm.com>,
"Jason J. Herne" <jjherne@...ux.vnet.ibm.com>,
Cornelia Huck <cornelia.huck@...ibm.com>,
Paolo Bonzini <pbonzini@...hat.com>,
Andreas Faerber <afaerber@...e.de>,
Richard Henderson <rth@...ddle.net>,
Daniel Hansel <daniel.hansel@...ux.vnet.ibm.com>
Subject: Re: [PATCH v4 12/15] Add optional parameters to QMP command query-cpu-definitions
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
Download attachment "signature.asc" of type "application/pgp-signature" (605 bytes)
Powered by blists - more mailing lists