[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [qom-cpu PATCH 7/7] target-i386: Replace cpuid_*feature
From: |
Igor Mammedov |
Subject: |
Re: [Qemu-devel] [qom-cpu PATCH 7/7] target-i386: Replace cpuid_*features fields with a feature word array |
Date: |
Tue, 16 Apr 2013 17:45:04 +0200 |
On Mon, 15 Apr 2013 16:25:40 -0300
Eduardo Habkost <address@hidden> 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(), CPU feature-bit
> property lookup/registration, and the proposed "feature-words" property)
>
table of mapping *features to feature-words would nice here for review at
least.
The rest below could go to ---/nNotes: section
> This should also help avoid bugs like the ones introduced when we added
> cpuid_7_0_ebx_features. Today, adding a new feature word to the code
> requires chaning 5 or 6 different places in the code, and it's very easy
> to miss a problem when we forget to update one of those parts. See, for
> example:
>
> * The bug solved by commit ffa8c11f0bbf47e1b7a3a62f97bc1da591c6734a;
> (CPUID 7 leaf was not being filtered based on host capabilities)
> * The bug solved by commit 07ca59450c9a0c5df65665ce46aa8487af59a1dd
> (check/enforce flags were not checking all feature flags)
>
> Signed-off-by: Eduardo Habkost <address@hidden>
- Re: [Qemu-devel] [qom-cpu PATCH 2/7] target-i386/kvm.c: Code formatting changes, (continued)
- [Qemu-devel] [qom-cpu PATCH 4/7] target-i386/cpu.c: Break lines on kvm_cpu_fill_host(), Eduardo Habkost, 2013/04/15
- [Qemu-devel] [qom-cpu PATCH 5/7] target-i386/cpu.c: Break lines on kvm_check_features_against_host(), Eduardo Habkost, 2013/04/15
- [Qemu-devel] [qom-cpu PATCH 1/7] target-i386: Move cpuid_xlevel, cpuid_xlevel2 fields in X86CPU, Eduardo Habkost, 2013/04/15
- [Qemu-devel] [qom-cpu PATCH 6/7] target-i386/cpu.c: Break lines on builtin_x86_defs array, Eduardo Habkost, 2013/04/15
- [Qemu-devel] [qom-cpu PATCH 7/7] target-i386: Replace cpuid_*features fields with a feature word array, Eduardo Habkost, 2013/04/15
- Re: [Qemu-devel] [qom-cpu PATCH 7/7] target-i386: Replace cpuid_*features fields with a feature word array,
Igor Mammedov <=
- Re: [Qemu-devel] [qom-cpu PATCH 0/7] replace cpuid_*features fields with a featue word array (v8), Eduardo Habkost, 2013/04/16