From: Alexey G <x1917x@gmail.com>
To: Igor Druzhinin <igor.druzhinin@citrix.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
jbeulich@suse.com, xen-devel@lists.xen.org
Subject: Re: [PATCH] x86/nmi: lower initial watchdog frequency to avoid boot hangs
Date: Wed, 7 Feb 2018 04:17:50 +1000 [thread overview]
Message-ID: <20180207041750.00000668@gmail.com> (raw)
In-Reply-To: <af6cf4c2-401f-4265-a8a6-1ebe28d45a19@citrix.com>
On Tue, 6 Feb 2018 17:21:19 +0000
Igor Druzhinin <igor.druzhinin@citrix.com> wrote:
>On 06/02/18 17:08, Alexey G wrote:
>> The major concern here is the possiblity of SMI being triggered _not_
>> by some specific I/O port access. Primarily, if it actually was a
>> periodic SMI.
>>
>> If the actual SMI source is not related to some place in the NMI
>> handler code but was eg. due to some SMI timer, lowering NMI watchdog
>> frequency might not fix the issue completely, but lower its
>> reproducibility (perhaps to some very rare occurrences). So it's
>> better be sure what was the real source of SMI.
>>
>
>This *is* related to this instruction - it was confirmed empirically.
>Removing this instruction stops SMIs from occurring and effectively
>removes the issue leaving the frequency unchanged.
Hmm, it would be interesting to know for what evil purpose does it need
to trap I/O port 61h.
BTW, on which motherboard model the issue was reproduced?
>> 2. According to the code, it looks like NMI status reading happens
>> while NMIs are still blocked -- this means that SMI handler must
>> exec IRET by itself to reset NMI blocking state -- again, this is
>> possible (eg. in unreal->protmode switching code), but not likely.
>>
>
>According to SDM one NMI might be pending while taken in SMI mode (see
>ch. 34.8). This is actually even true if NMI comes while servicing
>another NMI. So when we return to the NMI handler from SMI and finish
>it properly the next one appears immediately.
If the SMI handler doesn't mess up with NMI blocking state, it
means that SMI handler processes every reading of port 61h longer than a
watchdog NMI period duration... which is quite long. Motherboard vendor
did something very wrong with I/O trap handling in the SMI handler code
if it takes so much.
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
next prev parent reply other threads:[~2018-02-06 18:17 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-05 21:18 [PATCH] x86/nmi: lower initial watchdog frequency to avoid boot hangs Igor Druzhinin
2018-02-06 3:10 ` Alexey G
2018-02-06 14:21 ` Andrew Cooper
2018-02-06 17:08 ` Alexey G
2018-02-06 17:21 ` Igor Druzhinin
2018-02-06 18:17 ` Alexey G [this message]
2018-02-06 19:50 ` Igor Druzhinin
2018-02-07 6:35 ` Alexey G
2018-02-06 14:10 ` Andrew Cooper
2018-02-06 16:07 ` Jan Beulich
2018-02-06 16:14 ` Igor Druzhinin
2018-02-06 16:23 ` Jan Beulich
2018-02-06 16:27 ` Igor Druzhinin
2018-02-06 16:29 ` Igor Druzhinin
2018-02-06 21:51 ` Igor Druzhinin
2018-02-07 9:13 ` Jan Beulich
2018-02-07 13:01 ` Igor Druzhinin
2018-02-07 13:08 ` Jan Beulich
2018-02-07 13:24 ` Andrew Cooper
2018-02-07 15:06 ` Jan Beulich
2018-02-07 17:08 ` Andrew Cooper
2018-02-08 9:12 ` Jan Beulich
2018-02-08 12:18 ` Andrew Cooper
2018-02-13 9:03 ` Jan Beulich
2018-02-07 13:54 ` Igor Druzhinin
2018-02-08 6:37 ` Alexey G
2018-02-08 10:47 ` Igor Druzhinin
2018-02-08 12:32 ` Alexey G
2018-02-08 12:40 ` Andrew Cooper
2018-02-08 14:37 ` Alexey G
2018-02-08 15:00 ` Andrew Cooper
2018-02-08 15:28 ` Alexey G
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180207041750.00000668@gmail.com \
--to=x1917x@gmail.com \
--cc=andrew.cooper3@citrix.com \
--cc=igor.druzhinin@citrix.com \
--cc=jbeulich@suse.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).