]> git.ipfire.org Git - thirdparty/qemu.git/commit
rust/vmstate: Fix num field when varray flags are set
authorZhao Liu <zhao1.liu@intel.com>
Tue, 18 Mar 2025 13:02:07 +0000 (21:02 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 21 Mar 2025 11:56:00 +0000 (12:56 +0100)
commitc3d80af5ecf4f00db4a8d3ac5eca6edc0c9f061e
tree047fb65be900ff25188ce0f892acdd0f3beabd71
parent6ca5c3bedf3265358cf9033577dd30ed865d1cb3
rust/vmstate: Fix num field when varray flags are set

Array type vmstate has the VMStateField with `num` equals its length.

When the varray vmstate is built based a array type, the `num` field
should be cleaned to 0, because varray uses `num_offset` instead of
`num` to store elements number information.

Signed-off-by: Zhao Liu <zhao1.liu@intel.com>
Link: https://lore.kernel.org/r/20250318130219.1799170-4-zhao1.liu@intel.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
rust/qemu-api/src/vmstate.rs