qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Michael Walle <michael@walle.cc>
To: Igor Mitsyanko <i.mitsyanko@gmail.com>
Cc: andrew@openedhand.com, paul@codesourcery.com,
	qemu-devel@nongnu.org, anthony@codemonkey.ws,
	peter.maydell@linaro.org
Subject: Re: [Qemu-devel] [PATCH 2/3] hw/sd.c: fix migration of dynamically allocated buffer "buf"
Date: Mon, 18 Mar 2013 19:33:47 +0100	[thread overview]
Message-ID: <201303181933.48069.michael@walle.cc> (raw)
In-Reply-To: <1362923278-4080-3-git-send-email-i.mitsyanko@gmail.com>

Am Sonntag 10 März 2013, 14:47:57 schrieb Igor Mitsyanko:
> 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>
> ---
>  hw/sd.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/hw/sd.c b/hw/sd.c
> index 428bd78..88eaaf8 100644
> --- a/hw/sd.c
> +++ b/hw/sd.c
> @@ -478,7 +478,7 @@ static const VMStateDescription sd_vmstate = {
>          VMSTATE_UINT64(data_start, SDState),
>          VMSTATE_UINT32(data_offset, SDState),
>          VMSTATE_UINT8_ARRAY(data, SDState, 512),
> -        VMSTATE_BUFFER_UNSAFE(buf, SDState, 1, 512),
> +        VMSTATE_BUFFER_POINTER_UNSAFE(buf, SDState, 1, 512),
>          VMSTATE_BOOL(enable, SDState),
>          VMSTATE_END_OF_LIST()
>      }

Tested-by: Michael Walle <michael@walle.cc>

-- 
michael

  reply	other threads:[~2013-03-18 18:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-10 13:47 [Qemu-devel] [PATCH 0/3] Fix VMSTATE_BUFFER_UNSAFE macro usage Igor Mitsyanko
2013-03-10 13:47 ` [Qemu-devel] [PATCH 1/3] vmstate.h: introduce VMSTATE_BUFFER_POINTER_UNSAFE macro Igor Mitsyanko
2013-03-10 13:47 ` [Qemu-devel] [PATCH 2/3] hw/sd.c: fix migration of dynamically allocated buffer "buf" Igor Mitsyanko
2013-03-18 18:33   ` Michael Walle [this message]
2013-03-10 13:47 ` [Qemu-devel] [PATCH 3/3] hw/onenand.c: fix migration of dynamically allocated buffer "otp" Igor Mitsyanko
2013-03-15 17:12 ` [Qemu-devel] [PATCH 0/3] Fix VMSTATE_BUFFER_UNSAFE macro usage Peter Maydell
     [not found]   ` <51435829.5020106@gmail.com>
2013-03-15 17:23     ` Igor Mitsyanko
2013-03-18 16:19 ` Peter Maydell

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=201303181933.48069.michael@walle.cc \
    --to=michael@walle.cc \
    --cc=andrew@openedhand.com \
    --cc=anthony@codemonkey.ws \
    --cc=i.mitsyanko@gmail.com \
    --cc=paul@codesourcery.com \
    --cc=peter.maydell@linaro.org \
    --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).