From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH v2 3/3] xen/arm: Find automatically a PPI for the DOM0 event channel interrupt Date: Mon, 19 Jan 2015 16:04:06 +0000 Message-ID: <1421683446.10440.132.camel@citrix.com> References: <1421353422-13133-1-git-send-email-julien.grall@linaro.org> <1421353422-13133-4-git-send-email-julien.grall@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YDEpX-0004Ls-7b for xen-devel@lists.xenproject.org; Mon, 19 Jan 2015 16:05:31 +0000 In-Reply-To: <1421353422-13133-4-git-send-email-julien.grall@linaro.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Julien Grall Cc: christoffer.dall@linaro.org, xen-devel@lists.xenproject.org, tim@xen.org, parth.dixit@linaro.org, stefano.stabellini@citrix.com List-Id: xen-devel@lists.xenproject.org On Thu, 2015-01-15 at 20:23 +0000, Julien Grall wrote: Subject should be "Automatically find..." > Use the new vgic interface to know which virtual PPI is free and use it > for the event channel code. > > At the DOM0 creation time, Xen still don't know which vIRQ will be free. "...Xen still doesn't know..." or just "... Xen doesn't know..." > diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c > index 3d4f317..d5959b5 100644 > --- a/xen/arch/arm/domain_build.c > +++ b/xen/arch/arm/domain_build.c > @@ -627,6 +627,16 @@ static int make_hypervisor_node(struct domain *d, I'd prefer this not to be done in make_hypervisor_node, to keep make_*_node purely about creating the DT, without other side effects, as far as possible. I think you can drop a placeholder here and update it around the time of the calls to kernel_load and initrd_load from a new helper function which allocates and updates. initrd_load does something similar. > return res; > > /* > + * The allocation of the event channel IRQ has been deferred until > + * now. At this time, all PPIs use by DOM0 has been registered s/use/used/ and s/has/have/ > + */ > + res = vgic_allocate_virq(d, 0); ^ /* ppi */ if you don't want to split into a ppi and spi helper as mentioned on previous patch. Ian.