Re: [PATCH v2 42/54] KVM: x86/pmu: Implement emulated counter increment for passthrough PMU

Chen, Zide
2024-05-08T18:28:08Z

On 5/5/2024 10:30 PM, Mingwei Zhang wrote:
> @@ -896,6 +924,12 @@ void kvm_pmu_trigger_event(struct kvm_vcpu *vcpu, u64 eventsel)
> return;
>
> kvm_for_each_pmc(pmu, pmc, i, bitmap) {
> + if (is_passthrough)
> + is_pmc_allowed = pmc_speculative_in_use(pmc) &&
> + check_pmu_event_filter(pmc);
> + else
> + is_pmc_allowed = pmc_event_is_allowed(pmc);
> +

Why don't need to check pmc_is_globally_enabled() in PMU passthrough
case? Sorry if I missed something.