WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] Question about direct memory access of domU from dom0

To: Jeff Bickford <tassadar27@xxxxxxxxx>
Subject: Re: [Xen-devel] Question about direct memory access of domU from dom0
From: Brendan Cully <brendan@xxxxxxxxx>
Date: Thu, 10 Sep 2009 14:02:54 -0700
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Thu, 10 Sep 2009 14:03:18 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <123bb170909101355k2d2cdec1o54ad50fb9ee81dac@xxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Mail-followup-to: tassadar27@xxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxx
References: <123bb170909101355k2d2cdec1o54ad50fb9ee81dac@xxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.20 (2009-08-17)
On Thursday, 10 September 2009 at 16:55, Jeff Bickford wrote:
> Hello,
> 
> I am porting a C application that requires taking a snapshot of memory on the
> computer you are running.  The original program uses an external PCI card to
> read the memory and now I am trying to port this to xen.  I want to run the
> program in the dom0 guest but the memory that it will be taking a snapshot of
> is the of memory in the domU guest.  I am using the xen hypervisor 3.3.  Is
> there any specific library or API I can use in C to do this?  The xen api on
> xensource seems to only talk about xensource never about the hypervisor 
> alone. 
> Thank you.

Have a look at tools/libxc/xc_domain_save.c. That's the heart of xm
save/xm migrate. Basically it's:

1. pause the domU
2. map its memory
3. copy it out
4. unpause

You may need to map in batches if the guest memory is too large to fit
in your copying process's address space.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>