Message ID | 20250206-pmu_minor_fixes-v2-2-1bb0f4aeb8b4@rivosinc.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | Minor mhpmevent related fixes | expand |
diff --git a/target/riscv/pmu.c b/target/riscv/pmu.c index cf713663ee56..0408f96e6af8 100644 --- a/target/riscv/pmu.c +++ b/target/riscv/pmu.c @@ -390,7 +390,7 @@ int riscv_pmu_update_event_map(CPURISCVState *env, uint64_t value, * Expected mhpmevent value is zero for reset case. Remove the current * mapping. */ - if (!value) { + if (!(value & MHPMEVENT_IDX_MASK)) { g_hash_table_foreach_remove(cpu->pmu_event_ctr_map, pmu_remove_event_map, GUINT_TO_POINTER(ctr_idx));