]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
KVM: PPC: Book3S HV: Work around POWER8 performance monitor bugs
authorPaul Mackerras <paulus@samba.org>
Mon, 26 May 2014 09:48:40 +0000 (19:48 +1000)
committerAlexander Graf <agraf@suse.de>
Fri, 30 May 2014 12:26:29 +0000 (14:26 +0200)
commit9bc01a9bc77edac2ea6db62c5111a7f4335d4021
tree302ce7b1b9e01ef8489d65083300c96a151c390d
parent6c576e74fd91b93ca1eedcd9eb5200171d2ba32b
KVM: PPC: Book3S HV: Work around POWER8 performance monitor bugs

This adds workarounds for two hardware bugs in the POWER8 performance
monitor unit (PMU), both related to interrupt generation.  The effect
of these bugs is that PMU interrupts can get lost, leading to tools
such as perf reporting fewer counts and samples than they should.

The first bug relates to the PMAO (perf. mon. alert occurred) bit in
MMCR0; setting it should cause an interrupt, but doesn't.  The other
bug relates to the PMAE (perf. mon. alert enable) bit in MMCR0.
Setting PMAE when a counter is negative and counter negative
conditions are enabled to cause alerts should cause an alert, but
doesn't.

The workaround for the first bug is to create conditions where a
counter will overflow, whenever we are about to restore a MMCR0
value that has PMAO set (and PMAO_SYNC clear).  The workaround for
the second bug is to freeze all counters using MMCR2 before reading
MMCR0.

Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Alexander Graf <agraf@suse.de>
arch/powerpc/include/asm/reg.h
arch/powerpc/kvm/book3s_hv_rmhandlers.S