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

Re: [Xen-devel] [PATCH v3] x86/nmi: correctly check MSB of P6 performance counter MSR in watchdog



>>> On 26.02.19 at 18:06, <igor.druzhinin@xxxxxxxxxx> wrote:
> @@ -323,6 +326,13 @@ static void setup_p6_watchdog(unsigned counter)
>      unsigned int evntsel;
>  
>      nmi_perfctr_msr = MSR_P6_PERFCTR(0);
> +    if ( !nmi_p6_event_width )
> +     nmi_p6_event_width = (current_cpu_data.cpuid_level >= 0xa ) ?

Stray blank before closing paren.

> +                             MASK_EXTR(cpuid_eax(0xa), P6_EVENT_WIDTH_MASK) :
> +                             P6_EVENT_WIDTH_MIN;
> +    if ( nmi_p6_event_width < P6_EVENT_WIDTH_MIN ||
> +         nmi_p6_event_width > BITS_PER_LONG )
> +       return;

I'm almost okay with this, but I'd really like the zero field case to
be handled identical to the max-leaf-too-small one. A higher
non-blank leaf existing does not mean the leaf here is meaningful.
Or taking it the other way around, max-leaf-too-small should be
no different from an all-blank leaf.

Jan



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.