]> xenbits.xensource.com Git - xen.git/commit
xen/tools: Widen the machine_irq in xc_domain_*bind_pt_irq_int
authorJulien Grall <julien.grall@citrix.com>
Fri, 17 Jul 2015 14:06:21 +0000 (15:06 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Fri, 24 Jul 2015 10:18:01 +0000 (11:18 +0100)
commit8a925e7151bded495a9603a93cdcea16cd3eb1c4
tree9f108ce5eaec32f866986566b80efdefba04e0e2
parenta7da1081d1ee403464ce1f4fbda5c084cfb868df
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@globallogic.com>
Signed-off-by: Julien Grall <julien.grall@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
tools/libxc/xc_domain.c