From: Guido =?iso-8859-1?Q?G=FCnther?= Subject: [PATCH] libxc: reset ctx->completed on each domain restore Date: Wed, 5 Oct 2011 20:14:13 +0200 Message-ID: <20111005181413.GA32317@bogon.sigxcpu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="6c2NcOVqGQ03X4Wi" Content-Transfer-Encoding: 8bit Return-path: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --6c2NcOVqGQ03X4Wi Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit Hi, When using current libvirt git with libxenlight 4.1.1 restoring a domain the second time like: virsh save foo foo.img virsh restore foo.img virsh destroy foo virsh restore foo.img fails like: xc: detail: xc_domain_restore start: p2m_size = 100000 xc: debug: batch 0 xc: debug: Use old firmware ioport from the checkpoint xc: detail: Writing 0 bytes of QEMU data to /var/lib/xen/qemu-resume.733 xc: error: error zeroing magic pages (22 = Das Argument ist ungültig): Internal error xc: detail: Restore exit with rc=1 Note the absence of any: xc: debug: batch 1024 lines that are there on successful resumes. The attached patch fixes this for me on 4.1.1. However current xen hg fails the same way and since the static structs are gone I wonder what's causing it there. Any ideas would be welcome! Cheers, -- Guido --6c2NcOVqGQ03X4Wi Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0001-xc_domain_restore-reset-the-completed-flag.patch" >From 1287d8d2fbc38bb0ab507756281e8d726cf92464 Mon Sep 17 00:00:00 2001 From: Guido Guenther Date: Wed, 5 Oct 2011 19:52:11 +0200 Subject: [PATCH] xc_domain_restore: reset the completed flag otherwise long running processes like libvirt can resume a domain only once. --- a/tools/libxc/xc_domain_restore.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/tools/libxc/xc_domain_restore.c b/tools/libxc/xc_domain_restore.c index 083927a..6edd584 100644 --- a/tools/libxc/xc_domain_restore.c +++ b/tools/libxc/xc_domain_restore.c @@ -1145,6 +1145,7 @@ int xc_domain_restore(xc_interface *xch, int io_fd, uint32_t dom, memset(&tailbuf, 0, sizeof(tailbuf)); tailbuf.ishvm = hvm; + ctx->completed = 0; /* For info only */ ctx->nr_pfns = 0; -- 1.7.2.5 --6c2NcOVqGQ03X4Wi Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --6c2NcOVqGQ03X4Wi--