mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
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>
This commit is contained in:
parent
308b9fad2a
commit
a6f91249e0
5 changed files with 21 additions and 1 deletions
|
@ -21,6 +21,7 @@ DEF_HELPER_1(hrfid, void, env)
|
|||
DEF_HELPER_2(store_lpcr, void, env, tl)
|
||||
DEF_HELPER_2(store_pcr, void, env, tl)
|
||||
DEF_HELPER_2(store_mmcr0, void, env, tl)
|
||||
DEF_HELPER_2(store_mmcr1, void, env, tl)
|
||||
DEF_HELPER_3(store_pmc, void, env, i32, i64)
|
||||
DEF_HELPER_2(read_pmc, tl, env, i32)
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue