]> asedeno.scripts.mit.edu Git - linux.git/commit
perf/x86/intel/pt: Introduce intel_pt_validate_cap()
authorLuwei Kang <luwei.kang@intel.com>
Wed, 24 Oct 2018 08:05:07 +0000 (16:05 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 21 Dec 2018 10:28:32 +0000 (11:28 +0100)
commit61be2998ca541f7d9f487479b2ec519d83328085
tree6c6f53ba15963a0b25f60b8244617b5d337ecc14
parentf6d079ce867d679e4dffef5b3112c7634215fd88
perf/x86/intel/pt: Introduce intel_pt_validate_cap()

intel_pt_validate_hw_cap() validates whether a given PT capability is
supported by the hardware. It checks the PT capability array which
reflects the capabilities of the hardware on which the code is executed.

For setting up PT for KVM guests this is not correct as the capability
array for the guest can be different from the host array.

Provide a new function to check against a given capability array.

Acked-by: Song Liu <songliubraving@fb.com>
Signed-off-by: Luwei Kang <luwei.kang@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/events/intel/pt.c
arch/x86/include/asm/intel_pt.h