From nobody Thu May 2 08:24:07 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1500310410194693.5662301622363; Mon, 17 Jul 2017 09:53:30 -0700 (PDT) Received: from localhost ([::1]:51527 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dX9Gq-0006ml-Hy for importer@patchew.org; Mon, 17 Jul 2017 12:53:20 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55400) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dX9G0-0006Q6-RD for qemu-devel@nongnu.org; Mon, 17 Jul 2017 12:52:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dX9G0-0000yS-2V for qemu-devel@nongnu.org; Mon, 17 Jul 2017 12:52:28 -0400 Received: from orth.archaic.org.uk ([2001:8b0:1d0::2]:37647) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dX9Fx-0000wO-TD; Mon, 17 Jul 2017 12:52:26 -0400 Received: from pm215 by orth.archaic.org.uk with local (Exim 4.84_2) (envelope-from ) id 1dX9Fu-0003nD-Gm; Mon, 17 Jul 2017 17:52:22 +0100 From: Peter Maydell To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Date: Mon, 17 Jul 2017 17:52:21 +0100 Message-Id: <1500310341-28931-1-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 2.7.4 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:8b0:1d0::2 Subject: [Qemu-devel] [PATCH for-2.10] integratorcp: Don't migrate flash using vmstate_register_ram_global() 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: patches@linaro.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Instead of migrating the flash by creating the memory region with memory_region_init_ram_nomigrate() and then calling vmstate_register_ram_global(), just use memory_region_init_ram(), which now handles migration registration automatically. This is a migration compatibility break for the integratorcp board, because the RAM region's migration name changes to include the device path. This is OK because we don't guarantee migration compatibility for this board. Signed-off-by: Peter Maydell --- hw/arm/integratorcp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/arm/integratorcp.c b/hw/arm/integratorcp.c index d79221d..d9530ed 100644 --- a/hw/arm/integratorcp.c +++ b/hw/arm/integratorcp.c @@ -276,9 +276,8 @@ static void integratorcm_init(Object *obj) s->cm_init =3D 0x00000112; s->cm_refcnt_offset =3D muldiv64(qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL)= , 24, 1000); - memory_region_init_ram_nomigrate(&s->flash, obj, "integrator.flash", 0= x100000, + memory_region_init_ram(&s->flash, obj, "integrator.flash", 0x100000, &error_fatal); - vmstate_register_ram_global(&s->flash); =20 memory_region_init_io(&s->iomem, obj, &integratorcm_ops, s, "integratorcm", 0x00800000); --=20 2.7.4