All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] timer/aspeed: fix vmstate version id
@ 2018-04-23  6:40 Cédric Le Goater
  2018-04-23  9:12 ` Peter Maydell
  0 siblings, 1 reply; 8+ messages in thread
From: Cédric Le Goater @ 2018-04-23  6:40 UTC (permalink / raw)
  To: qemu-arm, qemu-devel; +Cc: Peter Maydell, Andrew Jeffery, Cédric Le Goater

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édric Le Goater <clg@kaod.org>
---

 To test on a 'palmetto-bmc' board, download the latest built OpenBMC
 flash image :

   wget https://openpower.xyz/job/openbmc-build/distro=ubuntu,target=palmetto/lastSuccessfulBuild/artifact/deploy/images/palmetto/flash-palmetto

 start two instances of QEMU with :

   qemu-system-arm -m 512 -M palmetto-bmc -drive file=./flash-palmetto,format=raw,if=mtd -serial mon:stdio -nographic -nodefaults

 and :
 
   qemu-system-arm -m 512 -M palmetto-bmc -drive file=./flash-palmetto,format=raw,if=mtd -serial mon:stdio -nographic -nodefaults -incoming tcp::1234

 then, run migrate from the monitor:
 
   (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 = {
 
 static const VMStateDescription vmstate_aspeed_timer_state = {
     .name = "aspeed.timerctrl",
-    .version_id = 1,
-    .minimum_version_id = 1,
+    .version_id = 2,
+    .minimum_version_id = 2,
     .fields = (VMStateField[]) {
         VMSTATE_UINT32(ctrl, AspeedTimerCtrlState),
         VMSTATE_UINT32(ctrl2, AspeedTimerCtrlState),
-- 
2.13.6

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2018-04-23 11:36 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-23  6:40 [Qemu-devel] [PATCH] timer/aspeed: fix vmstate version id Cédric Le Goater
2018-04-23  9:12 ` Peter Maydell
2018-04-23  9:28   ` Cédric Le Goater
2018-04-23  9:34     ` Peter Maydell
2018-04-23  9:55       ` Cédric Le Goater
2018-04-23 10:00       ` Cédric Le Goater
2018-04-23 10:46         ` Dr. David Alan Gilbert
2018-04-23 11:35           ` Cédric Le Goater

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.