diff options
author | Wei Huang <wei@redhat.com> | 2015-08-07 15:53:30 -0400 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2015-08-11 15:19:41 +0200 |
commit | b6bb424b407ee0162fc492e6149847d0aa0034ff (patch) | |
tree | 566babd927b9e7783f76382b62ea6c800962f0f3 /arch/x86/kvm/pmu_amd.c | |
parent | 603242a88ac44771442b077e0c9cb4d3af2b796f (diff) | |
download | linux-b6bb424b407ee0162fc492e6149847d0aa0034ff.tar.bz2 |
KVM: x86/vPMU: Fix unnecessary signed extension for AMD PERFCTRn
According to AMD programmer's manual, AMD PERFCTRn is 64-bit MSR which,
unlike Intel perf counters, doesn't require signed extension. This
patch removes the unnecessary conversion in SVM vPMU code when PERFCTRn
is being updated.
Signed-off-by: Wei Huang <wei@redhat.com>
Reviewed-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/pmu_amd.c')
-rw-r--r-- | arch/x86/kvm/pmu_amd.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/arch/x86/kvm/pmu_amd.c b/arch/x86/kvm/pmu_amd.c index 886aa25a7131..39b91127ef07 100644 --- a/arch/x86/kvm/pmu_amd.c +++ b/arch/x86/kvm/pmu_amd.c @@ -133,8 +133,6 @@ static int amd_pmu_set_msr(struct kvm_vcpu *vcpu, struct msr_data *msr_info) /* MSR_K7_PERFCTRn */ pmc = get_gp_pmc(pmu, msr, MSR_K7_PERFCTR0); if (pmc) { - if (!msr_info->host_initiated) - data = (s64)data; pmc->counter += data - pmc_read_counter(pmc); return 0; } |