Patchwork [RFC,v2,5/6] vmstate: Add uint32 2D-array support

login
register
mail settings
Submitter Christoffer Dall
Date Sept. 26, 2013, 9:03 p.m.
Message ID <1380229386-24166-6-git-send-email-christoffer.dall@linaro.org>
Download mbox | patch
Permalink /patch/278277/
State New
Headers show

Comments

Christoffer Dall - Sept. 26, 2013, 9:03 p.m.
Add support for saving VMtate of 2D arrays of uint32 values.

Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
---
 include/migration/vmstate.h |    6 ++++++
 1 file changed, 6 insertions(+)
Peter Maydell - Oct. 14, 2013, 3:44 p.m.
On 26 September 2013 22:03, Christoffer Dall
<christoffer.dall@linaro.org> wrote:
> Add support for saving VMtate of 2D arrays of uint32 values.

"VMState". Otherwise:

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

-- PMM

Patch

diff --git a/include/migration/vmstate.h b/include/migration/vmstate.h
index 1c31b5d..e5538c7 100644
--- a/include/migration/vmstate.h
+++ b/include/migration/vmstate.h
@@ -633,9 +633,15 @@  extern const VMStateInfo vmstate_info_bitmap;
 #define VMSTATE_UINT32_ARRAY_V(_f, _s, _n, _v)                        \
     VMSTATE_ARRAY(_f, _s, _n, _v, vmstate_info_uint32, uint32_t)
 
+#define VMSTATE_UINT32_2DARRAY_V(_f, _s, _n1, _n2, _v)                \
+    VMSTATE_2DARRAY(_f, _s, _n1, _n2, _v, vmstate_info_uint32, uint32_t)
+
 #define VMSTATE_UINT32_ARRAY(_f, _s, _n)                              \
     VMSTATE_UINT32_ARRAY_V(_f, _s, _n, 0)
 
+#define VMSTATE_UINT32_2DARRAY(_f, _s, _n1, _n2)                      \
+    VMSTATE_UINT32_2DARRAY_V(_f, _s, _n1, _n2, 0)
+
 #define VMSTATE_UINT64_ARRAY_V(_f, _s, _n, _v)                        \
     VMSTATE_ARRAY(_f, _s, _n, _v, vmstate_info_uint64, uint64_t)