qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: Anthony Liguori <aliguori@us.ibm.com>, Blue Swirl <blauwirbel@gmail.com>
Cc: qemu-devel@nongnu.org, Paul Brook <paul@codesourcery.com>
Subject: [Qemu-devel] [PATCH 06/14] hw/onenand.c: fix migration of dynamically allocated buffer "otp"
Date: Fri,  5 Apr 2013 18:13:11 +0100	[thread overview]
Message-ID: <1365181999-15387-7-git-send-email-peter.maydell@linaro.org> (raw)
In-Reply-To: <1365181999-15387-1-git-send-email-peter.maydell@linaro.org>

From: Igor Mitsyanko <i.mitsyanko@gmail.com>

VMSTATE_BUFFER_UNSAFE should be used for buffers inlined in device state, not
for buffers allocated dynamically. Change to VMSTATE_BUFFER_POINTER_UNSAFE macro,
which will do migration right.

Signed-off-by: Igor Mitsyanko <i.mitsyanko@gmail.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 1362923278-4080-4-git-send-email-i.mitsyanko@gmail.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 hw/onenand.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/hw/onenand.c b/hw/onenand.c
index ddba366..57a346d 100644
--- a/hw/onenand.c
+++ b/hw/onenand.c
@@ -185,7 +185,8 @@ static const VMStateDescription vmstate_onenand = {
         VMSTATE_UINT8(ecc.cp, OneNANDState),
         VMSTATE_UINT16_ARRAY(ecc.lp, OneNANDState, 2),
         VMSTATE_UINT16(ecc.count, OneNANDState),
-        VMSTATE_BUFFER_UNSAFE(otp, OneNANDState, 0, ((64 + 2) << PAGE_SHIFT)),
+        VMSTATE_BUFFER_POINTER_UNSAFE(otp, OneNANDState, 0,
+            ((64 + 2) << PAGE_SHIFT)),
         VMSTATE_END_OF_LIST()
     }
 };
-- 
1.7.9.5

  parent reply	other threads:[~2013-04-05 17:51 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-05 17:13 [Qemu-devel] [PULL 00/14] arm-devs queue Peter Maydell
2013-04-05 17:13 ` [Qemu-devel] [PATCH 01/14] hw/arm/nseries: don't print to stdout or stderr Peter Maydell
2013-04-05 17:13 ` [Qemu-devel] [PATCH 02/14] pl050: Don't send always-constant is_mouse field Peter Maydell
2013-04-05 17:13 ` [Qemu-devel] [PATCH 03/14] hw/arm_mptimer: Save the timer state Peter Maydell
2013-04-05 17:13 ` [Qemu-devel] [PATCH 04/14] vmstate.h: introduce VMSTATE_BUFFER_POINTER_UNSAFE macro Peter Maydell
2013-04-05 17:13 ` [Qemu-devel] [PATCH 05/14] hw/sd.c: fix migration of dynamically allocated buffer "buf" Peter Maydell
2013-04-05 17:13 ` Peter Maydell [this message]
2013-04-05 17:13 ` [Qemu-devel] [PATCH 07/14] vmstate: Add support for two dimensional arrays Peter Maydell
2013-04-05 17:13 ` [Qemu-devel] [PATCH 08/14] arm_gic: Fix sizes of state fields in preparation for vmstate support Peter Maydell
2013-04-05 17:13 ` [Qemu-devel] [PATCH 09/14] hw/arm_gic_common: Use vmstate struct rather than save/load functions Peter Maydell
2013-04-05 17:13 ` [Qemu-devel] [PATCH 10/14] pflash_cfi01: Drop unused 'bypass' field Peter Maydell
2013-04-05 17:13 ` [Qemu-devel] [PATCH 11/14] pflash_cfi01: Implement migration support Peter Maydell
2013-04-05 17:13 ` [Qemu-devel] [PATCH 12/14] pl330: Don't inhibit ES bits on INTEN Peter Maydell
2013-04-05 17:13 ` [Qemu-devel] [PATCH 13/14] cadence_uart: Flush queued characters on reset Peter Maydell
2013-04-05 17:13 ` [Qemu-devel] [PATCH 14/14] hw/nand.c: Fix nand erase operation Peter Maydell
2013-04-06 14:16 ` [Qemu-devel] [PULL 00/14] arm-devs queue Blue Swirl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1365181999-15387-7-git-send-email-peter.maydell@linaro.org \
    --to=peter.maydell@linaro.org \
    --cc=aliguori@us.ibm.com \
    --cc=blauwirbel@gmail.com \
    --cc=paul@codesourcery.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).