x86/cpuid: Factor common parsing out of parse_xen_cpuid()
authorAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 15 Dec 2021 16:30:25 +0000 (16:30 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 16 Dec 2021 20:27:13 +0000 (20:27 +0000)
commit94c3df9188d6deed6fe213754492b11b9d409262
tree857b0531e57265808f5d11cde573fba46ea37a30
parentc17072fc164a72583fda8e2b836c71d2e3f8e84d
x86/cpuid: Factor common parsing out of parse_xen_cpuid()

dom0-cpuid= is going to want to reuse the common parsing loop, so factor it
out into parse_cpuid().

Irritatingly, despite being static const, the features[] array gets duplicated
each time parse_cpuid() is inlined.  As it is a large (and ever growing with
new CPU features) datastructure, move it to being file scope so all inlines
use the same single object.

No functional change.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/cpuid.c