summaryrefslogtreecommitdiffstats
path: root/arch/riscv/kvm/vcpu_pmu.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/riscv/kvm/vcpu_pmu.c')
-rw-r--r--arch/riscv/kvm/vcpu_pmu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/riscv/kvm/vcpu_pmu.c b/arch/riscv/kvm/vcpu_pmu.c
index 86391a5061..cee1b9ca4e 100644
--- a/arch/riscv/kvm/vcpu_pmu.c
+++ b/arch/riscv/kvm/vcpu_pmu.c
@@ -39,7 +39,7 @@ static u64 kvm_pmu_get_sample_period(struct kvm_pmc *pmc)
u64 sample_period;
if (!pmc->counter_val)
- sample_period = counter_val_mask + 1;
+ sample_period = counter_val_mask;
else
sample_period = (-pmc->counter_val) & counter_val_mask;