]> xenbits.xensource.com Git - xen.git/commit
libxl: use the cpuid feature names from cpufeatureset.h
authorRoger Pau Monne <roger.pau@citrix.com>
Tue, 25 Jul 2023 13:05:57 +0000 (15:05 +0200)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 8 Aug 2023 15:02:54 +0000 (16:02 +0100)
commit1157776c51d76706c44442235a434aaa7a59fa5f
treeeb2185d8509b8e20b08c61ee57059babd432f7b9
parentd180a3e6f6eda0216a7fb1c8b7a2c53638f4f7a1
libxl: use the cpuid feature names from cpufeatureset.h

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é <roger.pau@citrix.com>
Reviewed-by: Anthony PERARD <anthony.perard@citrix.com>
(cherry picked from commit d638fe233cb3a45105319df75df0edfed2fde5a5)
docs/man/xl.cfg.5.pod.in
tools/libs/light/libxl_cpuid.c
tools/xl/xl_parse.c