From nobody Thu May 2 09:42:38 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 1524465736307743.049049302823; Sun, 22 Apr 2018 23:42:16 -0700 (PDT) Received: from localhost ([::1]:46676 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fAVAs-0008P0-BG for importer@patchew.org; Mon, 23 Apr 2018 02:42:06 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45762) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fAV9f-0007s5-Pk for qemu-devel@nongnu.org; Mon, 23 Apr 2018 02:40:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fAV9a-0005io-SZ for qemu-devel@nongnu.org; Mon, 23 Apr 2018 02:40:51 -0400 Received: from 9.mo173.mail-out.ovh.net ([46.105.72.44]:50051) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fAV9a-0005dh-ML for qemu-devel@nongnu.org; Mon, 23 Apr 2018 02:40:46 -0400 Received: from player737.ha.ovh.net (unknown [10.109.108.121]) by mo173.mail-out.ovh.net (Postfix) with ESMTP id F3B42B051C for ; Mon, 23 Apr 2018 08:40:36 +0200 (CEST) Received: from zorba.kaod.org.com (LFbn-TOU-1-49-10.w86-201.abo.wanadoo.fr [86.201.141.10]) (Authenticated sender: clg@kaod.org) by player737.ha.ovh.net (Postfix) with ESMTPSA id CBE30E00C3; Mon, 23 Apr 2018 08:40:30 +0200 (CEST) From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Date: Mon, 23 Apr 2018 08:40:20 +0200 Message-Id: <20180423064020.25434-1-clg@kaod.org> X-Mailer: git-send-email 2.13.6 MIME-Version: 1.0 X-Ovh-Tracer-Id: 9215490739963792304 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -65 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtgedrkeefgddutdejucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnegfrhhlucfvnfffucdlfeehmd Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 46.105.72.44 Subject: [Qemu-devel] [PATCH] timer/aspeed: fix vmstate version id 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: Andrew Jeffery , Peter Maydell , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" commit 1d3e65aa7ac5 ("hw/timer: Add value matching support to aspeed_timer") increased the vmstate version of the timers array but doing so, it broke migration. To fix, we also need to change the vmstate version of the aspeed timer controller model. Signed-off-by: C=C3=A9dric Le Goater --- To test on a 'palmetto-bmc' board, download the latest built OpenBMC flash image : wget https://openpower.xyz/job/openbmc-build/distro=3Dubuntu,target=3Dpa= lmetto/lastSuccessfulBuild/artifact/deploy/images/palmetto/flash-palmetto start two instances of QEMU with : qemu-system-arm -m 512 -M palmetto-bmc -drive file=3D./flash-palmetto,fo= rmat=3Draw,if=3Dmtd -serial mon:stdio -nographic -nodefaults and : =20 qemu-system-arm -m 512 -M palmetto-bmc -drive file=3D./flash-palmetto,fo= rmat=3Draw,if=3Dmtd -serial mon:stdio -nographic -nodefaults -incoming tcp:= :1234 then, run migrate from the monitor: =20 (qemu) migrate tcp:localhost:1234 hw/timer/aspeed_timer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/timer/aspeed_timer.c b/hw/timer/aspeed_timer.c index 50acbf530a3a..7df19bd9df91 100644 --- a/hw/timer/aspeed_timer.c +++ b/hw/timer/aspeed_timer.c @@ -498,8 +498,8 @@ static const VMStateDescription vmstate_aspeed_timer = =3D { =20 static const VMStateDescription vmstate_aspeed_timer_state =3D { .name =3D "aspeed.timerctrl", - .version_id =3D 1, - .minimum_version_id =3D 1, + .version_id =3D 2, + .minimum_version_id =3D 2, .fields =3D (VMStateField[]) { VMSTATE_UINT32(ctrl, AspeedTimerCtrlState), VMSTATE_UINT32(ctrl2, AspeedTimerCtrlState), --=20 2.13.6