xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tools/libxc: use uint32_t for pirq in xc_domain_irq_permission
@ 2021-07-07  1:02 Igor Druzhinin
  2021-07-07  7:46 ` Jan Beulich
                   ` (2 more replies)
  0 siblings, 3 replies; 17+ messages in thread
From: Igor Druzhinin @ 2021-07-07  1:02 UTC (permalink / raw)
  To: xen-devel
  Cc: iwj, wl, andrew.cooper3, george.dunlap, jbeulich, julien,
	sstabellini, jgross, christian.lindig, dave, Igor Druzhinin

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 already using
int for pirq representation that should be wide enough.

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.

Signed-off-by: Igor Druzhinin <igor.druzhinin@citrix.com>
---
 tools/include/xenctrl.h             | 2 +-
 tools/libs/ctrl/xc_domain.c         | 2 +-
 tools/ocaml/libs/xc/xenctrl_stubs.c | 2 +-
 xen/include/public/domctl.h         | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/tools/include/xenctrl.h b/tools/include/xenctrl.h
index 2a7c836..8974747 100644
--- a/tools/include/xenctrl.h
+++ b/tools/include/xenctrl.h
@@ -1385,7 +1385,7 @@ int xc_domain_ioport_permission(xc_interface *xch,
 
 int xc_domain_irq_permission(xc_interface *xch,
                              uint32_t domid,
-                             uint8_t pirq,
+                             uint32_t pirq,
                              uint8_t allow_access);
 
 int xc_domain_iomem_permission(xc_interface *xch,
diff --git a/tools/libs/ctrl/xc_domain.c b/tools/libs/ctrl/xc_domain.c
index 7d11884..8e4ffd0 100644
--- a/tools/libs/ctrl/xc_domain.c
+++ b/tools/libs/ctrl/xc_domain.c
@@ -1384,7 +1384,7 @@ int xc_vcpu_setcontext(xc_interface *xch,
 
 int xc_domain_irq_permission(xc_interface *xch,
                              uint32_t domid,
-                             uint8_t pirq,
+                             uint32_t pirq,
                              uint8_t allow_access)
 {
     DECLARE_DOMCTL;
diff --git a/tools/ocaml/libs/xc/xenctrl_stubs.c b/tools/ocaml/libs/xc/xenctrl_stubs.c
index 6e4bc56..e5837e6 100644
--- a/tools/ocaml/libs/xc/xenctrl_stubs.c
+++ b/tools/ocaml/libs/xc/xenctrl_stubs.c
@@ -1077,7 +1077,7 @@ CAMLprim value stub_xc_domain_irq_permission(value xch, value domid,
 					     value pirq, value allow)
 {
 	CAMLparam4(xch, domid, pirq, allow);
-	uint8_t c_pirq;
+	uint32_t c_pirq;
 	uint8_t c_allow;
 	int ret;
 
diff --git a/xen/include/public/domctl.h b/xen/include/public/domctl.h
index 4dbf107..277478e 100644
--- a/xen/include/public/domctl.h
+++ b/xen/include/public/domctl.h
@@ -441,7 +441,7 @@ struct xen_domctl_setdebugging {
 
 /* 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 */
 };
 
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2021-07-12  8:59 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-07  1:02 [PATCH] tools/libxc: use uint32_t for pirq in xc_domain_irq_permission Igor Druzhinin
2021-07-07  7:46 ` Jan Beulich
2021-07-07  9:19   ` Andrew Cooper
2021-07-08  1:08     ` Igor Druzhinin
2021-07-08  1:11       ` Andrew Cooper
2021-07-08  1:14         ` Igor Druzhinin
2021-07-08  1:26           ` Andrew Cooper
2021-07-08  1:30             ` Igor Druzhinin
2021-07-07  8:48 ` Christian Lindig
2021-07-07 12:51 ` Julien Grall
2021-07-07 12:54   ` Jan Beulich
2021-07-07 12:59     ` Julien Grall
2021-07-07 13:14       ` Jan Beulich
2021-07-07 13:21         ` Julien Grall
2021-07-07 13:25           ` Jan Beulich
2021-07-08  2:06           ` Igor Druzhinin
2021-07-12  8:59             ` Julien Grall

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).