Re: [PATCHv3 06/10] x86, perf: disable non available architectural events.

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

 



On Thu, 2011-11-10 at 14:57 +0200, Gleb Natapov wrote:
> +
> +       /* disable event that reported as not presend by cpuid */
> +       for_each_set_bit(bit, x86_pmu.events_mask,
> +                       min(x86_pmu.events_mask_len, x86_pmu.max_events))
> +               intel_perfmon_event_map[intel_event_id_to_hw_id[bit]] = 0;

I think that should read:

        for_each_set_bit(bit, x86_pmu.events_mask, ARRAY_SIZE(intel_event_id_to_hw_id))
                intel_perfmon_event_map[intel_event_id_to_hw_id[bit]] = 0;

There is no guarantee x86_pmu.max_events has any relation to the size of
intel_event_id_to_hw_id.

Changed it for you.
--
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