From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH v4 11/33] xen/arm: route_irq_to_guest: Check validity of the IRQ Date: Tue, 31 Mar 2015 11:43:37 +0100 Message-ID: <1427798617.2115.54.camel@citrix.com> References: <1426793399-6283-1-git-send-email-julien.grall@linaro.org> <1426793399-6283-12-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 1YctnW-0004Md-5P for xen-devel@lists.xenproject.org; Tue, 31 Mar 2015 10:53:30 +0000 In-Reply-To: <1426793399-6283-12-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: xen-devel@lists.xenproject.org, tim@xen.org, stefano.stabellini@citrix.com List-Id: xen-devel@lists.xenproject.org On Thu, 2015-03-19 at 19:29 +0000, Julien Grall wrote: > Currently Xen only supports SPIs routing for guest, add a function > is_assignable_irq to check if we can assign a given IRQ to the guest. > > Secondly, make sure the vIRQ is not the greater that the number of IRQs s/that/than/ > configured in the vGIC and it's an SPI. > > Thirdly, when the IRQ is already assigned to the domain, check the user > is not asking to use a different vIRQ than the one already bound. > > Finally, desc->arch.type which contains the IRQ type (i.e level/edge) must > be correctly configured before. The misconfiguration can happen when: > - the device has been blacklisted for the current platform > - the IRQ has not been described in the device tree > > Also, use XENLOG_G_ERR in the error message within the function as it will > be later called from a guest. > > Signed-off-by: Julien Grall Acked-by: Ian Campbell