From nobody Sun May 5 15:07:18 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 (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1524478573152488.43484356696433; Mon, 23 Apr 2018 03:16:13 -0700 (PDT) Received: from localhost ([::1]:33570 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fAYVv-0001SU-W1 for importer@patchew.org; Mon, 23 Apr 2018 06:16:04 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33170) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fAYUo-0000sD-AQ for qemu-devel@nongnu.org; Mon, 23 Apr 2018 06:14:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fAYUl-0000YE-4w for qemu-devel@nongnu.org; Mon, 23 Apr 2018 06:14:54 -0400 Received: from 5.mo173.mail-out.ovh.net ([46.105.40.148]:44400) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fAYUk-0000WB-TD for qemu-devel@nongnu.org; Mon, 23 Apr 2018 06:14:51 -0400 Received: from player774.ha.ovh.net (unknown [10.109.122.116]) by mo173.mail-out.ovh.net (Postfix) with ESMTP id 22486BF71C for ; Mon, 23 Apr 2018 12:14:49 +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 player774.ha.ovh.net (Postfix) with ESMTPSA id F262F400A2; Mon, 23 Apr 2018 12:14:42 +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 12:14:33 +0200 Message-Id: <20180423101433.17759-1-clg@kaod.org> X-Mailer: git-send-email 2.13.6 MIME-Version: 1.0 X-Ovh-Tracer-Id: 12833007138977319856 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -65 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtgedrkeeggddviecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenfghrlhcuvffnffculdefhedm 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.40.148 Subject: [Qemu-devel] [PATCH v2] 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 aspeed.timer because the state had changed, but it also bumped the version of the VMSTATE_STRUCT_ARRAY under the aspeed.timerctrl which did not need to. Change back this version to fix migration. 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 Changes since v1: - change version of VMSTATE_STRUCT_ARRAY and not vmstate_aspeed_timer_state hw/timer/aspeed_timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/timer/aspeed_timer.c b/hw/timer/aspeed_timer.c index 50acbf530a3a..1e31e22b6f1f 100644 --- a/hw/timer/aspeed_timer.c +++ b/hw/timer/aspeed_timer.c @@ -504,7 +504,7 @@ static const VMStateDescription vmstate_aspeed_timer_st= ate =3D { VMSTATE_UINT32(ctrl, AspeedTimerCtrlState), VMSTATE_UINT32(ctrl2, AspeedTimerCtrlState), VMSTATE_STRUCT_ARRAY(timers, AspeedTimerCtrlState, - ASPEED_TIMER_NR_TIMERS, 2, vmstate_aspeed_tim= er, + ASPEED_TIMER_NR_TIMERS, 1, vmstate_aspeed_tim= er, AspeedTimer), VMSTATE_END_OF_LIST() } --=20 2.13.6