linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@suse.com>
To: "Boris Ostrovsky" <boris.ostrovsky@oracle.com>,
	"Juergen Gross" <jgross@suse.com>, <viro@zeniv.linux.org.uk>
Cc: "xen-devel" <xen-devel@lists.xenproject.org>,
	<linux-fsdevel@vger.kernel.org>
Subject: [PATCH RESEND] compat-ioctl/Xen: support at least some IOCTLs of evtchn and privcmd
Date: Wed, 15 Aug 2018 00:19:00 -0600	[thread overview]
Message-ID: <5B73C5D402000078001DE189@prv1-mh.provo.novell.com> (raw)
In-Reply-To: 5B30C6E202000078001CD724@prv1-mh.provo.novell.com

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 <jbeulich@suse.com>
Acked-by: Juergen Gross <jgross@suse.com>
---
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 <asm/fbio.h>
 #endif
 
+#ifdef CONFIG_XEN
+#include <xen/interface/xen.h>
+#include <xen/evtchn.h>
+#include <xen/privcmd.h>
+#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
 };
 
 /*

       reply	other threads:[~2018-08-15  9:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <5B30C6E202000078001CD724@prv1-mh.provo.novell.com>
2018-08-15  6:19 ` Jan Beulich [this message]
2018-08-15 12:41   ` [PATCH RESEND] compat-ioctl/Xen: support at least some IOCTLs of evtchn and privcmd Christoph Hellwig
2018-08-15 12:51   ` Al Viro
2018-08-15 13:16     ` Jan Beulich
2018-08-15 13:27       ` Al Viro

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5B73C5D402000078001DE189@prv1-mh.provo.novell.com \
    --to=jbeulich@suse.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=jgross@suse.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).