tools/libxc: Reduce feature handling complexity in xc_cpuid_apply_policy()
authorAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 2 Mar 2020 14:36:03 +0000 (14:36 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 13 May 2020 19:33:42 +0000 (20:33 +0100)
commitd8a6a8b36d864e1e56d3c63b30892cbb4e55d65c
tree37894d892a6dd49699884f26f7780da1301a4d6f
parent61be48dc029294275348443f78a5e600ef28274f
tools/libxc: Reduce feature handling complexity in xc_cpuid_apply_policy()

xc_cpuid_apply_policy() is gaining extra parameters to untangle CPUID
complexity in Xen.  While an improvement in general, it does have the
unfortunate side effect of duplicating some settings across multiple
parameters.

Rearrange the logic to only consider 'pae' if no explicit featureset is
provided.  This reduces the complexity for callers who have already provided a
pae setting in the featureset.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Paul Durrant <pdurrant@amzn.com>
Acked-by: Wei Liu <wl@xen.org>
tools/libxc/include/xenctrl.h
tools/libxc/xc_cpuid_x86.c