[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [V6 PATCH 6/7] pvh dom0: Add and remove foreign pages





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 <mukesh.rathor@xxxxxxxxxx>
---
  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. For instance a stubdomain with foreign map on a guest. If the stubdomain doesn't release the page, this guest will become a zombie.

--
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.