From patchwork Tue Aug 1 08:10:47 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: KONRAD Frederic X-Patchwork-Id: 796114 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) 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 3xM8Dm1ByTz9tWd for ; Tue, 1 Aug 2017 18:12:07 +1000 (AEST) Received: from localhost ([::1]:35037 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dcSHU-0003DQ-M1 for incoming@patchwork.ozlabs.org; Tue, 01 Aug 2017 04:11:56 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39836) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dcSGw-0003D8-F7 for qemu-devel@nongnu.org; Tue, 01 Aug 2017 04:11:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dcSGt-0008Hu-Bg for qemu-devel@nongnu.org; Tue, 01 Aug 2017 04:11:22 -0400 Received: from mel.act-europe.fr ([194.98.77.210]:44525 helo=smtp.eu.adacore.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dcSGt-0008HF-62 for qemu-devel@nongnu.org; Tue, 01 Aug 2017 04:11:19 -0400 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 2A4BD8139D; Tue, 1 Aug 2017 10:11:18 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at eu.adacore.com Received: from smtp.eu.adacore.com ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id IQZq3AH-3JaX; Tue, 1 Aug 2017 10:11:18 +0200 (CEST) Received: from localhost.localdomain.localdomain (unknown [IPv6:2a01:e35:87f0:3180:2b18:7e65:c33:7f62]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.eu.adacore.com (Postfix) with ESMTPSA id 7514C813D3; Tue, 1 Aug 2017 10:11:17 +0200 (CEST) From: KONRAD Frederic To: peter.maydell@linaro.org Date: Tue, 1 Aug 2017 10:10:47 +0200 Message-Id: <1501575048-13485-2-git-send-email-frederic.konrad@adacore.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1501575048-13485-1-git-send-email-frederic.konrad@adacore.com> References: <1501575048-13485-1-git-send-email-frederic.konrad@adacore.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 194.98.77.210 Subject: [Qemu-devel] [PATCH for-2.10 1/2] mmio-execution: warn the potential developer about migration X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: quintela@redhat.com, qemu-devel@nongnu.org, dgilbert@redhat.com, frederic.konrad@adacore.com, edgar.iglesias@gmail.com, alistair.francis@xilinx.com Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" There are two potential corner cases with mmio-execution: * It adds a mmio-interface device which will be migrated. * It modifies the RAMBlock list during live migration which odd side effects. Signed-off-by: KONRAD Frederic --- include/exec/memory.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/exec/memory.h b/include/exec/memory.h index 400dd44..4ded02c 100644 --- a/include/exec/memory.h +++ b/include/exec/memory.h @@ -154,6 +154,10 @@ struct MemoryRegionOps { * @offset is the location of the pointer inside @mr. * * Returns a pointer to a location which contains guest code. + * + * Warning: This breaks migration if used before or during migration + * because mmio-interface device will be migrated and because + * RAMBlock list _must_ be static during migration. */ void *(*request_ptr)(void *opaque, hwaddr addr, unsigned *size, unsigned *offset);