Re: [Xen-devel] [PATCH v2] xen: add new hypercall buffer mapping device

2018-06-18 Thread Boris Ostrovsky
On 06/18/2018 03:36 AM, Juergen Gross wrote: > 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,

Re: [Xen-devel] [PATCH v2] xen: add new hypercall buffer mapping device

2018-06-18 Thread Andrew Cooper
On 18/06/18 15:36, Juergen Gross wrote: > +static int privcmd_buf_mmap(struct file *file, struct vm_area_struct *vma) > +{ > + struct privcmd_buf_private *file_priv = file->private_data; > + struct privcmd_buf_vma_private *vma_priv; > + unsigned long count = vma_pages(vma); > +

[Xen-devel] [PATCH v2] xen: add new hypercall buffer mapping device

2018-06-18 Thread Juergen Gross
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