From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [V6 PATCH 6.1/7] pvh dom0: Add and remove foreign pages Date: Mon, 09 Dec 2013 13:46:38 +0000 Message-ID: <52A5C9BE.8050404@linaro.org> References: <1386297524-15483-1-git-send-email-mukesh.rathor@oracle.com> <1386297524-15483-7-git-send-email-mukesh.rathor@oracle.com> <20131206183416.6c78f955@mantra.us.oracle.com> <1386585060.30459.5.camel@kazak.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1386585060.30459.5.camel@kazak.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell , Mukesh Rathor Cc: Xen-devel@lists.xensource.com, george.dunlap@eu.citrix.com, tim@xen.org, Julien Grall , keir.xen@gmail.com, JBeulich@suse.com List-Id: xen-devel@lists.xenproject.org On 12/09/2013 10:31 AM, Ian Campbell wrote: > On Fri, 2013-12-06 at 18:34 -0800, Mukesh Rathor wrote: >> New version of the patch with xenmem_rem_foreign_from_p2m() created: >> >> In this patch, a new function, xenmem_add_foreign_to_p2m(), is added >> to map pages from foreign guest into current dom0 for domU creation. >> Such pages are typed p2m_map_foreign. Another function >> xenmem_rem_foreign_from_p2m() is added to remove such pages. Note, in >> the remove path, we must release the refcount that was taken during >> the map phase. > > Thanks, the common code portions are much cleaner with this approach and > the ARM stubs look fine for now. > > I noticed that you enforce that the domain is foreign, and assert on > teardown, which I think is a good idea. I don't think we do this on ARM > right now -- Julien do you think we should do this? If yes can you > arrange to do it in your series? Actually I have added an ASSERT in the remove helper but forgot to check in xenmem_add_to_physmap_one. I will do it in the next version of the patch series. -- Julien Grall