On Oct 16 17:09, Richard Henderson wrote: > On 10/10/18 1:37 PM, Aaron Lindsay wrote: > > This both advertises that we support four counters and enables them > > because the pmu_num_counters() reads this value from PMCR. > > > > Signed-off-by: Aaron Lindsay <alind...@codeaurora.org> > > --- > > target/arm/helper.c | 8 ++++---- > > 1 file changed, 4 insertions(+), 4 deletions(-) > > It looks like this should have been folded into patch 10, > or patch 10 split to include the code changes that go with > these comment changes.
By setting PMCR.N to 4, this commit is what causes all the previous implementation of non-PMCCNTR counters to become usable by the guest - both because the OS can now detect their presence in PMCR, and because the system registers used to setup/access the counters are gated on pmu_num_counters(), which uses PMCR.N to determine if a counter is implemented. That said, I'm not against merging the two patches if you feel that is cleaner. -Aaron