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

Re: [Xen-devel] [PATCH v2] x86/NMI: Allow processing unknown NMIs when watchdog is enabled


  • To: Jan Beulich <JBeulich@xxxxxxxx>
  • From: Ross Lagerwall <ross.lagerwall@xxxxxxxxxx>
  • Date: Wed, 27 Aug 2014 16:45:37 +0000
  • Accept-language: en-US
  • Cc: "Keir \(Xen.org\)" <keir@xxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxx>
  • Delivery-date: Wed, 27 Aug 2014 16:45:53 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xen.org>
  • Thread-index: AQHPwglK/0KwmjxJRk2/uiowd2S/1pvkc42AgAAzql4=
  • Thread-topic: [PATCH v2] x86/NMI: Allow processing unknown NMIs when watchdog is enabled

________________________________________
From: Jan Beulich [JBeulich@xxxxxxxx]
Sent: Wednesday, August 27, 2014 4:35 PM
To: Ross Lagerwall
Cc: Xen-devel; Keir (Xen.org)
Subject: Re: [PATCH v2] x86/NMI: Allow processing unknown NMIs when watchdog is 
enabled

>>>> On 27.08.14 at 17:11, <ross.lagerwall@xxxxxxxxxx> wrote:
>> @@ -473,14 +496,26 @@ void nmi_watchdog_tick(const struct cpu_user_regs 
>> *regs)
>>          }
>>          else if ( nmi_perfctr_msr == MSR_P6_PERFCTR0 )
>>          {
>> +            rdmsrl(MSR_P6_PERFCTR0, msr_content);
>> +            if ( msr_content & (1ULL << P6_EVENT_WIDTH) )
>> +                watchdog_tick = 0;
>> +
>>              /*
>>               * Only P6 based Pentium M need to re-unmask the apic vector but
>>               * it doesn't hurt other P6 variants.
>>               */
>>              apic_write(APIC_LVTPC, APIC_DM_NMI);
>>          }
>> +        else if ( nmi_perfctr_msr == MSR_K7_PERFCTR0 )
>> +        {
>> +            rdmsrl(MSR_K7_PERFCTR0, msr_content);
>> +            if ( msr_content & (1ULL << K7_EVENT_WIDTH) )
>> +                watchdog_tick = 0;
>> +        }
>
>Looking at the top counter bits is rather weak a check, but I guess
>there's nothing better (and considering a few more of the top
>bits would only shrink the window of mis-detection, not eliminate
>it)...
>

Well the counter counts down from some large negative number to zero. It is
sign-extended beyond *_EVENT_WIDTH, so I don't think checking (one of) the sign
bits to confirm whether it has overflowed is that bad.

Ross
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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