[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] xen/tools: Widen the machine_irq in xc_domain_*bind_pt_irq_int
commit 8a925e7151bded495a9603a93cdcea16cd3eb1c4 Author: Julien Grall <julien.grall@xxxxxxxxxx> AuthorDate: Fri Jul 17 15:06:21 2015 +0100 Commit: Ian Campbell <ian.campbell@xxxxxxxxxx> CommitDate: Fri Jul 24 11:18:01 2015 +0100 xen/tools: Widen the machine_irq in xc_domain_*bind_pt_irq_int 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 <iurii.konovalenko@xxxxxxxxxxxxxxx> Signed-off-by: Julien Grall <julien.grall@xxxxxxxxxx> Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx> --- tools/libxc/xc_domain.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/libxc/xc_domain.c b/tools/libxc/xc_domain.c index 77d852b..582b0ae 100644 --- a/tools/libxc/xc_domain.c +++ b/tools/libxc/xc_domain.c @@ -1923,7 +1923,7 @@ int xc_domain_unbind_msi_irq( static int xc_domain_bind_pt_irq_int( xc_interface *xch, uint32_t domid, - uint8_t machine_irq, + uint32_t machine_irq, uint8_t irq_type, uint8_t bus, uint8_t device, @@ -1982,7 +1982,7 @@ int xc_domain_bind_pt_irq( static int xc_domain_unbind_pt_irq_int( xc_interface *xch, uint32_t domid, - uint8_t machine_irq, + uint32_t machine_irq, uint8_t irq_type, uint8_t bus, uint8_t device, -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |