From: "Andreas Färber" <afaerber@suse.de>
To: Juan Quintela <quintela@redhat.com>
Cc: "Dr. David Alan Gilbert" <dgilbert@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH for 2.1 00/97] VMState simplification (massive)
Date: Mon, 07 Apr 2014 18:18:48 +0200 [thread overview]
Message-ID: <5342CFE8.4010703@suse.de> (raw)
In-Reply-To: <87d2gtfoht.fsf@elfo.mitica>
Am 07.04.2014 12:00, schrieb Juan Quintela:
> "Dr. David Alan Gilbert" <dgilbert@redhat.com> wrote:
>> * Juan Quintela (quintela@redhat.com) 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.
>
> That information is not exported Today. And if we want to export them,
> export v = 5 or test == vmstat_5_plus is exactly the same dificulty.
That's not quite true. My code can easily compare an integer field in
VMStateDescription, but for any .test function callback I am in the
blind: Without executing the test on a specific set of data, I cannot
reason whether incoming data will be compatible with the VMSD.
> The information is still there, what has changed is the removal of one
> mechanism.
>
> #define VMSTATE_UINT64_V(field, state, X) \
> VMSTATE_UINT64_TEST(field, state, vmstate_##X##_plus)
If these were a fixed set of global test functions, it could work, by
special-casing function pointer comparisons.
> The same that we could do for maintaining the macro, we can do to export
> the information to whatever format we want. I just wanted to remove one
> of the mechanism (the less powerful one).
On another matter, I still haven't heard from you on my QOM VMState
simplification series from last July:
https://lists.nongnu.org/archive/html/qemu-devel/2014-02/msg01072.html
If we fix the NVEC issue I discovered in February and add qtests for the
remaining optional devices to assure there are no further dc->vmsd
overriding devices, would that approach be acceptable to you? Or do you
have a better suggestion?
Thanks,
Andreas
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
next prev parent reply other threads:[~2014-04-07 16:19 UTC|newest]
Thread overview: 116+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-07 3:20 [Qemu-devel] [PATCH for 2.1 00/97] VMState simplification (massive) Juan Quintela
2014-04-07 3:20 ` [Qemu-devel] [PATCH 01/97] savevm: Ignore minimum_version_id_old if there is no load_state_old Juan Quintela
2014-04-07 3:20 ` [Qemu-devel] [PATCH 02/97] savevm: Remove all the unneded version_minimum_id_old (Massive) Juan Quintela
2014-04-07 11:00 ` Peter Maydell
2014-04-07 11:47 ` Juan Quintela
2014-04-07 11:50 ` Peter Maydell
2014-04-07 12:21 ` Markus Armbruster
2014-04-07 12:39 ` Peter Maydell
2014-04-07 12:46 ` Juan Quintela
2014-04-07 12:45 ` Juan Quintela
2014-04-07 3:20 ` [Qemu-devel] [PATCH 03/97] vmstate: return error in case of error Juan Quintela
2014-04-07 8:19 ` Dr. David Alan Gilbert
2014-04-07 3:20 ` [Qemu-devel] [PATCH 04/97] vmstate: reduce code duplication Juan Quintela
2014-04-07 3:20 ` [Qemu-devel] [PATCH 05/97] vmstate: refactor opening of files Juan Quintela
2014-04-07 17:34 ` Eduardo Habkost
2014-04-07 3:20 ` [Qemu-devel] [PATCH 06/97] vmstate: Refactor & increase tests for primitive types Juan Quintela
2014-04-07 17:57 ` Eduardo Habkost
2014-04-07 3:20 ` [Qemu-devel] [PATCH 07/97] vmstate: create test functions for versions until 15 Juan Quintela
2014-04-07 3:20 ` [Qemu-devel] [PATCH 08/97] vmstate: Remove VMSTATE_UINTL_EQUAL_V Juan Quintela
2014-04-07 3:20 ` [Qemu-devel] [PATCH 09/97] vmstate: Change VMSTATE_INTTL_V to VMSTATE_INTTL_TEST Juan Quintela
2014-04-07 3:20 ` [Qemu-devel] [PATCH 10/97] vmstate: Remove unused VMSTATE_UINTTL_ARRAY_V Juan Quintela
2014-04-07 3:20 ` [Qemu-devel] [PATCH 11/97] vmstate: Test for VMSTATE_BOOL_TEST Juan Quintela
2014-04-07 3:20 ` [Qemu-devel] [PATCH 12/97] vmstate: Test for VMSTATE_INT8_TEST Juan Quintela
2014-04-07 3:20 ` [Qemu-devel] [PATCH 13/97] vmstate: Test for VMSTATE_INT16_TEST Juan Quintela
2014-04-07 3:20 ` [Qemu-devel] [PATCH 14/97] vmstate: Test for VMSTATE_INT32_TEST Juan Quintela
2014-04-07 3:20 ` [Qemu-devel] [PATCH 15/97] vmstate: test for VMSTATE_INT64_TEST Juan Quintela
2014-04-07 3:20 ` [Qemu-devel] [PATCH 16/97] vmstate: Test for VMSTATE_UINT8_TEST Juan Quintela
2014-04-07 3:20 ` [Qemu-devel] [PATCH 17/97] vmstate: Test for VMSTATE_UINT16_TEST Juan Quintela
2014-04-07 3:20 ` [Qemu-devel] [PATCH 18/97] vmstate: Test for VMSTATE_UINT32_TEST Juan Quintela
2014-04-07 3:20 ` [Qemu-devel] [PATCH 19/97] vmstate: Test for VMSTATE_UINT64_TEST Juan Quintela
2014-04-07 3:20 ` [Qemu-devel] [PATCH 20/97] vmstate: Test for VMSTATE_FLOAT64 Juan Quintela
2014-04-07 3:20 ` [Qemu-devel] [PATCH 21/97] vmstate: Test for VMSTATE_UNUSED Juan Quintela
2014-04-07 3:20 ` [Qemu-devel] [PATCH 22/97] vmstate: Test for VMSTATE_BITMAP Juan Quintela
2014-04-07 3:20 ` [Qemu-devel] [PATCH 23/97] vmstate: Test for VMSTATE_UINT8_EQUAL Juan Quintela
2014-04-07 3:20 ` [Qemu-devel] [PATCH 24/97] vmstate: Test for VMSTATE_UINT16_EQUAL Juan Quintela
2014-04-07 3:20 ` [Qemu-devel] [PATCH 25/97] vmstate: Test for VMSTATE_UINT32_EQUAL Juan Quintela
2014-04-07 3:20 ` [Qemu-devel] [PATCH 26/97] vmstate: Test for VMSTATE_UINT64_EQUAL Juan Quintela
2014-04-07 3:20 ` [Qemu-devel] [PATCH 27/97] vmstate: Test for VMSTATE_INT32_EQUAL Juan Quintela
2014-04-07 3:20 ` [Qemu-devel] [PATCH 28/97] vmstate: Test for VMSTATE_INT32_LE Juan Quintela
2014-04-07 3:20 ` [Qemu-devel] [PATCH 29/97] vmstate: s/VMSTATE_INT32_LE/VMSTATE_INT32_POSITIVE_LE/ Juan Quintela
2014-04-07 3:20 ` [Qemu-devel] [PATCH 30/97] vmstate: Move VMSTATE_TIMER_V to VMSTATE_TIMER_TEST Juan Quintela
2014-04-07 3:20 ` [Qemu-devel] [PATCH 31/97] vmstate: Test for VMSTATE_ARRAY_BOOL_TEST Juan Quintela
2014-04-07 3:20 ` [Qemu-devel] [PATCH 32/97] vmstate: Test for VMSTATE_UINT8_ARRAY Juan Quintela
2014-04-07 3:20 ` [Qemu-devel] [PATCH 33/97] vmstate: Test for VMSTATE_UINT16_ARRAY Juan Quintela
2014-04-07 3:20 ` [Qemu-devel] [PATCH 34/97] vmstate: Test for VMSTATE_UINT32_ARRAY{_TEST} Juan Quintela
2014-04-07 3:20 ` [Qemu-devel] [PATCH 35/97] vmstate: Test for VMSTATE_UINT64_ARRAY{_TEST} Juan Quintela
2014-04-07 3:20 ` [Qemu-devel] [PATCH 36/97] vmstate: Test for VMSTATE_INT16_ARRAY Juan Quintela
2014-04-07 3:20 ` [Qemu-devel] [PATCH 37/97] vmstate: Test for VMSTATE_INT32_ARRAY{_TEST} Juan Quintela
2014-04-07 3:20 ` [Qemu-devel] [PATCH 38/97] vmstate: Test for VMSTATE_INT64_ARRAY Juan Quintela
2014-04-07 3:20 ` [Qemu-devel] [PATCH 39/97] vmstate: Test for VMSTATE_FLOAT64_ARRAY Juan Quintela
2014-04-07 3:20 ` [Qemu-devel] [PATCH 40/97] vmstate: Test for VMSTATE_UINT8_2DARRAY Juan Quintela
2014-04-07 3:20 ` [Qemu-devel] [PATCH 41/97] vmstate: Test for VMSTATE_UINT16_2DARRAY Juan Quintela
2014-04-07 3:21 ` [Qemu-devel] [PATCH 42/97] vmstate: Test for VMSTATE_UINT32_2DARRAY Juan Quintela
2014-04-07 3:21 ` [Qemu-devel] [PATCH 43/97] vmstate: Remove unused VMSTATE_BUFFER_V Juan Quintela
2014-04-07 3:21 ` [Qemu-devel] [PATCH 44/97] vmstate: Remove version from VMSTATE_BUFFER_UNSAFE Juan Quintela
2014-04-07 3:21 ` [Qemu-devel] [PATCH 45/97] vmstate: Remove unused version fields from ARM Juan Quintela
2014-04-07 3:21 ` [Qemu-devel] [PATCH 46/97] vmstate: All ptimers users were at least at version 1 or more Juan Quintela
2014-04-07 3:21 ` [Qemu-devel] [PATCH 47/97] vmstate: remove version from all variants of VMSTATE_STRUCT_POINTER* Juan Quintela
2014-04-07 3:21 ` [Qemu-devel] [PATCH 48/97] vmstate: Port last 3 users of VMSTATE_ARRAY to VMSTATE_ARRAY_TEST Juan Quintela
2014-04-07 3:21 ` [Qemu-devel] [PATCH 49/97] vmstate: Port last user of VMSTATE_SINGLE to VMSTATE_SINGLE_TEST Juan Quintela
2014-04-07 3:21 ` [Qemu-devel] [PATCH 50/97] vmstate: Remove unused VMSTATE_POINTER Juan Quintela
2014-04-07 3:21 ` [Qemu-devel] [PATCH 51/97] vmstate: Rename VMSTATE_SINGLE_TEST to VMSTATE_SINGLE Juan Quintela
2014-04-07 3:21 ` [Qemu-devel] [PATCH 52/97] vmstate: Move VMSTATE_2DARRAY to use _test Juan Quintela
2014-04-07 3:21 ` [Qemu-devel] [PATCH 53/97] vmstate: Rename VMSTATE_POINTER_TEST without _TEST Juan Quintela
2014-04-07 3:21 ` [Qemu-devel] [PATCH 54/97] vmstate: Rename VMSTATE_ARRAY_TEST to VMSTATE_ARRAY Juan Quintela
2014-04-07 3:21 ` [Qemu-devel] [PATCH 55/97] vmstate: Remove version_id from VMSTATE_VBUFFER Juan Quintela
2014-04-07 3:21 ` [Qemu-devel] [PATCH 56/97] vmstate: Remove version_id fields that were not used Juan Quintela
2014-04-07 3:21 ` [Qemu-devel] [PATCH 57/97] vmstate: Remove version_id from VMSTATE_SUB_ARRAY Juan Quintela
2014-04-07 3:21 ` [Qemu-devel] [PATCH 58/97] vmstate: Remove version parameter from VMSTATE_VARRAY_INT32 Juan Quintela
2014-04-07 3:21 ` [Qemu-devel] [PATCH 59/97] vmstate: Remove version_id from VMSTATE_VARRAY_UINT16_UNSAFE Juan Quintela
2014-04-07 3:21 ` [Qemu-devel] [PATCH 60/97] vmstate: VMSTATE_ARRAY_OF_POINTER didn't used the version_id field Juan Quintela
2014-04-07 3:21 ` [Qemu-devel] [PATCH 61/97] vmstate: remove version parameter from VMSTATE_BUFFER_POINTER_UNSAFE Juan Quintela
2014-04-07 3:21 ` [Qemu-devel] [PATCH 62/97] vmstate: Remove version, test and start parameter from VMSTATE_VBUFFER_UINT32 Juan Quintela
2014-04-07 3:21 ` [Qemu-devel] [PATCH 63/97] vmstate: Remove version paramenter from VMSTATE_ARRAY_OF_POINTER_TO_STRUCT Juan Quintela
2014-04-07 3:21 ` [Qemu-devel] [PATCH 64/97] vmstate: Remove VMSTATE_BUFFER_MULTIPLY Juan Quintela
2014-04-07 3:21 ` [Qemu-devel] [PATCH 65/97] vmstate: Remove version parameter from VMSTATE_STATIC_BUFFER Juan Quintela
2014-04-07 3:21 ` [Qemu-devel] [PATCH 66/97] vmstate: Remove version field from VMSTATE_STRUCT_VARRAY_UINT32 Juan Quintela
2014-04-07 3:21 ` [Qemu-devel] [PATCH 67/97] vmstate: Move all users of versioning of VMSTATE_STRUCT_ARRAY to _TEST Juan Quintela
2014-04-07 3:21 ` [Qemu-devel] [PATCH 68/97] vmstate: Remove version paramenter from VMSTATE_STRUCT_ARRAY Juan Quintela
2014-04-07 3:21 ` [Qemu-devel] [PATCH 69/97] vmstate: Remove version parameter from VMSTATE_STRUCT_ARRAY_TEST Juan Quintela
2014-04-07 3:21 ` [Qemu-devel] [PATCH 70/97] vmstate: Remove unused version parameter from VMSTATE_STRUCT_VARRAY_INT32 Juan Quintela
2014-04-07 3:21 ` [Qemu-devel] [PATCH 71/97] vmstate: Remove unused version parameter from VMSTATE_STRUCT_VARRAY_UINT8 Juan Quintela
2014-04-07 3:21 ` [Qemu-devel] [PATCH 72/97] vmstate: Introduce VMSTATE_VARRAY_UINT32_TEST Juan Quintela
2014-04-07 3:21 ` [Qemu-devel] [PATCH 73/97] vmstate: Remove version parameter from VMSTATE_VARRAY_UINT32 Juan Quintela
2014-04-07 3:21 ` [Qemu-devel] [PATCH 74/97] vmstate: Remove version parameter from VMSTATE_STRUCT_TEST Juan Quintela
2014-04-07 3:21 ` [Qemu-devel] [PATCH 75/97] vmstate: Move all users of versioning to VMSTATE_STRUCT_TEST Juan Quintela
2014-04-07 3:21 ` [Qemu-devel] [PATCH 76/97] vmstate: Remove version from all VMSTATE_STRUCT calls Juan Quintela
2014-04-07 3:21 ` [Qemu-devel] [PATCH 77/97] vmstate: Create VMSTATE_VARRAY macro Juan Quintela
2014-04-07 3:21 ` [Qemu-devel] [PATCH 78/97] vmstate: Create VMSTATE_POINTER_UNSAFE Juan Quintela
2014-04-07 3:21 ` [Qemu-devel] [PATCH 79/97] vmstate: Create VMSTATE_OPENCODED_UNSAFE Juan Quintela
2014-04-07 3:21 ` [Qemu-devel] [PATCH 80/97] vmstate: Create VMSTATE_SYNTHETIC Juan Quintela
2014-04-07 8:32 ` Dr. David Alan Gilbert
2014-04-07 9:50 ` Juan Quintela
2014-04-07 3:21 ` [Qemu-devel] [PATCH 81/97] vmstate: version_id is gone from fields Juan Quintela
2014-04-07 3:21 ` [Qemu-devel] [PATCH 82/97] vmstate: Test for VMSTATE_SYNTHETIC Juan Quintela
2014-04-07 3:21 ` [Qemu-devel] [PATCH 83/97] vmstate: Test for VMSTATE_UINT8_SUB_ARRAY Juan Quintela
2014-04-07 3:21 ` [Qemu-devel] [PATCH 84/97] vmstate: Test for VMSTATE_UINT32_SUB_ARRAY Juan Quintela
2014-04-07 3:21 ` [Qemu-devel] [PATCH 85/97] vmstate: Test for VMSTATE_BUFFER Juan Quintela
2014-04-07 3:21 ` [Qemu-devel] [PATCH 86/97] vmstate: Test for VMSTATE_PARTIAL_BUFFER Juan Quintela
2014-04-07 3:21 ` [Qemu-devel] [PATCH 87/97] vmstate: Test for VMSTATE_BUFFER_START_MIDDLE Juan Quintela
2014-04-07 3:21 ` [Qemu-devel] [PATCH 88/97] vmstate: Add tests for VMSTATE_BUFFER_TEST Juan Quintela
2014-04-07 3:21 ` [Qemu-devel] [PATCH 89/97] vmstate: Use VMSTATE_UINT8_2DARRAY instead of VMSTATE_BUFFER_TEST Juan Quintela
2014-04-07 3:21 ` [Qemu-devel] [PATCH 90/97] vmstate: Test for VMSTATE_BUFFER_UNSAFE Juan Quintela
2014-04-07 3:21 ` [Qemu-devel] [PATCH 91/97] vmstate: Remove unused VMSTATE_SUB_VBUFFER Juan Quintela
2014-04-07 3:21 ` [Qemu-devel] [PATCH 92/97] vmstate: Remove unused VMSTATE_PARTIAL_VBUFFER_UINT32 Juan Quintela
2014-04-07 3:21 ` [Qemu-devel] [PATCH 93/97] vmstate: Test for VMSTATE_PARTIAL_VBUFFER Juan Quintela
2014-04-07 3:21 ` [Qemu-devel] [PATCH 94/97] vmstate: ename VMSTATE_PARTIAL_VBUFFER to VMSTATE_VBUFFER_INT32 Juan Quintela
2014-04-07 3:21 ` [Qemu-devel] [PATCH 95/97] vmstate: Create VMS_VBUFFER_UINT32 Juan Quintela
2014-04-07 3:21 ` [Qemu-devel] [PATCH 96/97] vmstate: Rename VMS_VBUFFER to VMST_VBUFFER_INT32 for consintency Juan Quintela
2014-04-07 8:45 ` Dr. David Alan Gilbert
2014-04-07 9:54 ` Juan Quintela
2014-04-07 3:21 ` [Qemu-devel] [PATCH 97/97] vmstate: Test for VMSTATE_VBUFFER_UINT32 Juan Quintela
2014-04-07 9:35 ` [Qemu-devel] [PATCH for 2.1 00/97] VMState simplification (massive) Dr. David Alan Gilbert
2014-04-07 10:00 ` Juan Quintela
2014-04-07 16:18 ` Andreas Färber [this message]
2014-04-07 13:19 ` Marcel Apfelbaum
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=5342CFE8.4010703@suse.de \
--to=afaerber@suse.de \
--cc=dgilbert@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
/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).