]> xenbits.xensource.com Git - xen.git/commit
x86/cpuid: Adjust the policies based on the boot time vPMU setting
authorAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 16 Jul 2018 09:21:54 +0000 (10:21 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 18 Jul 2018 10:29:49 +0000 (11:29 +0100)
commit93102b49d501175a8ebbfb1f13f06d4bc754827f
tree90f445656cfd942f4b364ae2a3592a4e47b2dda6
parent4f4fc5f6afdeb6d2da81c391408eabbc3d741996
x86/cpuid: Adjust the policies based on the boot time vPMU setting

The vPMU logic isn't integrated into the CPUID policy logic (and still
requires a fair amount of work before it can be).

The ARCH_PERFMON leaf was previously copied into all policies, unilaterally
overridden (to the same value in the general case) by the toolstack using
DOMCTL_set_cpuid, then unilaterally overridden again by Xen's runtime
logic (based on the boot time settings).

The policy retrieved with DOMCTL_get_cpu_policy needs to be accurate, so take
the boot time settings into account when creating and clipping the toolstack
policy.  The runtime logic is still required for now, to clip the maximum
reported version when necessary.

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