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] save/restore race

To: "John Levon" <levon@xxxxxxxxxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: RE: [Xen-devel] save/restore race
From: "Ian Pratt" <m+Ian.Pratt@xxxxxxxxxxxx>
Date: Tue, 23 Jan 2007 22:15:29 -0000
Delivery-date: Tue, 23 Jan 2007 14:15:40 -0800
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>
References: <20070123220145.GA22372@xxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Acc/OgexLM6f8D7fQyy8N2xiYzfxJQAATp8g
Thread-topic: [Xen-devel] save/restore race
> save requires a valid arch.pfn_to_mfn_frame_list_list MFN. However,
> there is no guarantee that this is up to date, since a previous
> restore is considered complete as soon as the domain is unpaused:
> 
>         if not paused:
>             dominfo.unpause()
> 
>         dominfo.completeRestore(handler.store_mfn,
handler.console_mfn)
> 
> It seems that Linux is being lucky here, in that rebuilding the MFNs
is
> the first thing it does after suspend(). On Solaris, it occurs
somewhat
> later in the resume process due to constraints on locking within our
MMU
> code.
> 
> This doesn't seem specific to migration either, a save just after a
> restore has completed can hit this race as far as I can see. I'm short
> on ideas that don't involve a new interface (like the domain writing
> back a xenstore value when it's done resuming). Suggestions?

Just ignore any new suspend request until you've got the frame list list
rebuilt.

In the Linux code this is implicit as xenbus and even interrupts aren't
re-enabled until after this.

Ian 

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