On Tue, Aug 09, 2016 at 02:05:43PM -0400, Steven Rostedt wrote:
> +int arch_smi_count(void)
> +{
> +     unsigned long long count;
> +     int err;
> +
> +     err = rdmsrl_safe(MSR_SMI_COUNT, &count);
> +     if (err)
> +             return 0;

That's really yucky, relying on _safe() to detect availability.

Also, I just found AMD Fam15h has this counter through PMCs (event
0x2b).

> +
> +     return count;
> +}

Reply via email to