qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 2/2] hw/arm_gic_common: Use vmstate struct ra


From: Peter Maydell
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

On 18 March 2013 19:48, Igor Mitsyanko <address@hidden> 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 via email to

[Prev in Thread] Current Thread [Next in Thread]