diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2019-05-20 18:20:40 +0300 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2019-05-24 22:27:13 +0300 |
commit | 0e6f467ee28ec97f68c7b74e35ec1601bb1368a7 (patch) | |
tree | f951940ed259c245b68129f997115ff50301bccd /arch/x86/kvm/pmu_amd.c | |
parent | a80c4ec10ed9632c44c829452dc40a0443ff4e85 (diff) | |
download | linux-0e6f467ee28ec97f68c7b74e35ec1601bb1368a7.tar.xz |
KVM: x86/pmu: mask the result of rdpmc according to the width of the counters
This patch will simplify the changes in the next, by enforcing the
masking of the counters to RDPMC and RDMSR.
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, 1 insertions, 1 deletions
diff --git a/arch/x86/kvm/pmu_amd.c b/arch/x86/kvm/pmu_amd.c index 50fa9450fcf1..d3118088f1cd 100644 --- a/arch/x86/kvm/pmu_amd.c +++ b/arch/x86/kvm/pmu_amd.c @@ -186,7 +186,7 @@ static int amd_is_valid_msr_idx(struct kvm_vcpu *vcpu, unsigned idx) } /* idx is the ECX register of RDPMC instruction */ -static struct kvm_pmc *amd_msr_idx_to_pmc(struct kvm_vcpu *vcpu, unsigned idx) +static struct kvm_pmc *amd_msr_idx_to_pmc(struct kvm_vcpu *vcpu, unsigned idx, u64 *mask) { struct kvm_pmu *pmu = vcpu_to_pmu(vcpu); struct kvm_pmc *counters; |