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

Re: [PATCH] x86/Intel: avoid UB with NMI watchdog on family 15 CPUs


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Thu, 19 Nov 2020 17:12:40 +0000
  • Authentication-results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: Wei Liu <wl@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Thu, 19 Nov 2020 17:12:48 +0000
  • Ironport-sdr: aFl85dS2FUjx5v5H/nbfX9iVLtW+1T2O3EZyt10CJbZ00RvRbGaNYgrwWN/pc7/IVpMULGEq09 +a7i6TOG6EjCUbXn1hF6VLTpXtppYX+pY7Xw5LhfQ9Gh5hEoPUM7ggL4mtduQaKOPdf0CCZDjZ peF7ri3qDwbpSKhuqLYrgzbBogQ7B9DjvUjywaRVj3REAkCQjPecSjxAoh7K2RM7B3NFVIwcXw a3/WcW9Ega5ISKsiH+p/VmKHW8zb7wwN42znHxlH/58DW18L/wSehAsxEMPPI0yvjkGx23KXCF en4=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 19/11/2020 17:10, Andrew Cooper wrote:
> On 19/11/2020 16:37, Jan Beulich wrote:
>> On 19.11.2020 17:10, Andrew Cooper wrote:
>>> On 19/11/2020 15:57, Jan Beulich wrote:
>>>> Found by looking for patterns similar to the one Julien did spot in
>>>> pci_vtd_quirks().
>>>>
>>>> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
>>> Subject is wonky.  Is it P4 (Intel), or Fam15 (AMD) ?  I'd be tempted to
>>> have the prefix as x86/nmi: either way.
>> With this code:
>>
>>     case X86_VENDOR_INTEL:
>>         switch (boot_cpu_data.x86) {
>>         case 6:
>>             setup_p6_watchdog((boot_cpu_data.x86_model < 14) 
>>                               ? P6_EVENT_CPU_CLOCKS_NOT_HALTED
>>                               : CORE_EVENT_CPU_CLOCKS_NOT_HALTED);
>>             break;
>>         case 15:
>>             if (!setup_p4_watchdog())
>>
>> I think qualifying it like I did is quite reasonable. Hence ...
>>
>>> With that suitably adjusted, Acked-by: Andrew Cooper
>>> <andrew.cooper3@xxxxxxxxxx>
>> ... I'd prefer to keep it as is - please clarify.
> Oh - original Xeon's.  I'd honestly forgotten that quirk of history.
>
> I'd recommend "x86/nmi: Avoid UB in for P4-era watchdogs" to avoid the
> ambiguity altogether.

And if I could actually english, that would read "Avoid UB for P4-".

~Andrew



 


Rackspace

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