From: Keir Fraser Subject: Re: [PATCH 10/13] Nested Virtualization: interrupts (svm specific) Date: Tue, 16 Nov 2010 15:45:52 +0000 Message-ID: References: <20101116150645.GE25462@whitby.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20101116150645.GE25462@whitby.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 , Christoph Egger Cc: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org On 16/11/2010 15:06, "Tim Deegan" wrote: >> +static int >> +nestedsvm_vcpu_clgi(struct vcpu *v) >> +{ >> + struct nestedsvm *svm = &vcpu_nestedsvm(v); >> + >> + /* clear gif flag */ >> + svm->ns_gif = 0; >> + local_event_delivery_disable(); /* mask events for PV drivers */ > > This function, and the stgi one below, can only operate safely on > current; if you want to keep the argument for performance then maybe > ASSERT(v == current) for sanity. I don't believe in the performance win. Functions which act correctly only on current should not be passed a vcpu parameter. -- Keir