Re: [Xen-devel] [PATCH v3 1/9] libxc: reorganize domain builder guest memory allocator

2015-10-28 Thread Juergen Gross
On 10/28/2015 05:21 PM, Wei Liu wrote: On Wed, Oct 28, 2015 at 04:51:05PM +0100, Juergen Gross wrote: [...] +static int xc_dom_alloc_pad(struct xc_dom_image *dom, xen_vaddr_t end) +{ +unsigned int page_size = XC_DOM_PAGE_SIZE(dom); +xen_pfn_t pages; + +if ( end & (page_size - 1) )

Re: [Xen-devel] [PATCH v3 1/9] libxc: reorganize domain builder guest memory allocator

2015-10-28 Thread Wei Liu
On Wed, Oct 28, 2015 at 04:51:05PM +0100, Juergen Gross wrote: [...] > >>+static int xc_dom_alloc_pad(struct xc_dom_image *dom, xen_vaddr_t end) > >>+{ > >>+unsigned int page_size = XC_DOM_PAGE_SIZE(dom); > >>+xen_pfn_t pages; > >>+ > >>+if ( end & (page_size - 1) ) > >> { > >>

Re: [Xen-devel] [PATCH v3 1/9] libxc: reorganize domain builder guest memory allocator

2015-10-28 Thread Juergen Gross
On 10/28/2015 04:32 PM, Wei Liu wrote: On Tue, Oct 13, 2015 at 03:11:10PM +0200, Juergen Gross wrote: Guest memory allocation in the domain builder of libxc is done via virtual addresses only. In order to be able to support preallocated areas not virtually mapped reorganize the memory allocator

Re: [Xen-devel] [PATCH v3 1/9] libxc: reorganize domain builder guest memory allocator

2015-10-28 Thread Wei Liu
On Tue, Oct 13, 2015 at 03:11:10PM +0200, Juergen Gross wrote: > Guest memory allocation in the domain builder of libxc is done via > virtual addresses only. In order to be able to support preallocated > areas not virtually mapped reorganize the memory allocator to keep > track of allocated pages g

[Xen-devel] [PATCH v3 1/9] libxc: reorganize domain builder guest memory allocator

2015-10-13 Thread Juergen Gross
Guest memory allocation in the domain builder of libxc is done via virtual addresses only. In order to be able to support preallocated areas not virtually mapped reorganize the memory allocator to keep track of allocated pages globally and in allocated segments. This requires an interface change o