On Mon, 15 Apr 2013 16:25:40 -0300 Eduardo Habkost <ehabk...@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(), 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 <ehabk...@redhat.com>