From patchwork Wed Jul 8 14:26:07 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Dr. David Alan Gilbert" X-Patchwork-Id: 492955 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 589D7140773 for ; Thu, 9 Jul 2015 00:26:33 +1000 (AEST) Received: from localhost ([::1]:35356 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZCqIx-0001y8-9q for incoming@patchwork.ozlabs.org; Wed, 08 Jul 2015 10:26:31 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58668) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZCqIg-0001hM-OT for qemu-devel@nongnu.org; Wed, 08 Jul 2015 10:26:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZCqIb-0001LS-OZ for qemu-devel@nongnu.org; Wed, 08 Jul 2015 10:26:14 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60329) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZCqIb-0001LO-JA for qemu-devel@nongnu.org; Wed, 08 Jul 2015 10:26:09 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id 470063CBA39 for ; Wed, 8 Jul 2015 14:26:09 +0000 (UTC) Received: from dgilbert-t530.redhat.com (ovpn-116-80.ams2.redhat.com [10.36.116.80]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t68EQ7tK010140; Wed, 8 Jul 2015 10:26:08 -0400 From: "Dr. David Alan Gilbert (git)" To: qemu-devel@nongnu.org Date: Wed, 8 Jul 2015 15:26:07 +0100 Message-Id: <1436365567-27164-1-git-send-email-dgilbert@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: amit.shah@redhat.com, quintela@redhat.com Subject: [Qemu-devel] [PATCH] RDMA: Reduce restriction on block length match X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: "Dr. David Alan Gilbert" My e4d633207 patch has an over zealous sanity check that checked the lengths of the RAM Blocks on source/destination were the same. This isn't true because of the 'used_length' trick for RAM blocks like the ACPI table that vary in size. Prior to that patch RDMA would also fail in this case, but it should now work with the changes in the set e4d633207 is in. Signed-off-by: Dr. David Alan Gilbert Fixes: e4d633207c129dc5b7d145240ac4a1997ef3902f --- migration/rdma.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/migration/rdma.c b/migration/rdma.c index f106b2a..1d094b0 100644 --- a/migration/rdma.c +++ b/migration/rdma.c @@ -3338,14 +3338,15 @@ static int qemu_rdma_registration_stop(QEMUFile *f, void *opaque, for (i = 0; i < nb_dest_blocks; i++) { network_to_dest_block(&rdma->dest_blocks[i]); - /* We require that the blocks are in the same order */ + /* We require that the blocks are in the same order, + * but the used_length trick for acpi blocks means that + * the destination can validly be larger than the source + */ if (rdma->dest_blocks[i].length != local->block[i].length) { - ERROR(errp, "Block %s/%d has a different length %" PRIu64 - "vs %" PRIu64, local->block[i].block_name, i, - local->block[i].length, + fprintf(stderr, "INFO: Block %s/%d has a different length %" + PRIu64 "vs %" PRIu64, local->block[i].block_name, + i, local->block[i].length, rdma->dest_blocks[i].length); - rdma->error_state = -EINVAL; - return -EINVAL; } local->block[i].remote_host_addr = rdma->dest_blocks[i].remote_host_addr;