From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:53384) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UboZv-0006mx-5V for qemu-devel@nongnu.org; Mon, 13 May 2013 04:57:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UboZt-0006Fq-5r for qemu-devel@nongnu.org; Mon, 13 May 2013 04:57:55 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50259) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UboZs-0006FY-U2 for qemu-devel@nongnu.org; Mon, 13 May 2013 04:57:53 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r4D8vpDs031703 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 13 May 2013 04:57:51 -0400 From: Juan Quintela In-Reply-To: <1368357388-25906-1-git-send-email-alevy@redhat.com> (Alon Levy's message of "Sun, 12 May 2013 14:16:28 +0300") References: <1368357388-25906-1-git-send-email-alevy@redhat.com> Date: Mon, 13 May 2013 10:57:57 +0200 Message-ID: <87fvxrdzoq.fsf@elfo.elfo> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH v3] arch_init/ram_load: add error message for block length mismatch Reply-To: quintela@redhat.com List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alon Levy Cc: owasserm@redhat.com, shajnocz@redhat.com, qemu-devel@nongnu.org Alon Levy wrote: > Makes it easier to debug situations where the source and target have > different ram blocks in a device and migration fails due to that, for > instance a BAR size change on a PCI device. > > Signed-off-by: Alon Levy > --- > v3: use RAM_ADDR_FMT > > arch_init.c | 3 +++ > 1 file changed, 3 insertions(+) > Reviewed-by: Juan Quintela will be included in next pull request. thanks. > diff --git a/arch_init.c b/arch_init.c > index 49c5dc2..cd27fcf 100644 > --- a/arch_init.c > +++ b/arch_init.c > @@ -808,6 +808,9 @@ static int ram_load(QEMUFile *f, void *opaque, int version_id) > QTAILQ_FOREACH(block, &ram_list.blocks, next) { > if (!strncmp(id, block->idstr, sizeof(id))) { > if (block->length != length) { > + fprintf(stderr, "Length mismatch: %s: %ld " > + "in != " RAM_ADDR_FMT "\n", id, length, > + block->length); > ret = -EINVAL; > goto done; > }