perf/x86: Provide stubs of KVM helpers for non-Intel CPUs
authorSean Christopherson <sean.j.christopherson@intel.com>
Sat, 21 Dec 2019 04:45:12 +0000 (20:45 -0800)
committerBorislav Petkov <bp@suse.de>
Mon, 13 Jan 2020 18:33:56 +0000 (19:33 +0100)
commit616c59b52342b0370ab822ce88fa0ff7f3671e4a
tree4ea943c84e9efb8cf0d9039cb0ff3c7ee24c951d
parentb39033f504a7eda15dcb2465679b8d46651b3645
perf/x86: Provide stubs of KVM helpers for non-Intel CPUs

Provide stubs for perf_guest_get_msrs() and intel_pt_handle_vmx() when
building without support for Intel CPUs, i.e. CPU_SUP_INTEL=n.  Lack of
stubs is not currently a problem as the only user, KVM_INTEL, takes a
dependency on CPU_SUP_INTEL=y.  Provide the stubs for all CPUs so that
KVM_INTEL can be built for any CPU with compatible hardware support,
e.g. Centuar and Zhaoxin CPUs.

Note, the existing stub for perf_guest_get_msrs() is essentially dead
code as KVM selects CONFIG_PERF_EVENTS, i.e. the only user guarantees
the full implementation is built.

Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lkml.kernel.org/r/20191221044513.21680-19-sean.j.christopherson@intel.com
arch/x86/include/asm/perf_event.h