linux/arch/x86/kvm/svm/pmu.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * KVM PMU support for AMD
 *
 * Copyright 2015, Red Hat, Inc. and/or its affiliates.
 *
 * Author:
 *   Wei Huang <[email protected]>
 *
 * Implementation is based on pmu_intel.c file
 */
#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)
{}

/* idx is the ECX register of RDPMC instruction */
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 =;