Re: [PATCH v8 07/20] KVM: ARM64: PMU: Add perf event map and introduce perf event creating function

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

 




On 2016/1/7 21:48, Marc Zyngier wrote:
>> +	if (pmc->perf_event) {
>> > +		counter = kvm_pmu_get_counter_value(vcpu, pmc->idx);
>> > +		reg = (pmc->idx == ARMV8_CYCLE_IDX)
>> > +		       ? PMCCNTR_EL0 : PMEVCNTR0_EL0 + pmc->idx;
>> > +		vcpu_sys_reg(vcpu, reg) = counter;
>> > +		perf_event_release_kernel(pmc->perf_event);
> I'm having second thoughts about this one. Don't you need to first
> disable the event? You seem to be doing it on the destroy path, and it
> worries me that we're not doing the same thing on both paths.

I didn't find the limitation to use perf_event_release_kernel, but it's
better to disable it before release. Will add.

Thanks,
-- 
Shannon

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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