x86/VPMU: support only versions 2 through 4 of architectural performance monitoring
authorBoris Ostrovsky <boris.ostrovsky@oracle.com>
Thu, 10 Dec 2015 12:15:35 +0000 (13:15 +0100)
committerJan Beulich <jbeulich@suse.com>
Thu, 10 Dec 2015 12:15:35 +0000 (13:15 +0100)
commit00e248ce7f25d1e7705c87403065e1f6fd440dc8
treed6e5afdcb5b3b68925486c6a78c9ab26677ab94d
parente509b8e09c00f42348f176c0d88528f53d07ab66
x86/VPMU: support only versions 2 through 4 of architectural performance monitoring

We need to have at least version 2 since it's the first version to
support various control and status registers (such as
MSR_CORE_PERF_GLOBAL_CTRL) that VPMU relies on always having.

We don't fully emulate version 4 but since it's back compatible with
earlier versions we can fall back to v3. At this point there is no
compatibility statement for v5 so anything above 4 is not supported.

For guests querying PMU version via CPUID leaf 0xa clip it at v3.

With explicit testing for PMU version we can now remove CPUID model
check.

Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Kevin Tian <kevin.tian@intel.com>
xen/arch/x86/cpu/vpmu_intel.c