Re: [PATCH v2 19/20] xen/privcmd: Add support for Linux 64KB page granularity

2015-07-16 Thread Stefano Stabellini
On Thu, 16 Jul 2015, Stefano Stabellini wrote: > > + /* setup_hparams guarantees ret == 0 */ > > + BUG_ON(xen_apply_to_page(page, setup_hparams, info)); > > + > > + set_xen_guest_handle(xatp.idxs, info->h_idxs); > > + set_xen_guest_handle(xatp.gpfns, info->h_gpfns); > > + set_xen_guest_ha

Re: [PATCH v2 19/20] xen/privcmd: Add support for Linux 64KB page granularity

2015-07-16 Thread Stefano Stabellini
On Thu, 9 Jul 2015, Julien Grall wrote: > The hypercall interface (as well as the toolstack) is always using 4KB > page granularity. When the toolstack is asking for mapping a series of > guest PFN in a batch, it expects to have the page map contiguously in > its virtual memory. > > When Linux is

Re: [PATCH v2 19/20] xen/privcmd: Add support for Linux 64KB page granularity

2015-07-14 Thread Julien Grall
Hi Boris, On 14/07/2015 17:28, Boris Ostrovsky wrote: On 07/13/2015 06:05 PM, Julien Grall wrote: On 13/07/2015 22:13, Boris Ostrovsky wrote: On 07/09/2015 04:42 PM, Julien Grall wrote: - struct remap_data { xen_pfn_t *fgmfn; /* foreign domain's gmfn */ +xen_pfn_t *efgmfn; /* poin

Re: [PATCH v2 19/20] xen/privcmd: Add support for Linux 64KB page granularity

2015-07-14 Thread Boris Ostrovsky
On 07/13/2015 06:05 PM, Julien Grall wrote: Hi Boris, On 13/07/2015 22:13, Boris Ostrovsky wrote: On 07/09/2015 04:42 PM, Julien Grall wrote: - struct remap_data { xen_pfn_t *fgmfn; /* foreign domain's gmfn */ +xen_pfn_t *efgmfn; /* pointer to the end of the fgmfn array */ It mig

Re: [PATCH v2 19/20] xen/privcmd: Add support for Linux 64KB page granularity

2015-07-13 Thread Julien Grall
Hi Boris, On 13/07/2015 22:13, Boris Ostrovsky wrote: On 07/09/2015 04:42 PM, Julien Grall wrote: - struct remap_data { xen_pfn_t *fgmfn; /* foreign domain's gmfn */ +xen_pfn_t *efgmfn; /* pointer to the end of the fgmfn array */ It might be better to keep size of fgmfn array inst

Re: [PATCH v2 19/20] xen/privcmd: Add support for Linux 64KB page granularity

2015-07-13 Thread Boris Ostrovsky
On 07/09/2015 04:42 PM, Julien Grall wrote: - struct remap_data { xen_pfn_t *fgmfn; /* foreign domain's gmfn */ + xen_pfn_t *efgmfn; /* pointer to the end of the fgmfn array */ It might be better to keep size of fgmfn array instead. +static int unmap_gfn(struct page *page, u