#define pr_fmt(fmt) …
#include <linux/types.h>
#include <linux/kvm_host.h>
#include <linux/perf_event.h>
#include "x86.h"
#include "cpuid.h"
#include "lapic.h"
#include "pmu.h"
#include "svm.h"
enum pmu_type { … };
static struct kvm_pmc *amd_pmu_get_pmc(struct kvm_pmu *pmu, int pmc_idx)
{ … }
static inline struct kvm_pmc *get_gp_pmc_amd(struct kvm_pmu *pmu, u32 msr,
enum pmu_type type)
{ … }
static int amd_check_rdpmc_early(struct kvm_vcpu *vcpu, unsigned int idx)
{ … }
static struct kvm_pmc *amd_rdpmc_ecx_to_pmc(struct kvm_vcpu *vcpu,
unsigned int idx, u64 *mask)
{ … }
static struct kvm_pmc *amd_msr_idx_to_pmc(struct kvm_vcpu *vcpu, u32 msr)
{ … }
static bool amd_is_valid_msr(struct kvm_vcpu *vcpu, u32 msr)
{ … }
static int amd_pmu_get_msr(struct kvm_vcpu *vcpu, struct msr_data *msr_info)
{ … }
static int amd_pmu_set_msr(struct kvm_vcpu *vcpu, struct msr_data *msr_info)
{ … }
static void amd_pmu_refresh(struct kvm_vcpu *vcpu)
{ … }
static void amd_pmu_init(struct kvm_vcpu *vcpu)
{ … }
struct kvm_pmu_ops amd_pmu_ops __initdata = …;