From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tim Deegan Subject: Re: [PATCH 4/5] xen: events, exposes evtchn_alloc_unbound_domain Date: Thu, 9 Aug 2012 11:06:05 +0100 Message-ID: <20120809100605.GC16986@ocelot.phlegethon.org> References: <1344023454-31425-1-git-send-email-jean.guyader@citrix.com> <1344023454-31425-5-git-send-email-jean.guyader@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1344023454-31425-5-git-send-email-jean.guyader@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jean Guyader Cc: xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org At 20:50 +0100 on 03 Aug (1344027053), Jean Guyader wrote: > > Exposes evtchn_alloc_unbound_domain to the rest of > Xen so we can create allocated unbound evtchn within Xen. > > Signed-off-by: Jean Guyader > @@ -161,18 +163,18 @@ static long evtchn_alloc_unbound(evtchn_alloc_unbound_t *alloc) > { > struct evtchn *chn; > struct domain *d; > - int port; > + evtchn_port_t port; > domid_t dom = alloc->dom; > - long rc; > + int rc; The function returns long; if you're tidying this up to be an int, might as well change the return type too. > > rc = rcu_lock_target_domain_by_id(dom, &d); > if ( rc ) > return rc; > > - spin_lock(&d->event_lock); > + rc = evtchn_alloc_unbound_domain(d, &port); This moves some of the setting of channel state before the xsm hook. Also, the state changes lower down in this function are no longer under the event_lock. :( Cheers, Tim.