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

Re: [Xen-devel] Question about mapping hvmâs memory to dom0


  • To: xen-devel@xxxxxxxxxxxxx
  • From: Dietmar Hahn <dietmar.hahn@xxxxxxxxxxxxxx>
  • Date: Mon, 01 Jul 2013 12:19:10 +0200
  • Cc: George Dunlap <George.Dunlap@xxxxxxxxxxxxx>, Kai Luo <kluo@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Mon, 01 Jul 2013 10:19:30 +0000
  • Domainkey-signature: s=s1536a; d=ts.fujitsu.com; c=nofws; q=dns; h=X-SBRSScore:X-IronPort-AV:Received:X-IronPort-AV: Received:Received:From:To:Cc:Subject:Date:Message-ID: User-Agent:In-Reply-To:References:MIME-Version: Content-Transfer-Encoding:Content-Type; b=OTE0tBmeASdx1htxaXIPU7BHdnqKFZNgPPFWKFvt1r55ZMQpIMHcQYu7 5DK9zVx0p1MoPTdBPF/KAXz0YP2G/l+LcrwLNhkL7nxlqzTJvFYZJSPjO Wc84j7eOoYbgzWBsZelq83skrGuvb2Iu+lDtTD7A33OcXY4z68QC9vnRJ tPPPsqLLZy4ytgGPNH5fEvnx/hSgyhd1xZBaO0Ls9ex786vXi0vyZQmWy OwX0bWgxWbWKGpWgtLcogNontRmjn;
  • List-id: Xen developer discussion <xen-devel.lists.xen.org>

Am Montag 01 Juli 2013, 10:52:45 schrieb George Dunlap:
> On Mon, Jul 1, 2013 at 3:32 AM, Kai Luo <kluo@xxxxxxxxxx> wrote:
> > Hi:
> >         I am trying to make some source code modifications to map the hvm
> > memory to dom0,I use the xc_map_foreign_bulk to do this,It works and I
> > export the hvm's memory to a file. My question is,after mapping the memory I
> > use xc_domain_destroy to shutdown the running hvm,theoretically the mapped
> > memory will be scrubbed because xen will scrubbed the hvm's memory before
> > they are freed to xen hyperviser,however I export the mapped memory after
> > destroying hvm,finding the content in mapped memory nearly same as formly
> > exported,they are not scrubbed at all.That confused me.Can you give me any
> > suggestion?
> 
> Just let me clarify a bit: You're saying that you 1) map the guest
> memory, 2) destroy the domain, 3) read the already-mapped memory
> again?
> 
> If you keep the guest memory mapped by dom0 after you destroy the
> domain, then the memory still has reference counts and isn't freed,
> and thus won't be scrubbed.  (In fact, if you do "xl list", I bet
> you'll find a "zombie domain" still left over which cant' shut down
> because its pages aren't freed yet.)

Not sure if 'xl list' shows the dying domain. But you can see this via the
hypervisor console when pressing 'q'.

Dietmar.

> When you unmap the pages in
> dom0, they will then be freed, and since the domain is in the
> "is_dying" state, they will be scrubbed.
> 
> The logic can be found in xen/common/page_alloc.c:free_domheap_pages().
> 
>  -George
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxx
> http://lists.xen.org/xen-devel
> 
-- 
Company details: http://ts.fujitsu.com/imprint.html

_______________________________________________
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®.