diff options
author | Daniel Henrique Barboza <danielhb413@gmail.com> | 2021-12-17 17:57:18 +0100 |
---|---|---|
committer | Cédric Le Goater <clg@kaod.org> | 2021-12-17 17:57:18 +0100 |
commit | 1474ba6d100179c248fed6c67756814a6fa89432 (patch) | |
tree | a2b8fd65eb3d47243bf6fc8c36a4a2669e577b53 /page-vary-common.c | |
parent | a6f91249e064a2ee935c900529b03f949ad89e6c (diff) | |
download | qemu-1474ba6d100179c248fed6c67756814a6fa89432.zip qemu-1474ba6d100179c248fed6c67756814a6fa89432.tar.gz qemu-1474ba6d100179c248fed6c67756814a6fa89432.tar.bz2 |
target/ppc: enable PMU counter overflow with cycle events
The PowerISA v3.1 defines that if the proper bits are set (MMCR0_PMC1CE
for PMC1 and MMCR0_PMCjCE for the remaining PMCs), counter negative
conditions are enabled. This means that if the counter value overflows
(i.e. exceeds 0x80000000) a performance monitor alert will occur. This alert
can trigger an event-based exception (to be implemented in the next patches)
if the MMCR0_EBE bit is set.
For now, overflowing the counter when the PMC is counting cycles will
just trigger a performance monitor alert. This is done by starting the
overflow timer to expire in the moment the overflow would be occuring. The
timer will call fire_PMC_interrupt() (via cpu_ppc_pmu_timer_cb) which will
trigger the PMU alert and, if the conditions are met, an EBB exception.
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Message-Id: <20211201151734.654994-6-danielhb413@gmail.com>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
Diffstat (limited to 'page-vary-common.c')
0 files changed, 0 insertions, 0 deletions