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>
int xc_domain_irq_permission(xc_interface *xch,
uint32_t domid,
- uint8_t pirq,
- uint8_t allow_access);
+ uint32_t pirq,
+ bool allow_access);
int xc_domain_iomem_permission(xc_interface *xch,
uint32_t domid,
int xc_domain_irq_permission(xc_interface *xch,
uint32_t domid,
- uint8_t pirq,
- uint8_t allow_access)
+ uint32_t pirq,
+ bool allow_access)
{
DECLARE_DOMCTL;
value pirq, value allow)
{
CAMLparam4(xch, domid, pirq, allow);
- uint8_t c_pirq;
- uint8_t c_allow;
+ uint32_t c_pirq;
+ bool c_allow;
int ret;
c_pirq = Int_val(pirq);
/* XEN_DOMCTL_irq_permission */
struct xen_domctl_irq_permission {
- uint8_t pirq;
+ uint32_t pirq;
uint8_t allow_access; /* flag to specify enable/disable of IRQ access */
+ uint8_t pad[3];
};