tools/libxc: use uint32_t for pirq in xc_domain_irq_permission
authorIgor Druzhinin <igor.druzhinin@citrix.com>
Tue, 13 Jul 2021 01:31:41 +0000 (02:31 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 26 Jul 2021 09:32:04 +0000 (10:32 +0100)
commit73c932d0ea43ddf904db9429811788480c4cb816
tree74005c30377dfd9062580ea1310e94b47b469dcb
parent57e761b60dc92e210caf3429b8956d908ba04ae9
tools/libxc: use uint32_t for pirq in xc_domain_irq_permission

Current unit8_t for pirq argument in this interface is too restrictive
causing failures on modern hardware with lots of GSIs. That extends down to
XEN_DOMCTL_irq_permission ABI structure where it needs to be fixed up
as well.

Internal Xen structures appear to be fine. Existing users of the interface
in tree (libxl, ocaml and python bindings) are currently using signed int
for pirq representation which should be wide enough. Converting them to
uint32_t now is desirable to avoid accidental passing of a negative
number (probably denoting an error code) by caller as pirq, but left for
the future clean up.

Domctl interface version is needed to be bumped with this change but that
was already done by 918b8842a8 ("arm64: Change type of hsr, cpsr, spsr_el1
to uint64_t") in this release cycle.

Additionally, take a change and convert allow_access argument to bool.

Signed-off-by: Igor Druzhinin <igor.druzhinin@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Christian Lindig <christian.lindig@citrix.com>
Acked-by: Julien Grall <jgrall@amazon.com>
tools/include/xenctrl.h
tools/libs/ctrl/xc_domain.c
tools/ocaml/libs/xc/xenctrl_stubs.c
xen/include/public/domctl.h