mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00

TDX KVM doesn't support PMU yet, it's future work of TDX KVM support as another patch series. For now, handle TDX by updating vcpu_to_lbr_desc() and vcpu_to_lbr_records() to return NULL. Signed-off-by: Isaku Yamahata <isaku.yamahata@intel.com> Co-developed-by: Tony Lindgren <tony.lindgren@linux.intel.com> Signed-off-by: Tony Lindgren <tony.lindgren@linux.intel.com> Signed-off-by: Rick Edgecombe <rick.p.edgecombe@intel.com> --- - Add pragma poison for to_vmx() (Paolo) Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
28 lines
751 B
C
28 lines
751 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef __KVM_X86_VMX_PMU_INTEL_H
|
|
#define __KVM_X86_VMX_PMU_INTEL_H
|
|
|
|
#include <linux/kvm_host.h>
|
|
|
|
bool intel_pmu_lbr_is_enabled(struct kvm_vcpu *vcpu);
|
|
int intel_pmu_create_guest_lbr_event(struct kvm_vcpu *vcpu);
|
|
|
|
struct lbr_desc {
|
|
/* Basic info about guest LBR records. */
|
|
struct x86_pmu_lbr records;
|
|
|
|
/*
|
|
* Emulate LBR feature via passthrough LBR registers when the
|
|
* per-vcpu guest LBR event is scheduled on the current pcpu.
|
|
*
|
|
* The records may be inaccurate if the host reclaims the LBR.
|
|
*/
|
|
struct perf_event *event;
|
|
|
|
/* True if LBRs are marked as not intercepted in the MSR bitmap */
|
|
bool msr_passthrough;
|
|
};
|
|
|
|
extern struct x86_pmu_lbr vmx_lbr_caps;
|
|
|
|
#endif /* __KVM_X86_VMX_PMU_INTEL_H */
|