qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v6] qapi: introduce 'query-cpu-model-cpuid' action


From: Eduardo Habkost
Subject: Re: [PATCH v6] qapi: introduce 'query-cpu-model-cpuid' action
Date: Tue, 20 Apr 2021 13:09:00 -0400

On Tue, Apr 20, 2021 at 07:19:40PM +0300, Valeriy Vdovin wrote:
[...]
> +##
> +# @query-cpu-model-cpuid:
> +#
> +# Returns description of a virtual CPU model, created by QEMU after cpu
> +# initialization routines. The resulting information is a reflection of a 
> parsed
> +# '-cpu' command line option, filtered by available host cpu features.
> +#
> +# Returns:  @CpuModelCpuidDescription
> +#
> +# Example:
> +#
> +# -> { "execute": "query-cpu-model-cpuid" }
> +# <- { "return": 'CpuModelCpuidDescription' }
> +#
> +# Since: 6.1
> +##
> +{ 'command': 'query-cpu-model-cpuid',
> +  'returns': 'CpuModelCpuidDescription',
> +  'if': 'defined(TARGET_I386)' }

I was assuming the command was going to get a CPU model name as
argument.

If you are only going to return info on the current CPUs, the
interface could be simplified a lot.

What about a simple `query-cpuid` command that only takes:

 { 'qom-path': 'str', # qom-path is returned by query-cpus-fast
   'eax': 'uint32',
   '*ecx': 'uint32' }

as argument, and returns

 { 'present': 'bool',
   'max_eax': 'uint32',    # max value of EAX for this range
   '*max_ecx': 'uint32',   # max value of ECX if there are subleaves
   'eax': 'uint32',
   'ebx': 'uint32',
   'ecx': 'uint32',
   'edx': 'uint32' }

?

-- 
Eduardo




reply via email to

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