Re: [Xen-devel] [PATCH v6 2/2] xen/arm: support gzip compressed kernels

2015-09-22 Thread Stefano Stabellini
On Tue, 22 Sep 2015, Julien Grall wrote: > On 21/09/2015 23:51, Stefano Stabellini wrote: > > +/* > > + * Need to free pages after output_size here because they won't be > > + * freed by discard_initial_modules > > + */ > > +i = (output_size + PAGE_SIZE - 1) >> PAGE_SHIFT; > > +

Re: [Xen-devel] [PATCH v6 2/2] xen/arm: support gzip compressed kernels

2015-09-22 Thread Julien Grall
On 21/09/2015 23:51, Stefano Stabellini wrote: +/* + * Need to free pages after output_size here because they won't be + * freed by discard_initial_modules + */ +i = (output_size + PAGE_SIZE - 1) >> PAGE_SHIFT; +for ( ; i < (1 << kernel_order_out); i++ ) +free_do

Re: [Xen-devel] [PATCH v6 2/2] xen/arm: support gzip compressed kernels

2015-09-22 Thread Julien Grall
Hi Stefano, On 22/09/2015 02:35, Stefano Stabellini wrote: You may want to use vmap here which is a wrapper to __vmap and will setup the granularity, align, and flags automatically for you. The arguments are different. Yes, sorry I inverted nr with granularity. I meant to say that it makes

Re: [Xen-devel] [PATCH v6 2/2] xen/arm: support gzip compressed kernels

2015-09-21 Thread Stefano Stabellini
On Tue, 22 Sep 2015, Stefano Stabellini wrote: > On Tue, 22 Sep 2015, Julien Grall wrote: > > Hi Stefano, > > > > On 21/09/2015 23:51, Stefano Stabellini wrote: > > > Changes in v6: > > > - use vmap to map pages > > > - free old module and update mod->start and mod->size from > > > kernel_decompre

Re: [Xen-devel] [PATCH v6 2/2] xen/arm: support gzip compressed kernels

2015-09-21 Thread Stefano Stabellini
On Tue, 22 Sep 2015, Julien Grall wrote: > Hi Stefano, > > On 21/09/2015 23:51, Stefano Stabellini wrote: > > Changes in v6: > > - use vmap to map pages > > - free old module and update mod->start and mod->size from > > kernel_decompress > > I was expecting you to drop my Reviewed-by given those

Re: [Xen-devel] [PATCH v6 2/2] xen/arm: support gzip compressed kernels

2015-09-21 Thread Julien Grall
Hi Stefano, On 21/09/2015 23:51, Stefano Stabellini wrote: Changes in v6: - use vmap to map pages - free old module and update mod->start and mod->size from kernel_decompress I was expecting you to drop my Reviewed-by given those changes. diff --git a/xen/arch/arm/kernel.c b/xen/arch/arm/ker

[Xen-devel] [PATCH v6 2/2] xen/arm: support gzip compressed kernels

2015-09-21 Thread Stefano Stabellini
Free the memory used for the compressed kernel and update the relative mod->start and mod->size parameters with the uncompressed ones. To decompress the kernel, allocate memory from dommheap, because freeing the modules is done by calling init_heap_pages, which frees to domheap. Map these pages us