qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH qom-cpu 00/16 v10] target-i386: convert CPU feat


From: Igor Mammedov
Subject: Re: [Qemu-devel] [PATCH qom-cpu 00/16 v10] target-i386: convert CPU features into properties
Date: Tue, 11 Feb 2014 18:17:17 +0100

On Wed, 27 Nov 2013 23:28:40 +0100
Igor Mammedov <address@hidden> wrote:

[...]
>   target-i386: cpu: convert 'level' to static property
>   target-i386: cpu: convert 'xlevel' to static property
>   target-i386: cpu: convert 'family' to static property
>   target-i386: cpu: convert 'model' to static property
>   target-i386: cpu: convert 'stepping' to static property
>   target-i386: cpu: convert 'vendor' to static property
>   target-i386: cpu: convert 'model-id' to static property
>   target-i386: cpu: convert 'tsc-frequency' to static property
[...]
Andreas,

Taking in account that we agreed that static properties are convenient
for using with Devices and that CPU is Device now,

Could you consider applying patches [3-10/16] to your qom-cpu branch, please.

As minimum they consolidate x86 CPU properties in one properties array
and are nice codebase cleanup. Patches 3-4, replace custom setters/getters
with generic ones, replacing them with DEFINE_PROP_UINT32() one-liners.
As you can see Anthony says it's reasonable thing to do:
https://www.mail-archive.com/address@hidden/msg215491.html

As side effect of conversion it allows to leverage currently working
"legacy" commands -device/(HMP) info qtree/(QMP)device-list-properties
for x86 CPUs which provides immediate benefits (without waiting on
rewrite of everything in QOM way).

The rest of series, I'll respin utilizing current QOM infrastructure more
and make bit->name conversion local to x86 CPU code as you've suggested.
>   target-i386: set [+-]feature using static properties
>   qdev: introduce qdev_prop_find_bit()
>   target-i386: use static properties in check_features_against_host() to
>     print CPUID feature names
>   target-i386: use static properties to list CPUID features
>   target-i386: remove unused *_feature_name arrays
>   target-i386: cpu: fix invalid use of error_is_set(errp) if errp ==
>     NULL
> 
>  hw/core/qdev-properties.c    |  15 +
>  include/hw/qdev-properties.h |  13 +
>  target-i386/cpu.c            | 665 
> ++++++++++++++++++++-----------------------
>  3 files changed, 338 insertions(+), 355 deletions(-)
> 




reply via email to

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