Xen 
 
Home About Xen.org Xen Xen Summit Wiki Mailing List Bug Tracker Xen Downloads
 
   
 

xen-devel

[Xen-devel] [PATCH 00 of 12] xen: add save/restore/migrate for Xen domai

To: Ingo Molnar <mingo@xxxxxxx>
Subject: [Xen-devel] [PATCH 00 of 12] xen: add save/restore/migrate for Xen domains
From: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Date: Fri, 23 May 2008 14:41:07 +0100
Cc: "Rafael J. Wysocki" <rjw@xxxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxxxxx>, xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, LKML <linux-kernel@xxxxxxxxxxxxxxx>
Delivery-date: Fri, 23 May 2008 06:45:08 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Hi Ingo,

This series adds save/restore/migrate for Xen domains.  This is almost
entirely contained within the Xen-specific code.

The only exception is the WARN_ON I remove in hres_timers_resume,
which is spurious in the case of a Xen suspend/resume, since we don't
offline all the CPUs.

This also adds another user of the freezer, since it turns out to
solve a somewhat tricky problem.  The problem is that Xen pagetables
are expressed in terms of machine frame numbers - ie, the page numbers
of the underlying host machine.  When the domain is saved, all the
mfns everywhere are canonicalized into guest-relative pfns in the save
image.  The tricky part is that when preemption is enabled, it's
possible the suspend will preempt a pagetable manipulation, which will
leave a machine frame number sitting in a register or on the stack
which will not be canonicalized.

The freezer solves this because it makes sure that every thread is
quiesced at a well known point, which is not during a pagetable
update.  So by freezing everything and then stopping all the
processors in stop_machine, we can make sure the system is in a
saveable state.

The freezer is only required when preemption is enabled, since
stop_machine will quiesce all processors (and therefore threads) at
suitable points anyway.

     J


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