From mboxrd@z Thu Jan 1 00:00:00 1970 From: Keir Fraser Subject: Re: [PATCH V2] xen: Fix BUFIOREQ evtchn init for a stubdom. Date: Fri, 29 Jun 2012 11:12:20 +0100 Message-ID: References: <1340958413.10942.81.camel@zakaz.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1340958413.10942.81.camel@zakaz.uk.xensource.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: Ian Campbell , Anthony PERARD Cc: Stefano Stabellini , Jan Beulich , Xen Devel List-Id: xen-devel@lists.xenproject.org On 29/06/2012 09:26, "Ian Campbell" wrote: >> +static int hvm_replace_event_channel(struct vcpu *v, uint64_t remote_domid, >> + int *port) int *p_port?... >> +{ >> + int old_port, new_port; >> + >> + new_port = alloc_unbound_xen_event_channel(v, remote_domid, NULL); >> + if ( new_port < 0 ) >> + return new_port; >> + >> + /* xchg() ensures that only we free_xen_event_channel() */ >> + old_port = xchg(port, new_port); ...Would make this line a little bit clearer imo. >> + free_xen_event_channel(v, old_port); >> + return 0; >> +} >> +