qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH for 2.1 00/97] VMState simplification (massive)


From: Dr. David Alan Gilbert
Subject: Re: [Qemu-devel] [PATCH for 2.1 00/97] VMState simplification (massive)
Date: Mon, 7 Apr 2014 10:35:44 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

* Juan Quintela (address@hidden) wrote:
> Hi
> 
>   Look at the diffstat.  Almost all the additions are at
> test-vmstate.c. That is the reason why it is called a simplification.
> 
> What this series does:
> - peter removal of version_minimum_id_old field when not needed (Peter)
> - cleanup: based on the previous one, I removed all the unneeded
>   the uses on the tree.  This should make your compiles
>   a couple of nanoseconds faster.
> - once there, fixed the indentation of the .fields line, to a canonical
>     .fields = (VMStateField[])
> - mst simplifications for vmstate engine
> 
> And now, the big cleanup.
> - Patches only do one thing, to make easy the review.
> 
> - Added test for all VMSTATE_FOO() definitions
>   (well, I am lying, VMSTATE_STRUCT* are still missing, will come soon)
> - We had two ways to make a field optional
>    VMSTATE_INT64_V(field, state, version)
>   and
>    VMSTATE_INT64_TEST(field, state, test)
> 
>   We can do the version one with one test like:
> 
> static inline bool vmstate_5_plus(void *opaque, int version_id)
> {
>     return version_id >= 5;
> }
> 
>   and then change:
>   VMSTATE_INT64_V(field, state, 5);
> 
>   into
>   VMSTATE_INT64_TEST(field, state, vmstate_5_plus);

I'm not sure if I like this; while I'm OK with the idea of changing the
implementation of VMSTATE_INT64_V to use that function trick internally,
it seems like we're discouraging providing easy to parse/record versionining
info out of the tree.

Dave
--
Dr. David Alan Gilbert / address@hidden / Manchester, UK



reply via email to

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