Lines Matching full:msr
16 #include <asm/msr.h>
144 static inline struct kvm_pmc *get_fw_gp_pmc(struct kvm_pmu *pmu, u32 msr) in get_fw_gp_pmc() argument
149 return get_gp_pmc(pmu, msr, MSR_IA32_PMC0); in get_fw_gp_pmc()
186 static bool intel_is_valid_msr(struct kvm_vcpu *vcpu, u32 msr) in intel_is_valid_msr() argument
192 switch (msr) { in intel_is_valid_msr()
207 ret = get_gp_pmc(pmu, msr, MSR_IA32_PERFCTR0) || in intel_is_valid_msr()
208 get_gp_pmc(pmu, msr, MSR_P6_EVNTSEL0) || in intel_is_valid_msr()
209 get_fixed_pmc(pmu, msr) || get_fw_gp_pmc(pmu, msr) || in intel_is_valid_msr()
210 intel_pmu_is_valid_lbr_msr(vcpu, msr); in intel_is_valid_msr()
217 static struct kvm_pmc *intel_msr_idx_to_pmc(struct kvm_vcpu *vcpu, u32 msr) in intel_msr_idx_to_pmc() argument
222 pmc = get_fixed_pmc(pmu, msr); in intel_msr_idx_to_pmc()
223 pmc = pmc ? pmc : get_gp_pmc(pmu, msr, MSR_P6_EVNTSEL0); in intel_msr_idx_to_pmc()
224 pmc = pmc ? pmc : get_gp_pmc(pmu, msr, MSR_IA32_PERFCTR0); in intel_msr_idx_to_pmc()
317 * host at the time the value is read from the msr, and this avoids the in intel_pmu_handle_lbr_msrs_access()
344 u32 msr = msr_info->index; in intel_pmu_get_msr() local
346 switch (msr) { in intel_pmu_get_msr()
360 if ((pmc = get_gp_pmc(pmu, msr, MSR_IA32_PERFCTR0)) || in intel_pmu_get_msr()
361 (pmc = get_gp_pmc(pmu, msr, MSR_IA32_PMC0))) { in intel_pmu_get_msr()
366 } else if ((pmc = get_fixed_pmc(pmu, msr))) { in intel_pmu_get_msr()
371 } else if ((pmc = get_gp_pmc(pmu, msr, MSR_P6_EVNTSEL0))) { in intel_pmu_get_msr()
387 u32 msr = msr_info->index; in intel_pmu_set_msr() local
391 switch (msr) { in intel_pmu_set_msr()
422 if ((pmc = get_gp_pmc(pmu, msr, MSR_IA32_PERFCTR0)) || in intel_pmu_set_msr()
423 (pmc = get_gp_pmc(pmu, msr, MSR_IA32_PMC0))) { in intel_pmu_set_msr()
424 if ((msr & MSR_PMC_FULL_WIDTH_BIT) && in intel_pmu_set_msr()
429 !(msr & MSR_PMC_FULL_WIDTH_BIT)) in intel_pmu_set_msr()
433 } else if ((pmc = get_fixed_pmc(pmu, msr))) { in intel_pmu_set_msr()
436 } else if ((pmc = get_gp_pmc(pmu, msr, MSR_P6_EVNTSEL0))) { in intel_pmu_set_msr()
452 /* Not a known PMU MSR. */ in intel_pmu_set_msr()