@@ -1,5 +1,5 @@
/*
- * vpmu.c: PMU virtualization for HVM domain.
+ * vpmu_amd.c: AMD specific PMU virtualization.
*
* Copyright (c) 2010, Advanced Micro Devices, Inc.
* Parts of this code are Copyright (c) 2007, Intel Corporation
@@ -480,7 +480,7 @@ static void cf_check amd_vpmu_dump(const struct vcpu *v)
}
}
-static int cf_check svm_vpmu_initialise(struct vcpu *v)
+static int cf_check amd_vpmu_initialise(struct vcpu *v)
{
struct xen_pmu_amd_ctxt *ctxt;
struct vpmu_struct *vpmu = vcpu_vpmu(v);
@@ -527,7 +527,7 @@ static int cf_check amd_allocate_context(struct vcpu *v)
#endif
static const struct arch_vpmu_ops __initconst_cf_clobber amd_vpmu_ops = {
- .initialise = svm_vpmu_initialise,
+ .initialise = amd_vpmu_initialise,
.do_wrmsr = amd_vpmu_do_wrmsr,
.do_rdmsr = amd_vpmu_do_rdmsr,
.do_interrupt = amd_vpmu_do_interrupt,
@@ -1,5 +1,5 @@
/*
- * vpmu_core2.c: CORE 2 specific PMU virtualization for HVM domain.
+ * vpmu_intel.c: CORE 2 specific PMU virtualization.
*
* Copyright (c) 2007, Intel Corporation.
*
@@ -833,7 +833,7 @@ static void cf_check core2_vpmu_destroy(struct vcpu *v)
vpmu_clear(vpmu);
}
-static int cf_check vmx_vpmu_initialise(struct vcpu *v)
+static int cf_check core2_vpmu_initialise(struct vcpu *v)
{
struct vpmu_struct *vpmu = vcpu_vpmu(v);
u64 msr_content;
@@ -898,7 +898,7 @@ static int cf_check vmx_vpmu_initialise(struct vcpu *v)
}
static const struct arch_vpmu_ops __initconst_cf_clobber core2_vpmu_ops = {
- .initialise = vmx_vpmu_initialise,
+ .initialise = core2_vpmu_initialise,
.do_wrmsr = core2_vpmu_do_wrmsr,
.do_rdmsr = core2_vpmu_do_rdmsr,
.do_interrupt = core2_vpmu_do_interrupt,
PMU virtualization is not dependent on the hardware virtualization support. Rename {svm,vmx}_vpmu_initialise to {amd,core2}_vpmu_initialise because the {svm,vmx} prefix is misleading. Take the opportunity to remove the also misleading comment stating that vpmu is specific to hvm guests, and correct the filename. No functional change intended. Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com> --- xen/arch/x86/cpu/vpmu_amd.c | 6 +++--- xen/arch/x86/cpu/vpmu_intel.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-)