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] Xen source code structure

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-devel] Xen source code structure
From: Mark Williamson <mark.williamson@xxxxxxxxxxxx>
Date: Fri, 13 Jul 2007 02:42:47 +0100
Cc: Yi Wang <wymail@xxxxxxxxx>
Delivery-date: Thu, 12 Jul 2007 18:40:34 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <9026964a0707121354j7a2fb2e6s881cf05df9686817@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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <9026964a0707121354j7a2fb2e6s881cf05df9686817@xxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.9.6
> Is there any document about the structure of the Xen source code?  I
> downloaded the source code from
> http://bits.xensource.com/oss-xen/release/3.1.0/src.tgz/xen-3.1.0-src.tgz,
> but I had a hard time finding the part of code that handles the live
> migration.

For the userspace side, the most important code is in tools/libxc.  Try taking 
a look at tools/libxc/xc_domain_{save,restore}.c which are used both for 
normal suspend / resume of guests and for live migration.

Other relevant code is the shadow pagetable implementation - used, amongst 
other things, to enable logging of page dirtying for live migration.  The 
shadow op XEN_DOMCTL_SHADOW_OP_ENABLE_LOGDIRTY is used to enable this (this 
DOMCTL is implemented in xen/arch/x86/mm/shadow/paging.c).

Also, for PV domains, there is some communication with the domain itself 
telling it to quiesce ready for migration.  This involves Xenstore, the 
control tools, the guest's core kernel and the Xen device drivers within the 
guest.

For HVM domains, the Qemu device model must serialise its state so that it can 
be restored elsewhere.

That's a high speed, high altitude overview of a few interesting points.  I've 
probably missed something important, but maybe this'll get you started ;-)

HTH,
Mark

-- 
Dave: Just a question. What use is a unicyle with no seat?  And no pedals!
Mark: To answer a question with a question: What use is a skateboard?
Dave: Skateboards have wheels.
Mark: My wheel has a wheel!

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

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