From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Zijlstra Subject: Re: [PATCH 10/13] xen/pvticket: allow interrupts to be enabled while blocking Date: Fri, 02 Sep 2011 16:48:25 +0200 Message-ID: <1314974905.1861.2.camel@twins> References: <17a0f6177a71190dad30a6dcd1da93bec13a7836.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: <17a0f6177a71190dad30a6dcd1da93bec13a7836.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: > + /* Make sure an interrupt handler can't upset things in a > + partially setup state. */ > local_irq_save(flags); > > + /* > + * We don't really care if we're overwriting some other > + * (lock,want) pair, as that would mean that we're currently > + * in an interrupt context, and the outer context had > + * interrupts enabled. That has already kicked the VCPU out > + * of xen_poll_irq(), so it will just return spuriously and > + * retry with newly setup (lock,want). > + * > + * The ordering protocol on this is that the "lock" pointer > + * may only be set non-NULL if the "want" ticket is correct. > + * If we're updating "want", we must first clear "lock". > + */ > + w->lock = NULL; I mean, I don't much care about Xen code, but that's two different comment styles.