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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, May 09, 2024, Mi, Dapeng wrote:
> 
> On 5/9/2024 2:28 AM, Chen, Zide wrote:
> >
> > 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.
> 
> Not sure if it's because the historical reason. Since pmu->global_ctrl
> would be updated in each vm-exit right now, we may not need to skip
> pmc_is_globally_enabled() anymore. Need Mingwei to confirm.
> 
yeah, this is a historical reason and how it becomes a bug. I will fix
that in next version.




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux