]> git.baikalelectronics.ru Git - kernel.git/commit
xen: add new hypercall buffer mapping device
authorJuergen Gross <jgross@suse.com>
Mon, 18 Jun 2018 07:36:39 +0000 (09:36 +0200)
committerJuergen Gross <jgross@suse.com>
Fri, 22 Jun 2018 06:26:42 +0000 (08:26 +0200)
commit65e897ef431a3b8af49e9c57c50bbfdc39cbc9a4
tree8a156dfa0e0e4fca0e54a8f344d4767557e24c05
parent81227d38b12f05430e1555a5c4e40942ce2d3e93
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>
drivers/xen/Makefile
drivers/xen/privcmd-buf.c [new file with mode: 0644]
drivers/xen/privcmd.c
drivers/xen/privcmd.h