From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Zijlstra Subject: Re: [PATCH 08/13] xen/pvticketlock: disable interrupts while blocking Date: Fri, 02 Sep 2011 16:47:06 +0200 Message-ID: <1314974826.1861.1.camel@twins> References: <38bb37e15f6e5056d5238adac945bc1837a996ec.1314922370.git.jeremy.fitzhardinge@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT Return-path: In-Reply-To: <38bb37e15f6e5056d5238adac945bc1837a996ec.1314922370.git.jeremy.fitzhardinge@citrix.com> Sender: kvm-owner@vger.kernel.org To: Jeremy Fitzhardinge Cc: "H. Peter Anvin" , Linus Torvalds , Ingo Molnar , the arch/x86 maintainers , Linux Kernel Mailing List , Nick Piggin , Avi Kivity , Marcelo Tosatti , KVM , Andi Kleen , Xen Devel , Jeremy Fitzhardinge List-Id: xen-devel@lists.xenproject.org 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? 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.