[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2 4/6] x86: track when in #NMI context
On Tue, Feb 18, 2020 at 10:40:02AM +0000, Andrew Cooper wrote: > On 17/02/2020 18:43, Roger Pau Monne wrote: > > Add helpers to track when running in #MC context. This is modeled > > after the in_irq helpers, but does not support reentry. > > > > Note that there are no users of in_mc() introduced by the change, > > further users will be added by followup changes. > > > > Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx> > > You probably mean s/mc/nmi/ throughout the commit message, but I'm > afraid these are rather problematic. Er, yes, sorry, c&p from the previous commit and I failed to adjust it. > > NMIs can be recursively entered, especially on corner cases in the crash > path. Asserting that the crash path is not recursive can lead to never > entering the crash kernel. Is this specific to how Xen handles #NMI? Intel SDM states that #NMI is not reentrant, as further #NMIs are blocked until the execution of the iret instruction: "While an NMI interrupt handler is executing, the processor blocks delivery of subsequent NMIs until the next execu- tion of the IRET instruction. This blocking of NMIs prevents nested execution of the NMI handler. It is recommended that the NMI interrupt handler be accessed through an interrupt gate to disable maskable hardware interrupts (see Section 6.8.1, “Masking Maskable Hardware Interrupts”)." AFAICT there's no iret in do_nmi until it has finished execution. Roger. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |