tools/libxc: Rework xc_cpuid_set() to use {get,set}_cpu_policy()
authorAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 10 Sep 2019 16:08:13 +0000 (17:08 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 26 Sep 2019 12:40:18 +0000 (13:40 +0100)
commite5b02b085e61c43a6b8346b7bb9e0c0ee1f30ef4
treef8f61b28107c9b906924ee897f8f43a5445e3673
parent53b4a87a4c32507d9db2d35c77bafb32fc3e0900
tools/libxc: Rework xc_cpuid_set() to use {get,set}_cpu_policy()

The purpose of this change is to stop using xc_cpuid_do_domctl(), and to stop
basing decisions on a local CPUID instruction.  This is not an appropriate way
to construct policy information for other domains.

Obtain the host and domain-max policies from Xen, and mix the results as
before.  Provide rather more error logging than before.

No semantics changes to xc_cpuid_set().  There are conceptual problems with
how the function works, which will be addressed in future toolstack work.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Release-acked-by: Juergen Gross <jgross@suse.com>
tools/libxc/xc_cpuid_x86.c