Received: from eggs.gnu.org ([208.118.235.92]:33015) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T4XRz-0006bL-1o for qemu-devel@nongnu.org; Thu, 23 Aug 2012 09:28:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T4XRx-0001il-VH for qemu-devel@nongnu.org; Thu, 23 Aug 2012 09:27:54 -0400 Received: from smtp.ctxuk.citrix.com ([62.200.22.115]:9717 helo=SMTP.EU.CITRIX.COM) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T4XRx-0001id-PI for qemu-devel@nongnu.org; Thu, 23 Aug 2012 09:27:53 -0400 Message-ID: <1345728471.12501.90.camel@zakaz.uk.xensource.com> From: Ian Campbell Date: Thu, 23 Aug 2012 14:27:51 +0100 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [Xen-devel] [XEN][RFC PATCH V2 11/17] xc: modify save/restore to support multiple device models List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Julien Grall Cc: "christian.limpach@gmail.com" , "xen-devel@lists.xen.org" , "qemu-devel@nongnu.org" , Stefano Stabellini On Wed, 2012-08-22 at 13:31 +0100, Julien Grall wrote: > - add save/restore new special pages and remove unused > - modify save file structure to allow multiple qemu states > > Signed-off-by: Julien Grall > --- > tools/libxc/xc_domain_restore.c | 150 +++++++++++++++++++++++++++++---------- > tools/libxc/xc_domain_save.c | 6 +- As you've changed the protocol olease can you update the docs in xg_save_restore.h. > @@ -103,6 +103,9 @@ static ssize_t rdexact(xc_interface *xch, struct restore_ctx *ctx, > #else > #define RDEXACT read_exact > #endif > + > +#define QEMUSIG_SIZE 21 > + > /* > ** In the state file (or during transfer), all page-table pages are > ** converted into a 'canonical' form where references to actual mfns > @@ -467,7 +522,7 @@ static int buffer_tail_hvm(xc_interface *xch, struct restore_ctx *ctx, > int vcpuextstate, uint32_t vcpuextstate_size) > { > uint8_t *tmp; > - unsigned char qemusig[21]; > + unsigned char qemusig[QEMUSIG_SIZE + 1]; An extra + 1 here? [...] > - qemusig[20] = '\0'; > + qemusig[QEMUSIG_SIZE] = '\0'; This is one bigger than it used to be now. Perhaps this is an unrelated bug fix (I haven't check the real length of the sig), in which case please can you split it out and submit separately? Ian.