Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1204838
| From | Andrew Jones <drjones@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [KVM x86 vPMU Patch 2/2] KVM: x86/vPMU: Fix unnecessary signed extension for AMD PERFCTRn |
| Date | 2015-08-11 09:40 +0200 |
| Message-ID | <pWck9-6P2-3@gated-at.bofh.it> (permalink) |
| References | <pUVY6-11L-3@gated-at.bofh.it> <pUVY7-11L-21@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Fri, Aug 07, 2015 at 03:53:30PM -0400, Wei Huang wrote:
> 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>
> ---
> arch/x86/kvm/pmu_amd.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/arch/x86/kvm/pmu_amd.c b/arch/x86/kvm/pmu_amd.c
> index 886aa25..39b9112 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;
> }
> --
> 1.8.3.1
Reviewed-by: Andrew Jones <drjones@redhat.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[KVM x86 vPMU Patch 0/2] Two vPMU Trivial Patches Wei Huang <wei@redhat.com> - 2015-08-07 22:00 +0200
[KVM x86 vPMU Patch 1/2] KVM: x86/vPMU: Move the definition of kvm_pmu_ops to arch-specific files Wei Huang <wei@redhat.com> - 2015-08-07 22:00 +0200
Re: [KVM x86 vPMU Patch 1/2] KVM: x86/vPMU: Move the definition of kvm_pmu_ops to arch-specific files Andrew Jones <drjones@redhat.com> - 2015-08-11 09:40 +0200
[KVM x86 vPMU Patch 2/2] KVM: x86/vPMU: Fix unnecessary signed extension for AMD PERFCTRn Wei Huang <wei@redhat.com> - 2015-08-07 22:00 +0200
Re: [KVM x86 vPMU Patch 2/2] KVM: x86/vPMU: Fix unnecessary signed extension for AMD PERFCTRn Andrew Jones <drjones@redhat.com> - 2015-08-11 09:40 +0200
Re: [KVM x86 vPMU Patch 0/2] Two vPMU Trivial Patches Paolo Bonzini <pbonzini@redhat.com> - 2015-08-11 15:30 +0200
Re: [KVM x86 vPMU Patch 0/2] Two vPMU Trivial Patches Wei Huang <wei@redhat.com> - 2015-08-11 17:00 +0200
csiph-web