qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: Igor Mitsyanko <i.mitsyanko@gmail.com>
Cc: patches@linaro.org, "Gerd Hoffmann" <kraxel@redhat.com>,
	qemu-devel@nongnu.org, "Andreas Färber" <afaerber@suse.de>
Subject: Re: [Qemu-devel] [PATCH v2 2/2] hw/arm_gic_common: Use vmstate struct rather than save/load functions
Date: Mon, 18 Mar 2013 20:20:54 +0000	[thread overview]
Message-ID: <CAFEAcA-zTPYetvs1eC5=M7xB0HPxVLfhvyJF1gQjWToOeDhYiQ@mail.gmail.com> (raw)
In-Reply-To: <CA+x0pt6vSczimp58gkexs=MKsisW3nP+zjx5g-NYzWnwhs6UfA@mail.gmail.com>

On 18 March 2013 19:48, Igor Mitsyanko <i.mitsyanko@gmail.com> wrote:
>> On 03/18/2013 09:47 PM, Peter Maydell wrote:
>>>
>>> +        VMSTATE_BUFFER_UNSAFE(last_active, GICState, 0,
>>> +                              GIC_MAXIRQ * NCPU * sizeof(uint16_t)),

> I'm not sure about this one, do we have any guarantees that it will always
> be tightly packed? What will happen when we will try to migrate VM between
> BE and LE hosts?

Ugh. I think the packing is ok but I hadn't thought about the
endianness issue.

Gerd and I were talking on IRC about 2D arrays. I think we came to
the conclusion that you could provide a new set of vmstate macros
for 2D arrays which basically work just like the existing 1D array
ones except that the typecheck is different.

(vmstate.h is getting hugely repetitive to the point that I'm
really tempted to say we should just autogenerate it. That way
you could define a fairly small set of things (arrays, base types,
safe vs unsafe, etc) and have a script generate the cross product,
rather than the current setup where there is a lot of hand written
repetition and a tendency to gaps in the coverage where nobody's
using them yet.)

-- PMM

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

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-18 17:47 [Qemu-devel] [PATCH v2 0/2] arm_gic: convert to vmstate Peter Maydell
2013-03-18 17:47 ` [Qemu-devel] [PATCH v2 1/2] arm_gic: Fix sizes of state fields in preparation for vmstate support Peter Maydell
     [not found]   ` <51476E81.8000904@gmail.com>
2013-03-18 19:46     ` Igor Mitsyanko
2013-03-19 10:53   ` Andreas Färber
2013-03-18 17:47 ` [Qemu-devel] [PATCH v2 2/2] hw/arm_gic_common: Use vmstate struct rather than save/load functions Peter Maydell
     [not found]   ` <51476DD1.6070705@gmail.com>
2013-03-18 19:48     ` Igor Mitsyanko
2013-03-18 20:20       ` Peter Maydell [this message]
2013-03-18 20:43         ` Igor Mitsyanko
2013-03-19  7:14           ` Gerd Hoffmann
2013-03-19 10:57           ` Andreas Färber

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='CAFEAcA-zTPYetvs1eC5=M7xB0HPxVLfhvyJF1gQjWToOeDhYiQ@mail.gmail.com' \
    --to=peter.maydell@linaro.org \
    --cc=afaerber@suse.de \
    --cc=i.mitsyanko@gmail.com \
    --cc=kraxel@redhat.com \
    --cc=patches@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).