qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC PATCH v2 11/15] cpu-model/s390: Add QMP command qu


From: Eric Blake
Subject: Re: [Qemu-devel] [RFC PATCH v2 11/15] cpu-model/s390: Add QMP command query-cpu-model
Date: Tue, 17 Feb 2015 11:03:11 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0

On 02/17/2015 07:24 AM, Michael Mueller wrote:
> This patch implements a new QMP request named 'query-cpu-model'.
> It returns the cpu model of cpu 0 and its backing accelerator.
> 
> request:
>   {"execute" : "query-cpu-model" }
> 
> answer:
>   {"return" : {"name": "2827-ga2", "accelerator": "kvm" }}
> 
> Alias names are resolved to their respective machine type and GA names
> already during cpu instantiation. Thus, also a cpu model like 'host'
> which is implemented as alias will return its normalized cpu model name.
> 
> Furthermore the patch implements the following functions:
> 
> - s390_cpu_typename(), returns the currently selected cpu type name or NULL
> - s390_cpu_models_used(), returns true if S390 cpu models are in use
> 
> Signed-off-by: Michael Mueller <address@hidden>
> ---
>  
> +##
> +# @CpuModelInfo:
> +#
> +# Virtual CPU model definition.
> +#
> +# @name: the name of the CPU model definition
> +#
> +# Since: 2.3.0
> +##
> +{ 'type': 'CpuModelInfo',
> +  'data': { 'name': 'str', '*accelerator': 'AccelId' } }

You didn't document '*accelerator', including mention that it is
optional (why would it not be output always?).

> +
> +##
> +# @query-cpu-model:
> +#
> +# Return to current virtual CPU model

s/to/the/

> +#
> +# Returns: CpuModelInfo
> +#
> +# Since: 2.3.0

We aren't very consistent on '2.3' vs. '2.3.0', so I won't complain
about that.

> +##
> +{ 'command': 'query-cpu-model', 'returns': 'CpuModelInfo' }

Seems reasonable from the interface point of view; I have not closely
reviewed the implementation.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]