]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
KVM: x86/vPMU: Fix unnecessary signed extension for AMD PERFCTRn
authorWei Huang <wei@redhat.com>
Fri, 7 Aug 2015 19:53:30 +0000 (15:53 -0400)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 11 Aug 2015 13:19:41 +0000 (15:19 +0200)
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>
arch/x86/kvm/pmu_amd.c

index 886aa25a7131479b5acd64d4aa9f1600984335d2..39b91127ef07a48a3cf4313d2d0340088bf8b7c6 100644 (file)
@@ -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;
        }