qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [Patch v1 01/29] qmp: details about CPU definitions in


From: Eduardo Habkost
Subject: Re: [Qemu-devel] [Patch v1 01/29] qmp: details about CPU definitions in query-cpu-definitions
Date: Tue, 2 Aug 2016 10:04:32 -0300
User-agent: Mutt/1.6.1 (2016-04-27)

On Tue, Aug 02, 2016 at 01:58:47PM +0200, David Hildenbrand wrote:
> It might be of interest for tooling whether a CPU definition can be safely
> used when migrating, or if e.g. CPU features might get lost during
> migration when migrationg from/to a different QEMU version or host, even if
> the same compatibility machine is used.
> 
> Also, we want to know if a CPU definition is static and will never change.
> Beause these definitions can then be used independantly of a compatibility
> machine and will always have the same feature set, they can e.g. be used
> to indicate the "host" model in libvirt later on.
> 
> Let's add optional return values to query-cpu-definitions, stating for
> each returned CPU definition, if it is migration-safe and if it is static.
> 
> Signed-off-by: David Hildenbrand <address@hidden>
> ---
>  qapi-schema.json | 11 ++++++++++-
>  1 file changed, 10 insertions(+), 1 deletion(-)
> 
> diff --git a/qapi-schema.json b/qapi-schema.json
> index 5658723..3f50c1d 100644
> --- a/qapi-schema.json
> +++ b/qapi-schema.json
> @@ -3038,10 +3038,19 @@
>  #
>  # @name: the name of the CPU definition
>  #
> +# @migration-safe: #optional whether a CPU definition can be safely used for
> +#                  migration in combination with a QEMU compatibility machine
> +#                  when migrating between different QMU versions and hosts.
> +#                  If not provided, information is not available.

I would be more explicit about migration between different hosts.
I suggest "between different QEMU versions and between hosts with
different sets of (hardware or software) capabilities".

Maybe we should make the "if not provided" case clearer. Maybe
"if not provided, information is not available and caller should
not assume the CPU model is migration-safe". We know that
existing libvirt x86 code assumes all CPU models (except "host")
are migration-safe, but it's better to advise people to not try
to make any assumptions in new code.

Later, we need to document somewhere that the "migratable"
property in "host" does not mean "migration-safe" (at least in
x86), because migration of "host" is safe only if the host
(software and hardware) capabilities are exactly the same.

For reference: in x86, all CPU models except "host" are
migration-safe.

> +#
> +# @static: #optional whether a CPU definition is static and will not change
> +#          between QEMU versions / QEMU machines. A static model is always
> +#          migration-safe. If not provided, information is not available.

I assume static models don't change depending on the
machine-type, either. If that's case, we should document that.

I believe in this case we don't need to make it optional: just
make the field always present and set it to "false" by default.

> +#
>  # Since: 1.2.0
>  ##
>  { 'struct': 'CpuDefinitionInfo',
> -  'data': { 'name': 'str' } }
> +  'data': { 'name': 'str', '*migration-safe' : 'bool', '*static' : 'bool' } }
>  
>  ##
>  # @query-cpu-definitions:
> -- 
> 2.6.6
> 

-- 
Eduardo



reply via email to

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