[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] Fail save if we have an out-of-sync P2M/M2P (since otherwise the restore
# HG changeset patch # User shand@xxxxxxxxxxxxxxxxxxxxxxxx # Node ID 2e5f6c68da5cf9d80b83141601f5e15a9fb92a1b # Parent 3d40e2f509fcab64960646f94002ff52ec23a1f1 Fail save if we have an out-of-sync P2M/M2P (since otherwise the restore will fail later). A better fix would be to tolerate temporary out-of-sync situations so we can make a nicer fix to the kunmap_atomic() iossue (c/f -unstable csets 10529 & 10533) but this requires some more thought. Signed-off-by: Steven Hand <steven@xxxxxxxxxxxxx> --- tools/libxc/xc_linux_save.c | 23 ++++++++++++++--------- 1 files changed, 14 insertions(+), 9 deletions(-) diff -r 3d40e2f509fc -r 2e5f6c68da5c tools/libxc/xc_linux_save.c --- a/tools/libxc/xc_linux_save.c Thu Jun 29 11:20:46 2006 +0100 +++ b/tools/libxc/xc_linux_save.c Thu Jun 29 11:31:10 2006 +0100 @@ -415,11 +415,11 @@ static int suspend_and_state(int (*suspe ** which entries do not require canonicalization (in particular, those ** entries which map the virtual address reserved for the hypervisor). */ -void canonicalize_pagetable(unsigned long type, unsigned long pfn, - const void *spage, void *dpage) -{ - - int i, pte_last, xen_start, xen_end; +int canonicalize_pagetable(unsigned long type, unsigned long pfn, + const void *spage, void *dpage) +{ + + int i, pte_last, xen_start, xen_end, race = 0; uint64_t pte; /* @@ -481,7 +481,8 @@ void canonicalize_pagetable(unsigned lon is quite feasible under live migration */ DPRINTF("PT Race: [%08lx,%d] pte=%llx, mfn=%08lx\n", type, i, (unsigned long long)pte, mfn); - pfn = 0; /* zap it - we'll retransmit this page later */ + pfn = 0; /* zap it - we'll retransmit this page later */ + race = 1; /* inform the caller of race; fatal if !live */ } else pfn = mfn_to_pfn(mfn); @@ -496,7 +497,7 @@ void canonicalize_pagetable(unsigned lon } - return; + return race; } @@ -567,7 +568,7 @@ int xc_linux_save(int xc_handle, int io_ int rc = 1, i, j, last_iter, iter = 0; int live = (flags & XCFLAGS_LIVE); int debug = (flags & XCFLAGS_DEBUG); - int sent_last_iter, skip_this_iter; + int race = 0, sent_last_iter, skip_this_iter; /* The new domain's shared-info frame number. */ unsigned long shared_info_frame; @@ -1000,7 +1001,11 @@ int xc_linux_save(int xc_handle, int io_ if (pagetype >= L1TAB && pagetype <= L4TAB) { /* We have a pagetable page: need to rewrite it. */ - canonicalize_pagetable(pagetype, pfn, spage, page); + race = + canonicalize_pagetable(pagetype, pfn, spage, page); + + if(race && !live) + goto out; if (ratewrite(io_fd, page, PAGE_SIZE) != PAGE_SIZE) { ERR("Error when writing to state file (4)"); _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |