[PATCH v2 1/3] vmstate: introduce VMSTATE_VBUFFER_UINT64

Alexandr Moshkov posted 3 patches 2 weeks, 2 days ago
There is a newer version of this series
[PATCH v2 1/3] vmstate: introduce VMSTATE_VBUFFER_UINT64
Posted by Alexandr Moshkov 2 weeks, 2 days ago
This is an analog of VMSTATE_VBUFFER_UINT32 macro, but for uint64 type.

Signed-off-by: Alexandr Moshkov <dtalexundeer@yandex-team.ru>
---
 include/migration/vmstate.h | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/include/migration/vmstate.h b/include/migration/vmstate.h
index 7f1f1c166a..4c9e212d58 100644
--- a/include/migration/vmstate.h
+++ b/include/migration/vmstate.h
@@ -707,6 +707,16 @@ extern const VMStateInfo vmstate_info_qlist;
     .offset       = offsetof(_state, _field),                        \
 }
 
+#define VMSTATE_VBUFFER_UINT64(_field, _state, _version, _test, _field_size) { \
+    .name         = (stringify(_field)),                             \
+    .version_id   = (_version),                                      \
+    .field_exists = (_test),                                         \
+    .size_offset  = vmstate_offset_value(_state, _field_size, uint64_t),\
+    .info         = &vmstate_info_buffer,                            \
+    .flags        = VMS_VBUFFER | VMS_POINTER,                       \
+    .offset       = offsetof(_state, _field),                        \
+}
+
 #define VMSTATE_VBUFFER_ALLOC_UINT32(_field, _state, _version,       \
                                      _test, _field_size) {           \
     .name         = (stringify(_field)),                             \
-- 
2.34.1
Re: [PATCH v2 1/3] vmstate: introduce VMSTATE_VBUFFER_UINT64
Posted by Peter Xu 2 weeks, 1 day ago
On Wed, Oct 29, 2025 at 02:39:39PM +0500, Alexandr Moshkov wrote:
> This is an analog of VMSTATE_VBUFFER_UINT32 macro, but for uint64 type.
> 
> Signed-off-by: Alexandr Moshkov <dtalexundeer@yandex-team.ru>

Acked-by: Peter Xu <peterx@redhat.com>

-- 
Peter Xu