From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeremy Fitzhardinge Subject: Re: [PATCH 08/13] xen/pvticketlock: disable interrupts while blocking Date: Fri, 02 Sep 2011 12:29:37 -0700 Message-ID: <4E612EA1.20007@goop.org> References: <38bb37e15f6e5056d5238adac945bc1837a996ec.1314922370.git.jeremy.fitzhardinge@citrix.com> <1314974826.1861.1.camel@twins> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1314974826.1861.1.camel@twins> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Peter Zijlstra Cc: Marcelo Tosatti , Nick Piggin , KVM , the arch/x86 maintainers , Linux Kernel Mailing List , Andi Kleen , Avi Kivity , Jeremy Fitzhardinge , "H. Peter Anvin" , Ingo Molnar , Linus Torvalds , Xen Devel List-Id: xen-devel@lists.xenproject.org On 09/02/2011 07:47 AM, Peter Zijlstra wrote: > On Thu, 2011-09-01 at 17:55 -0700, Jeremy Fitzhardinge wrote: >> From: Jeremy Fitzhardinge >> >> We need to make sure interrupts are disabled while we're relying on the >> contents of the per-cpu lock_waiting values, otherwise an interrupt >> handler could come in, try to take some other lock, block, and overwrite >> our values. > Would this make it illegal to take a spinlock from NMI context? That would be problematic. But a Xen domain wouldn't be getting NMIs - at least not standard x86 ones - so that's moot. > I know that its generally considered bad form, but there's at least one > spinlock that's only taken from NMI context and thus hasn't got any > deadlock potential. Which one? J