]> git.ipfire.org Git - thirdparty/kernel/stable.git/blobdiff - arch/x86/kvm/pmu_amd.c
KVM: x86/pmu: mask the result of rdpmc according to the width of the counters
[thirdparty/kernel/stable.git] / arch / x86 / kvm / pmu_amd.c
index 50fa9450fcf11d1ef6f27d078bab3a71d5075cd4..d3118088f1cd32711a4db8e6dba0ac6d938c2ef9 100644 (file)
@@ -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;