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>
Subject: RE: [Xen-devel] save/restore race
From: "Ian Pratt" <m+Ian.Pratt@xxxxxxxxxxxx>
Date: Tue, 23 Jan 2007 23:38:29 -0000
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Tue, 23 Jan 2007 15:38:38 -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> <8A87A9A84C201449A0C56B728ACF491E04F284@xxxxxxxxxxxxxxxxxxxxxxxxxxx> <20070123224856.GA25347@xxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Acc/QIWjtn6adrjCSxWkxtgg4HAfRgABZGzA
Thread-topic: [Xen-devel] save/restore race
> > Just ignore any new suspend request until you've got the frame list
list
> > rebuilt.
> 
> see xc_linux_save.c:
> 
>  667     live_p2m_frame_list_list =
>  668         xc_map_foreign_range(xc_handle, dom, PAGE_SIZE,
PROT_READ,
>  669 live_shinfo->arch.pfn_to_mfn_frame_list_list);
> 
> ...
> 
> 1087                 if (suspend_and_state(suspend, xc_handle, io_fd,
dom,
> &info,
> 1088                                       &ctxt)) {
> 1089                     ERROR("Domain appears not to have
suspended");
> 1090                     goto out;
> 1091                 }
> 
> We use the value long before the domain is told to suspend.

Ah, I see what you're getting at.

We should make xc_linux_save cope more gracefully with
arch.pfn_to_mfn_frame_list_list being NULL, have xc_linux_save zero the
field in shared_info before writing it out (its an MFN and not valid
anyhow), and then move the field's re-initialisation a little later in
the post_suspend function to close the race.

Best,
Ian



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