diff mbox series

[22/27] vmstate.h: Provide VMSTATE_BOOL_SUB_ARRAY

Message ID 20180521140402.23318-23-peter.maydell@linaro.org
State Superseded
Headers show
Series iommu: support txattrs, support TCG execution, implement TZ MPC | expand

Commit Message

Peter Maydell May 21, 2018, 2:03 p.m. UTC
Provide a VMSTATE_BOOL_SUB_ARRAY to go with VMSTATE_UINT8_SUB_ARRAY
and friends.

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

---
 include/migration/vmstate.h | 3 +++
 1 file changed, 3 insertions(+)

-- 
2.17.0

Comments

Alex Bennée May 23, 2018, 11:01 a.m. UTC | #1
Peter Maydell <peter.maydell@linaro.org> writes:

> Provide a VMSTATE_BOOL_SUB_ARRAY to go with VMSTATE_UINT8_SUB_ARRAY

> and friends.

>

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


Reviewed-by: Alex Bennée <alex.bennee@linaro.org>


> ---

>  include/migration/vmstate.h | 3 +++

>  1 file changed, 3 insertions(+)

>

> diff --git a/include/migration/vmstate.h b/include/migration/vmstate.h

> index df463fd33d..59fc75e418 100644

> --- a/include/migration/vmstate.h

> +++ b/include/migration/vmstate.h

> @@ -870,6 +870,9 @@ extern const VMStateInfo vmstate_info_qtailq;

>  #define VMSTATE_BOOL_ARRAY(_f, _s, _n)                               \

>      VMSTATE_BOOL_ARRAY_V(_f, _s, _n, 0)

>

> +#define VMSTATE_BOOL_SUB_ARRAY(_f, _s, _start, _num)                \

> +    VMSTATE_SUB_ARRAY(_f, _s, _start, _num, 0, vmstate_info_bool, bool)

> +

>  #define VMSTATE_UINT16_ARRAY_V(_f, _s, _n, _v)                         \

>      VMSTATE_ARRAY(_f, _s, _n, _v, vmstate_info_uint16, uint16_t)



--
Alex Bennée
diff mbox series

Patch

diff --git a/include/migration/vmstate.h b/include/migration/vmstate.h
index df463fd33d..59fc75e418 100644
--- a/include/migration/vmstate.h
+++ b/include/migration/vmstate.h
@@ -870,6 +870,9 @@  extern const VMStateInfo vmstate_info_qtailq;
 #define VMSTATE_BOOL_ARRAY(_f, _s, _n)                               \
     VMSTATE_BOOL_ARRAY_V(_f, _s, _n, 0)
 
+#define VMSTATE_BOOL_SUB_ARRAY(_f, _s, _start, _num)                \
+    VMSTATE_SUB_ARRAY(_f, _s, _start, _num, 0, vmstate_info_bool, bool)
+
 #define VMSTATE_UINT16_ARRAY_V(_f, _s, _n, _v)                         \
     VMSTATE_ARRAY(_f, _s, _n, _v, vmstate_info_uint16, uint16_t)