1 /* SPDX-License-Identifier: GPL-2.0 */ 2 #ifndef __KVM_X86_VMX_PMU_INTEL_H 3 #define __KVM_X86_VMX_PMU_INTEL_H 4 5 #include <linux/kvm_host.h> 6 7 bool intel_pmu_lbr_is_enabled(struct kvm_vcpu *vcpu); 8 int intel_pmu_create_guest_lbr_event(struct kvm_vcpu *vcpu); 9 10 struct lbr_desc { 11 /* Basic info about guest LBR records. */ 12 struct x86_pmu_lbr records; 13 14 /* 15 * Emulate LBR feature via passthrough LBR registers when the 16 * per-vcpu guest LBR event is scheduled on the current pcpu. 17 * 18 * The records may be inaccurate if the host reclaims the LBR. 19 */ 20 struct perf_event *event; 21 22 /* True if LBRs are marked as not intercepted in the MSR bitmap */ 23 bool msr_passthrough; 24 }; 25 26 extern struct x86_pmu_lbr vmx_lbr_caps; 27 28 #endif /* __KVM_X86_VMX_PMU_INTEL_H */ 29