@@ -1348,6 +1348,14 @@ int xc_domain_ioport_permission(xc_interface *xch,
uint32_t nr_ports,
uint32_t allow_access)
{
+#if defined(__arm__) || defined(__aarch64__)
+ /*
+ * The ARM architecture does not implement I/O ports.
+ * Avoid the overhead of making a hypercall just for Xen to return -ENOSYS.
+ * It is safe to ignore this call on ARM so we just return 0.
+ */
+ return 0;
+#else
DECLARE_DOMCTL;
domctl.cmd = XEN_DOMCTL_ioport_permission;
@@ -1357,6 +1365,7 @@ int xc_domain_ioport_permission(xc_interface *xch,
domctl.u.ioport_permission.allow_access = allow_access;
return do_domctl(xch, &domctl);
+#endif
}
int xc_availheap(xc_interface *xch,