From: "Jan Beulich" Subject: Re: [PATCH v5 4/9] ioreq-server: create basic ioreq server abstraction. Date: Tue, 06 May 2014 14:24:29 +0100 Message-ID: <5368FEAD020000780000F642@mail.emea.novell.com> References: <1398946120-33169-1-git-send-email-paul.durrant@citrix.com> <1398946120-33169-5-git-send-email-paul.durrant@citrix.com> <5368F7C4020000780000F5CC@mail.emea.novell.com> <9AAE0902D5BC7E449B7C8E4E778ABCD03355D7@AMSPEX01CL01.citrite.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <9AAE0902D5BC7E449B7C8E4E778ABCD03355D7@AMSPEX01CL01.citrite.net> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Paul Durrant Cc: "Keir (Xen.org)" , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org >>> On 06.05.14 at 15:12, wrote: >> From: Jan Beulich [mailto:JBeulich@suse.com] >> >>> On 01.05.14 at 14:08, wrote: >> > @@ -426,14 +431,6 @@ void hvm_do_resume(struct vcpu *v) >> > } >> > } >> > >> > -static void hvm_init_ioreq_page( >> > - struct domain *d, struct hvm_ioreq_page *iorp) >> > -{ >> > - memset(iorp, 0, sizeof(*iorp)); >> > - spin_lock_init(&iorp->lock); >> > - domain_pause(d); >> >> So where is this ... > > Nowhere. As I said in the checkin comment, the lock has gone and the > domain_pause() and subsequent domain_unpause() were always unnecessary > AFAICT. I think the intention was that the domain was not unpaused until both > the IOREQ PFNs were set, but since the PFNs are set in the domain build code > in the toolstack I can't see why this was needed. So with a disaggregated, hostile tool stack this would still be unnecessary? It can go away only if the answer to this is "yes". >> > +static int hvm_replace_event_channel(struct vcpu *v, domid_t >> remote_domid, >> > + evtchn_port_t *p_port) >> > +{ >> > + evtchn_port_t old_port, new_port; >> > + >> > + new_port = alloc_unbound_xen_event_channel(v, remote_domid, NULL); >> > + if ( new_port < 0 ) >> > + return new_port; >> >> I'm pretty sure I commented on this too in a previous version: >> evtchn_port_t is an unsigned type, hence checking it to be negative >> is pointless. > > Yes, but as I'm pretty sure I responded, alloc_unbound_xen_event_channel() > doesn't return an evtchn_port_t! Which doesn't matter here at all: Once you store the function result in a variable of type evtchn_port_t, its original signedness is lost. Jan