* [Qemu-devel] [PATCH] migration: add version supporting macros for struct pointer
@ 2013-09-04 4:35 Alexey Kardashevskiy
2013-09-24 5:58 ` Alexey Kardashevskiy
2013-09-24 8:24 ` Juan Quintela
0 siblings, 2 replies; 3+ messages in thread
From: Alexey Kardashevskiy @ 2013-09-04 4:35 UTC (permalink / raw)
To: qemu-devel; +Cc: Alexey Kardashevskiy, Andreas Färber, Juan Quintela
This adds version supporting macros VMSTATE_STRUCT_POINTER_TEST_V
and VMSTATE_STRUCT_POINTER_V in addition to the already existing
VMSTATE_STRUCT_POINTER and VMSTATE_STRUCT_POINTER_TEST macros.
Cc: Andreas Färber <afaerber@suse.de>
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
---
include/migration/vmstate.h | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/include/migration/vmstate.h b/include/migration/vmstate.h
index 1c31b5d..9d09e60 100644
--- a/include/migration/vmstate.h
+++ b/include/migration/vmstate.h
@@ -310,8 +310,18 @@ extern const VMStateInfo vmstate_info_bitmap;
.offset = vmstate_offset_value(_state, _field, _type), \
}
-#define VMSTATE_STRUCT_POINTER_TEST(_field, _state, _test, _vmsd, _type) { \
+#define VMSTATE_STRUCT_POINTER_V(_field, _state, _version, _vmsd, _type) { \
.name = (stringify(_field)), \
+ .version_id = (_version), \
+ .vmsd = &(_vmsd), \
+ .size = sizeof(_type), \
+ .flags = VMS_STRUCT|VMS_POINTER, \
+ .offset = vmstate_offset_value(_state, _field, _type), \
+}
+
+#define VMSTATE_STRUCT_POINTER_TEST_V(_field, _state, _test, _version, _vmsd, _type) { \
+ .name = (stringify(_field)), \
+ .version_id = (_version), \
.field_exists = (_test), \
.vmsd = &(_vmsd), \
.size = sizeof(_type), \
@@ -497,7 +507,10 @@ extern const VMStateInfo vmstate_info_bitmap;
VMSTATE_STRUCT_TEST(_field, _state, NULL, _version, _vmsd, _type)
#define VMSTATE_STRUCT_POINTER(_field, _state, _vmsd, _type) \
- VMSTATE_STRUCT_POINTER_TEST(_field, _state, NULL, _vmsd, _type)
+ VMSTATE_STRUCT_POINTER_V(_field, _state, 0, _vmsd, _type)
+
+#define VMSTATE_STRUCT_POINTER_TEST(_field, _state, _test, _vmsd, _type) \
+ VMSTATE_STRUCT_POINTER_TEST_V(_field, _state, _test, 0, _vmsd, _type)
#define VMSTATE_STRUCT_ARRAY(_field, _state, _num, _version, _vmsd, _type) \
VMSTATE_STRUCT_ARRAY_TEST(_field, _state, _num, NULL, _version, \
--
1.8.4.rc4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] migration: add version supporting macros for struct pointer
2013-09-04 4:35 [Qemu-devel] [PATCH] migration: add version supporting macros for struct pointer Alexey Kardashevskiy
@ 2013-09-24 5:58 ` Alexey Kardashevskiy
2013-09-24 8:24 ` Juan Quintela
1 sibling, 0 replies; 3+ messages in thread
From: Alexey Kardashevskiy @ 2013-09-24 5:58 UTC (permalink / raw)
To: Alexey Kardashevskiy; +Cc: qemu-devel, Andreas Färber, Juan Quintela
On 09/04/2013 02:35 PM, Alexey Kardashevskiy wrote:
> This adds version supporting macros VMSTATE_STRUCT_POINTER_TEST_V
> and VMSTATE_STRUCT_POINTER_V in addition to the already existing
> VMSTATE_STRUCT_POINTER and VMSTATE_STRUCT_POINTER_TEST macros.
Ping?
>
> Cc: Andreas Färber <afaerber@suse.de>
> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
> ---
> include/migration/vmstate.h | 17 +++++++++++++++--
> 1 file changed, 15 insertions(+), 2 deletions(-)
>
> diff --git a/include/migration/vmstate.h b/include/migration/vmstate.h
> index 1c31b5d..9d09e60 100644
> --- a/include/migration/vmstate.h
> +++ b/include/migration/vmstate.h
> @@ -310,8 +310,18 @@ extern const VMStateInfo vmstate_info_bitmap;
> .offset = vmstate_offset_value(_state, _field, _type), \
> }
>
> -#define VMSTATE_STRUCT_POINTER_TEST(_field, _state, _test, _vmsd, _type) { \
> +#define VMSTATE_STRUCT_POINTER_V(_field, _state, _version, _vmsd, _type) { \
> .name = (stringify(_field)), \
> + .version_id = (_version), \
> + .vmsd = &(_vmsd), \
> + .size = sizeof(_type), \
> + .flags = VMS_STRUCT|VMS_POINTER, \
> + .offset = vmstate_offset_value(_state, _field, _type), \
> +}
> +
> +#define VMSTATE_STRUCT_POINTER_TEST_V(_field, _state, _test, _version, _vmsd, _type) { \
> + .name = (stringify(_field)), \
> + .version_id = (_version), \
> .field_exists = (_test), \
> .vmsd = &(_vmsd), \
> .size = sizeof(_type), \
> @@ -497,7 +507,10 @@ extern const VMStateInfo vmstate_info_bitmap;
> VMSTATE_STRUCT_TEST(_field, _state, NULL, _version, _vmsd, _type)
>
> #define VMSTATE_STRUCT_POINTER(_field, _state, _vmsd, _type) \
> - VMSTATE_STRUCT_POINTER_TEST(_field, _state, NULL, _vmsd, _type)
> + VMSTATE_STRUCT_POINTER_V(_field, _state, 0, _vmsd, _type)
> +
> +#define VMSTATE_STRUCT_POINTER_TEST(_field, _state, _test, _vmsd, _type) \
> + VMSTATE_STRUCT_POINTER_TEST_V(_field, _state, _test, 0, _vmsd, _type)
>
> #define VMSTATE_STRUCT_ARRAY(_field, _state, _num, _version, _vmsd, _type) \
> VMSTATE_STRUCT_ARRAY_TEST(_field, _state, _num, NULL, _version, \
>
--
Alexey
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] migration: add version supporting macros for struct pointer
2013-09-04 4:35 [Qemu-devel] [PATCH] migration: add version supporting macros for struct pointer Alexey Kardashevskiy
2013-09-24 5:58 ` Alexey Kardashevskiy
@ 2013-09-24 8:24 ` Juan Quintela
1 sibling, 0 replies; 3+ messages in thread
From: Juan Quintela @ 2013-09-24 8:24 UTC (permalink / raw)
To: Alexey Kardashevskiy; +Cc: qemu-devel, Andreas Färber
Alexey Kardashevskiy <aik@ozlabs.ru> wrote:
> This adds version supporting macros VMSTATE_STRUCT_POINTER_TEST_V
> and VMSTATE_STRUCT_POINTER_V in addition to the already existing
> VMSTATE_STRUCT_POINTER and VMSTATE_STRUCT_POINTER_TEST macros.
>
> Cc: Andreas Färber <afaerber@suse.de>
> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Reviewed-by: Juan Quintela <quintela@redhat.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-09-24 8:24 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-04 4:35 [Qemu-devel] [PATCH] migration: add version supporting macros for struct pointer Alexey Kardashevskiy
2013-09-24 5:58 ` Alexey Kardashevskiy
2013-09-24 8:24 ` Juan Quintela
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).