From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH for 4.6] xen/tools: Widen the machine_irq in xc_domain_*bind_pt_irq_int Date: Fri, 24 Jul 2015 12:06:01 +0100 Message-ID: <1437735961.24746.66.camel@citrix.com> References: <1437141981-6858-1-git-send-email-julien.grall@citrix.com> <1437488112.8383.38.camel@citrix.com> 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 1ZIaoO-0001D3-3R for xen-devel@lists.xenproject.org; Fri, 24 Jul 2015 11:06:44 +0000 In-Reply-To: <1437488112.8383.38.camel@citrix.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: Julien Grall , xen-devel@lists.xenproject.org Cc: stefano.stabellini@citrix.com, Iurii Konovalenko , Wei.Liu2@citrix.com, ian.jackson@eu.citrix.com List-Id: xen-devel@lists.xenproject.org On Tue, 2015-07-21 at 15:15 +0100, Ian Campbell wrote: > On Fri, 2015-07-17 at 15:06 +0100, Julien Grall wrote: > > The DOMCTLs {,un}bind_pt_irq are using uint32_t for the machine_irq > > while the helper is using uint8_t. > > > > Currently on ARM, we are supporting SPIs whose irq number can go up > > > > to > > 1019 which doesn't fit in an uint8_t. The helpers > > xc_domain_bind_pt_spi > > and xc_domain_unbint_pt_spi are correctly taking an uint16_t so the > > libxc was truncating without noticing the user which may end up to > > route the wrong IRQ. > > > > Fix the problem by widening the machine_irq parameter in > > xc_domain_*bind_pt_irq_int. > > > > Note that XEN_DOMCTL_irq_permission has the same problem but it's > > not > > used at the moment on ARM. So we can defer the changes after the > > release > > of Xen 4.7. > > > > Reported-by: Iurii Konovalenko > > Signed-off-by: Julien Grall > > Acked-by: Ian Campbell > > I think this is a bugfix and should be applied for 4.6. Done.