target/ppc: PMU: update counters on MMCR1 write
commita6f91249e064a2ee935c900529b03f949ad89e6c
authorDaniel Henrique Barboza <danielhb413@gmail.com>
Fri, 17 Dec 2021 16:57:18 +0000 (17 17:57 +0100)
committerCédric Le Goater <clg@kaod.org>
Fri, 17 Dec 2021 16:57:18 +0000 (17 17:57 +0100)
tree7d88e50eb2da676a27b12440c611f7ca213d9fa6
parent308b9fad2a301f3473e920f981d49e2ff0829029
target/ppc: PMU: update counters on MMCR1 write

MMCR1 determines the events to be sampled by the PMU. Updating the
counters at every MMCR1 write ensures that we're not sampling more
or less events by looking only at MMCR0 and the PMCs.

It is worth noticing that both the Book3S PowerPC PMU, and this IBM
Power8+ PMU that we're modeling, also uses MMCRA, MMCR2 and MMCR3 to
control the PMU. These three registers aren't being handled in this
initial implementation, so for now we're controlling all the PMU
aspects using MMCR0, MMCR1 and the PMCs.

Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Message-Id: <20211201151734.654994-5-danielhb413@gmail.com>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
target/ppc/cpu_init.c
target/ppc/helper.h
target/ppc/power8-pmu-regs.c.inc
target/ppc/power8-pmu.c
target/ppc/spr_tcg.h