On Tue, Jul 11, 2023 at 11:22:29AM +0200, Roger Pau Monne wrote: > The current implementation in libxl_cpuid_parse_config() requires > keeping a list of cpuid feature bits that should be mostly in sync > with the contents of cpufeatureset.h. > > Avoid such duplication by using the automatically generated list of > cpuid features in INIT_FEATURE_NAMES in order to map feature names to > featureset bits, and then translate from featureset bits into cpuid > leaf, subleaf, register tuple. > > Note that the full contents of the previous cpuid translation table > can't be removed. That's because some feature names allowed by libxl > are not described in the featuresets, or because naming has diverged > and the previous nomenclature is preserved for compatibility reasons. > > Should result in no functional change observed by callers, albeit some > new cpuid features will be available as a result of the change. > > While there constify cpuid_flags name field. > > Signed-off-by: Roger Pau Monné <[email protected]>
Reviewed-by: Anthony PERARD <[email protected]> Thanks, -- Anthony PERARD
