From: Keir Fraser Subject: Re: [PATCH] VMX: avoid taking locks with irqs disabled Date: Mon, 20 Oct 2008 11:08:37 +0100 Message-ID: References: <20081020093023.GM3780@york.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20081020093023.GM3780@york.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Tim Deegan , xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org Oh yes. That's a class of race that I hadn't realised would be introduced by the new rendezvous code. Spinlocks which are ever taken with IRQs disabled must *always* be taken with IRQs disabled. Spinlocks which are ever taken with IRQs enabled must *always* be taken with IRQs enabled. It's quite an extra constraint on spinlock usage actually. :-( Actually this new partitioning of locks into two equivalence classes is begging for some run-time checking in debug builds. I'll sort out a patch for that. -- Keir On 20/10/08 10:30, "Tim Deegan" wrote: > Shuffle the bits of the vmexit handler that run with EFLAGS.IF == 0 up > to the top. Otherwise we end up calling spin_lock() with interrupts > disabled, which can deadlock against the time-synchronization rendezvous > code. > > Signed-off-by: Tim Deegan > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel