From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: Re: [PATCH v8 for-xen-4.5 1/2] dpci: Move from an hvm_irq_dpci (and struct domain) to an hvm_dirq_dpci model. Date: Mon, 27 Oct 2014 12:36:25 -0400 Message-ID: <20141027163625.GA11893@laptop.dumpdata.com> References: <1413911967-26886-1-git-send-email-konrad.wilk@oracle.com> <1413911967-26886-2-git-send-email-konrad.wilk@oracle.com> <5448DF5A0200007800041591@mail.emea.novell.com> <20141024015855.GA28850@laptop.dumpdata.com> <544A3CCC0200007800041D22@mail.emea.novell.com> <20141024190941.GA17894@laptop.dumpdata.com> <544E1DA50200007800042506@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XinHY-00006Z-Th for xen-devel@lists.xenproject.org; Mon, 27 Oct 2014 16:36:37 +0000 Content-Disposition: inline In-Reply-To: <544E1DA50200007800042506@mail.emea.novell.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: Jan Beulich Cc: keir@xen.org, ian.campbell@citrix.com, andrew.cooper3@citrix.com, tim@xen.org, xen-devel@lists.xenproject.org, ian.jackson@eu.citrix.com List-Id: xen-devel@lists.xenproject.org On Mon, Oct 27, 2014 at 09:25:41AM +0000, Jan Beulich wrote: > >>> On 24.10.14 at 21:09, wrote: > > On Fri, Oct 24, 2014 at 10:49:32AM +0100, Jan Beulich wrote: > >> >>> On 24.10.14 at 03:58, wrote: > >> > @@ -156,6 +165,7 @@ int pt_irq_create_bind( > >> > { > >> > pirq_dpci->gmsi.gflags = 0; > >> > pirq_dpci->gmsi.gvec = 0; > >> > + pirq_dpci->dom = NULL; > >> > pirq_dpci->flags = 0; > >> > pirq_cleanup_check(info, d); > >> > spin_unlock(&d->event_lock); > >> > >> Wait - is this correct even when pirq_guest_bind() succeeded but > >> msixtbl_pt_register() failed? At the first glance I would say no. But > > > > Keep in mind that if 'msixtbl_pt_register' fails we immediately call > > 'pirq_guest_unbind' and then land in here. > > Of course. But there was a window where the interrupt was > bound (and hence potentially got triggered). Correct. And the hvm_dirq_assist (thanks to your suggestion) would not crash, instead it will just return as it checks for 'pirq_dpci->dom' being NULL. I think this patch does not need any more changes? > > Jan >