]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
Revert "migration/vmstate: remove VMSTATE_BUFFER_POINTER_UNSAFE macro"
authorPhilippe Mathieu-Daudé <philmd@linaro.org>
Tue, 9 Dec 2025 19:11:09 +0000 (20:11 +0100)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Tue, 9 Dec 2025 20:00:15 +0000 (21:00 +0100)
Next commit will re-use VMSTATE_BUFFER_POINTER_UNSAFE().

This reverts commit 58341158d022823234d25fd337654a82fa6d157b.

Suggested-by: Fiona Ebner <f.ebner@proxmox.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
include/migration/vmstate.h

index df57e6550a224f13fb73a517b2e616527130fca1..a87a5efa428436c89b786ee6dc205c1fb07b3722 100644 (file)
@@ -727,6 +727,15 @@ extern const VMStateInfo vmstate_info_qlist;
     .offset     = offsetof(_state, _field),                          \
 }
 
+#define VMSTATE_BUFFER_POINTER_UNSAFE(_field, _state, _version, _size) { \
+    .name       = (stringify(_field)),                               \
+    .version_id = (_version),                                        \
+    .size       = (_size),                                           \
+    .info       = &vmstate_info_buffer,                              \
+    .flags      = VMS_BUFFER | VMS_POINTER,                          \
+    .offset     = offsetof(_state, _field),                          \
+}
+
 /* Allocate a temporary of type 'tmp_type', set tmp->parent to _state
  * and execute the vmsd on the temporary.  Note that we're working with
  * the whole of _state here, not a field within it.