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

2018-06-15 Thread Juergen Gross
On 15/06/18 16:43, Boris Ostrovsky wrote: > On 06/15/2018 09:17 AM, 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; >> +

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

2018-06-15 Thread Juergen Gross
On 15/06/18 16:35, Jan Beulich wrote: On 15.06.18 at 15:17, wrote: >> --- /dev/null >> +++ b/drivers/xen/privcmd-buf.c >> @@ -0,0 +1,216 @@ >> +// SPDX-License-Identifier: GPL-2.0 OR MIT >> + >> +/** >> + * privcmd-bu

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

2018-06-15 Thread Boris Ostrovsky
On 06/15/2018 09:17 AM, 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 int count = vma_pages(vma); > +

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

2018-06-15 Thread Juergen Gross
On 15/06/18 16:15, Andrew Cooper wrote: > On 15/06/18 14:17, Juergen Gross wrote: >> +MODULE_LICENSE("GPL"); >> + >> +static int limit = 64; >> +module_param(limit, int, 0644); >> +MODULE_PARM_DESC(limit, "Maximum number of pages that may be allocated by " >> +"the privcmd-buf d

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

2018-06-15 Thread Jan Beulich
>>> On 15.06.18 at 15:17, wrote: > --- /dev/null > +++ b/drivers/xen/privcmd-buf.c > @@ -0,0 +1,216 @@ > +// SPDX-License-Identifier: GPL-2.0 OR MIT > + > +/** > + * privcmd-buf.c > + * > + * Mmap of hypercall buffers. > +

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

2018-06-15 Thread Andrew Cooper
On 15/06/18 14:17, Juergen Gross wrote: > +MODULE_LICENSE("GPL"); > + > +static int limit = 64; > +module_param(limit, int, 0644); > +MODULE_PARM_DESC(limit, "Maximum number of pages that may be allocated by " > + "the privcmd-buf device per open file"); I have a feeling that,