On 28/2/2023 8:06 am, Aaron Lewis wrote:
+static bool pmc_is_allowed(struct kvm_pmc *pmc)
This function name is a little less self-expressive since a programmable PMC is likely available if the counter is accessible. How about rename it to event_is_allowed(..) or pmc_cur_event_is_allowed(..) ?
+{ + return pmc_is_enabled(pmc) && pmc_speculative_in_use(pmc) && + check_pmu_event_filter(pmc); +}