From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mukesh Rathor Subject: Re: [V6 PATCH 6/7] pvh dom0: Add and remove foreign pages Date: Mon, 9 Dec 2013 18:17:46 -0800 Message-ID: <20131209181746.0ebf8066@mantra.us.oracle.com> References: <1386297524-15483-1-git-send-email-mukesh.rathor@oracle.com> <1386297524-15483-7-git-send-email-mukesh.rathor@oracle.com> <52A52EBF.4080704@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <52A52EBF.4080704@linaro.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Julien Grall Cc: Xen-devel@lists.xensource.com, Ian Campbell , george.dunlap@eu.citrix.com, tim@xen.org, keir.xen@gmail.com, JBeulich@suse.com List-Id: xen-devel@lists.xenproject.org On Mon, 09 Dec 2013 02:45:19 +0000 Julien Grall wrote: > > > On 12/06/2013 02:38 AM, Mukesh Rathor wrote: > > 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. Also, support is added here to > > XENMEM_remove_from_physmap to remove such pages. Note, in the remove > > path, we must release the refcount that was taken during the map > > phase. > > > > Signed-off-by: Mukesh Rathor > > --- > > xen/arch/x86/mm.c | 88 > > +++++++++++++++++++++++++++++++++++++++++---- > > xen/common/memory.c | 37 ++++++++++++++++++- > > xen/include/asm-arm/p2m.h | 2 + 3 files changed, 118 > > insertions(+), 9 deletions(-) > > This patch doesn't compile on ARM: > memory.c: In function 'do_memory_op': > memory.c:682:20: error: unused variable > 'p2mt' [-Werror=unused-variable] cc1: all warnings being treated as > errors > > For x86, when a domain is destroyed and there is still some foreign > page mapped, you forget to decrease the refcount (via put_page). It > will likely result to a zombie domain. right, i totally forgot. i think i can do that in p2m_remove_page.