From: "Jan Beulich" Subject: Re: Xen crash: map_domain_page() on an NMI path Date: Fri, 20 Dec 2013 08:43:13 +0000 Message-ID: <52B41131020000780010F654@nat28.tlf.novell.com> References: <52B1F978.4090803@citrix.com> <52B308E702000078000A99D4@nat28.tlf.novell.com> <52B31C7A.5040802@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <52B31C7A.5040802@citrix.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Andrew Cooper Cc: tim@xen.org, keir@xen.org, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org >>> On 19.12.13 at 17:19, Andrew Cooper wrote: > However, for hardware pieces like this which are set up once at the > start of day, and have the hardware pointed at a chosen region, would it > be acceptable to allocate their frames low enough to be covered by the > direct map area (protected by BUG()s?) and set up their base virtual > addresses knowing that there will always be a valid mapping from any Xen > pagetables? This seems better than constantly playing around with the > mappings. That would still require further special casing in map_domain_page(). In the case here, and with 32-bit no longer a concern, a virtual mapping should rather be obtained at boot time once and for all using vmap(). > For the 'crashing' context, I was thinking of extending enum > system_state to include "panic" and "crash_single" states, where > crash_single implies "safe to not actually lock a spinlock" Integrating > this without an adverse effect on spinlock performance might be a little > tricky however. It's not just performance - depending what a particular lock protects, just ignoring the need to take the lock may end up using inconsistent state. Jan