summaryrefslogtreecommitdiffstats
path: root/drivers/xen/privcmd.h
diff options
context:
space:
mode:
authorJuergen Gross <jgross@suse.com>2018-06-18 09:36:39 +0200
committerJuergen Gross <jgross@suse.com>2018-06-22 08:26:42 +0200
commitc51b3c639e01f20559531eef3c5919feae23c55a (patch)
tree8a156dfa0e0e4fca0e54a8f344d4767557e24c05 /drivers/xen/privcmd.h
parent7c63ca24c878e0051c91904b72174029320ef4bd (diff)
downloadlinux-c51b3c639e01f20559531eef3c5919feae23c55a.tar.bz2
xen: add new hypercall buffer mapping device
For passing arbitrary data from user land to the Xen hypervisor the Xen tools today are using mlock()ed buffers. Unfortunately the kernel might change access rights of such buffers for brief periods of time e.g. for page migration or compaction, leading to access faults in the hypervisor, as the hypervisor can't use the locks of the kernel. In order to solve this problem add a new device node to the Xen privcmd driver to easily allocate hypercall buffers via mmap(). The memory is allocated in the kernel and just mapped into user space. Marked as VM_IO the user mapping will not be subject to page migration et al. Signed-off-by: Juergen Gross <jgross@suse.com> Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com> Signed-off-by: Juergen Gross <jgross@suse.com>
Diffstat (limited to 'drivers/xen/privcmd.h')
-rw-r--r--drivers/xen/privcmd.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/xen/privcmd.h b/drivers/xen/privcmd.h
index 14facaeed36f..0dd9f8f67ee3 100644
--- a/drivers/xen/privcmd.h
+++ b/drivers/xen/privcmd.h
@@ -1,3 +1,6 @@
#include <linux/fs.h>
extern const struct file_operations xen_privcmd_fops;
+extern const struct file_operations xen_privcmdbuf_fops;
+
+extern struct miscdevice xen_privcmdbuf_dev;