From: "Andreas Färber" <afaerber@suse.de>
To: Eduardo Habkost <ehabkost@redhat.com>
Cc: Igor Mammedov <imammedo@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 3/3] target-i386: replace cpuid_*features fields with a feature word array
Date: Fri, 14 Dec 2012 15:53:58 +0100 [thread overview]
Message-ID: <50CB3D86.1090105@suse.de> (raw)
In-Reply-To: <20121214122734.GR3236@otherpad.lan.raisama.net>
Am 14.12.2012 13:27, schrieb Eduardo Habkost:
> On Fri, Dec 14, 2012 at 10:38:50AM +0100, Igor Mammedov wrote:
>> On Wed, 12 Dec 2012 20:22:26 -0200
>> Eduardo Habkost <ehabkost@redhat.com> wrote:
>>
>>> This replaces the feature-bit fields on both X86CPU and x86_def_t
>>> structs with an array.
>>>
>>> With this, we will be able to simplify code that simply does the same
>>> operation on all feature words (e.g. kvm_check_features_against_host(),
>>> filter_features_for_kvm(), add_flagname_to_bitmaps(), and CPU
>>> feature-bit property lookup/registration).
>>>
>>
>> do you have a patch that simplifies kvm_check_features_against_host() using
>> this?
>
> I have a very old one, based on an older (and more complex) version of
> this series:
> https://github.com/ehabkost/qemu-hacks/commit/eb01d374baecf6df26fd6f0d0bb23f2e1547f499
>
> It's in the work/cpuid-refactor-v0.22-2012-08-31 branch in my git
> repository.
>
> That branch also has some patches to merge kvm_check_features_against_host()
> and filter_features_for_kvm() (because the purpose of
> kvm_check_features_against_host() is simply to check if anything is
> going to be filtered out by filter_features_for_kvm()).
>
> If people are happy with the approach in this series, I plan to write
> and submit cleanups for kvm_cpu_fill_host(),
> kvm_check_features_against_host(), filter_features_for_kvm(),
> add_flagname_to_bitmaps(), and the cpudef -> CPU feature copying code.
>
> There's so much code that could be cleaned up using the array, that I am
> afraid that it would cause too much conflicts in the CPU properties
> work. So I can wait until the CPU properties series are submitted before
> making the cleanups, if necessary.
As stated elsewhere, for me a proper way to define new CPU models has
higher priority than feature properties, especially now that we're
headed for a class_init based approach where properties cannot be used
for original initialization.
As suggested with my RFC I would like to take a quick, simplistic route
to subclasses where no major refactoring of data fields happens. If we
prepend a couple coding style and function movement patches, that's fine
with me. But if we do large functional refactorings > 10 patches that
change history will be clobbered by the touch-all conversion and we need
to do intensive functional testing, for which I don't see sufficient
time before the Soft Freeze, given the holidays.
When the feature bits are stored in the classes, setting them via
properties in instance_init seems like overkill (visitor overhead); we
no longer dump them in -cpu ?foo; only +feature/-feature would benefit.
Thus I assume them to mainly conflict where function signatures change
and trivially where def changes to env, making them rather orthogonal to
each other.
Regards,
Andreas
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
next prev parent reply other threads:[~2012-12-14 15:45 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-12 22:22 [Qemu-devel] [PATCH 0/3] replace cpuid_*features fields with a featue word array (v2) Eduardo Habkost
2012-12-12 22:22 ` [Qemu-devel] [PATCH 1/3] target-i386: add EXT2_PPRO_FEATURES #define Eduardo Habkost
2012-12-14 9:44 ` Igor Mammedov
2012-12-14 11:44 ` Andreas Färber
2012-12-14 12:15 ` Eduardo Habkost
2012-12-12 22:22 ` [Qemu-devel] [PATCH 2/3] target-i386/cpu.c: coding style fix Eduardo Habkost
2012-12-12 23:36 ` Igor Mammedov
2012-12-13 13:16 ` Eduardo Habkost
2012-12-12 22:22 ` [Qemu-devel] [PATCH 3/3] target-i386: replace cpuid_*features fields with a feature word array Eduardo Habkost
2012-12-14 9:38 ` Igor Mammedov
2012-12-14 12:27 ` Eduardo Habkost
2012-12-14 13:52 ` Igor Mammedov
2012-12-14 14:02 ` Eduardo Habkost
2012-12-14 14:53 ` Andreas Färber [this message]
2012-12-14 17:16 ` Eduardo Habkost
2012-12-14 15:14 ` Andreas Färber
2012-12-14 16:52 ` Eduardo Habkost
2012-12-14 17:20 ` Andreas Färber
2012-12-14 17:36 ` Eduardo Habkost
2012-12-14 17:47 ` Igor Mammedov
2012-12-14 18:32 ` Eduardo Habkost
-- strict thread matches above, loose matches on Subject: below --
2012-12-18 16:29 [Qemu-devel] [PATCH 0/3] replace cpuid_*features fields with a featue word array (v3) Eduardo Habkost
2012-12-18 16:29 ` [Qemu-devel] [PATCH 3/3] target-i386: replace cpuid_*features fields with a feature word array Eduardo Habkost
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=50CB3D86.1090105@suse.de \
--to=afaerber@suse.de \
--cc=ehabkost@redhat.com \
--cc=imammedo@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.