[Top][All Lists]

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

[Qemu-devel] Re: [PATCH 0/3] New VMState table based load/save infrastru

From: Juan Quintela
Subject: [Qemu-devel] Re: [PATCH 0/3] New VMState table based load/save infrastructure
Date: Wed, 19 Aug 2009 18:21:35 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

Gerd Hoffmann <address@hidden> wrote:
>   Hi,
>> - For structures, Kraxel suggested to use a VMSTATE_INCLUDE() instead of
>>    having to declare a new VMStateInfo struct.  As I already have the new
>>    struct code working, I sent it with the struct.  Thinking about how to
>>    implement the VMSTATE_INCLUDE() and which one is easier to use.
> Looked at your code and figured the two approaches are not that
> different.  I'd just put the pointer to the chained/included
> VMStateDescription directly into the VMStateField to avoid the (IMHO
> pointless) indirection via VMStateInfo.

Agreed that the appreaches are very similar, basically question of style.

> Also:  It would probably useful to have two include modes here:  One
> for embedded structs, i.e. this:
> struct dev_state {
>   PCIDevice dev;
> };
> ... and one for referenced structs, i.e. this:
> struct dev2_state {
>   PCIDevice *dev;
> };

Trying to do pcibus_save() at the moment, and arrived at the conclusion
that we need the VMSTATE_INCLUDE() like thing.  Basically arrays need to
be handled the same:

struct dev_state {
    int32_t a[5];

struct dev_state {
    int32_t *a;

I am working on getting something like:


You get the idea :)

Later, Juan.

reply via email to

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