]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
vmstate: introduce VMSTATE_VBUFFER_UINT64
authorAlexandr Moshkov <dtalexundeer@yandex-team.ru>
Thu, 15 Jan 2026 08:11:05 +0000 (13:11 +0500)
committerMichael S. Tsirkin <mst@redhat.com>
Thu, 5 Feb 2026 10:06:46 +0000 (05:06 -0500)
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>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Message-Id: <20260115081103.655749-4-dtalexundeer@yandex-team.ru>

include/migration/vmstate.h

index ed9095a4661d1ca5d42937bbf4ed365f22fac173..89f9f49d20ab4f88fcd45a0b45ba4d4710683672 100644 (file)
@@ -706,6 +706,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)),                             \