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

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



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


 


Rackspace

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