From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from prv1-mh.provo.novell.com ([137.65.248.33]:40284 "EHLO prv1-mh.provo.novell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726101AbeHOJaL (ORCPT ); Wed, 15 Aug 2018 05:30:11 -0400 Message-Id: <5B73C5D402000078001DE189@prv1-mh.provo.novell.com> Date: Wed, 15 Aug 2018 00:19:00 -0600 From: "Jan Beulich" To: "Boris Ostrovsky" , "Juergen Gross" , Cc: "xen-devel" , Subject: [PATCH RESEND] compat-ioctl/Xen: support at least some IOCTLs of evtchn and privcmd References: <5B30C6E202000078001CD724@prv1-mh.provo.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8BIT Content-Disposition: inline Sender: linux-fsdevel-owner@vger.kernel.org List-ID: While this is only a start (IOCTL_PRIVCMD_MMAP* and IOCTL_PRIVCMD_DM_OP require more work), it at least allows some simple operations (like "xl dmesg") which have always been available on XenoLinux to work again with a 64-bit kernel underneath a 32-bit distro. Signed-off-by: Jan Beulich Acked-by: Juergen Gross --- Resend due to prior omission of file system related addressees. --- fs/compat_ioctl.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) --- 4.18/fs/compat_ioctl.c +++ 4.18-xen-privcmd-compat-ioctls/fs/compat_ioctl.c @@ -115,6 +115,12 @@ #include #endif +#ifdef CONFIG_XEN +#include +#include +#include +#endif + #define convert_in_user(srcptr, dstptr) \ ({ \ typeof(*srcptr) val; \ @@ -1300,6 +1306,17 @@ IGNORE_IOCTL(FBIOGETCMAP32) IGNORE_IOCTL(FBIOSCURSOR32) IGNORE_IOCTL(FBIOGCURSOR32) #endif + +#ifdef CONFIG_XEN +COMPATIBLE_IOCTL(IOCTL_PRIVCMD_HYPERCALL) +COMPATIBLE_IOCTL(IOCTL_PRIVCMD_RESTRICT) +COMPATIBLE_IOCTL(IOCTL_EVTCHN_BIND_VIRQ) +COMPATIBLE_IOCTL(IOCTL_EVTCHN_BIND_INTERDOMAIN) +COMPATIBLE_IOCTL(IOCTL_EVTCHN_BIND_UNBOUND_PORT) +COMPATIBLE_IOCTL(IOCTL_EVTCHN_UNBIND) +COMPATIBLE_IOCTL(IOCTL_EVTCHN_NOTIFY) +COMPATIBLE_IOCTL(IOCTL_EVTCHN_RESET) +#endif }; /*