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

Re: [Xen-devel] Xen crash: map_domain_page() on an NMI path

>>> Andrew Cooper <andrew.cooper3@xxxxxxxxxx> 12/18/13 8:37 PM >>>
>However, the interesting point is the nested crash.  This is a failed
>assertion while attempting to execute the kexec crash path.  Xen is
>4.3.1 based, and built with debug, so the stack trace below is generated
>with frame pointers, and is correct.
>Here, we have managed to re-enter the __context_switch() path because of
>an NMI interrupting it.  The sync_local_execstate() in map_domain_page()
>is by way of mapcache_current_vcpu().
>I am struggling to work out how best to fix this.  Would it be best for
>the crash path to unconditionally change to the idle_pagetables and use

It is wrong to at all call map_domain_page() in NMI context, so fixing the
environment for it to get invoked is not the right solution in any case (or
else you'd have to fix more than this, like forcibly making the spin lock
available that the code will want to acquire subsequently).

As with anything else on the NMI path, and as you probably know better
than me - great care is needed in every piece of code that may get
invoked here. I don't think we want to make map_domain_page() usable
in NMI context; instead I would think map_vtd_domain_page() might
better learn of possibly getting called this way, and use fixmaps in that
case (assuming we can determine a reasonably low maximum number of
pages that may need to be mapped this way at any one time - ideally that
would turn out to be just one).


Xen-devel mailing list



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