From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: Restart domU failure (memory allocation issue) Date: Fri, 14 Mar 2014 12:15:17 +0000 Message-ID: <5322F2D5.9020906@linaro.org> References: <53220B9A.50508@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Andrii Anisov Cc: Oleksandr Tyshchenko , Stefano Stabellini , Tim Deegan , Ian Campbell , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org Hello Andrii, On 03/14/2014 11:14 AM, Andrii Anisov wrote: > From the investigations done by Oleksandr it seems to me that some > mappings done for so called kernel segment by xc_dom_alloc_segment() > are left in dom0 space. > > Actually I do not see how pages from domU space (i.e. that kernel > segment) are unmapped from dom0 after domain creation. It seems that unmap will be done at the end of xc_dom_boot_image (see xc_dom_unmap_all). The latter function will go through the list of all mappings and close it one by one. You can add a print in xc_dom_unmap_one (tools/libxc/xc_dom_core.c) and check if you have the same number of print with xc_dom_pfn_to_ptr_retcount. Regards, -- Julien Grall