aboutsummaryrefslogtreecommitdiff
path: root/rust/qemu-api
diff options
context:
space:
mode:
authorPeter Xu <peterx@redhat.com>2025-01-09 15:52:47 -0300
committerFabiano Rosas <farosas@suse.de>2025-01-09 17:39:46 -0300
commit9867c3a7ced12dd7519155c047eb2c0098a11c5f (patch)
tree55042d91f3b2f1f68602e871ccabd999f1bb077a /rust/qemu-api
parentf52965bf0eeee28e89933264f1a9dbdcdaa76a7e (diff)
downloadqemu-9867c3a7ced12dd7519155c047eb2c0098a11c5f.zip
qemu-9867c3a7ced12dd7519155c047eb2c0098a11c5f.tar.gz
qemu-9867c3a7ced12dd7519155c047eb2c0098a11c5f.tar.bz2
migration: Dump correct JSON format for nullptr replacement
QEMU plays a trick with null pointers inside an array of pointers in a VMSD field. See 07d4e69147 ("migration/vmstate: fix array of ptr with nullptrs") for more details on why. The idea makes sense in general, but it may overlooked the JSON writer where it could write nothing in a "struct" in the JSON hints section. We hit some analyze-migration.py issues on s390 recently, showing that some of the struct field contains nothing, like: {"name": "css", "array_len": 256, "type": "struct", "struct": {}, "size": 1} As described in details by Fabiano: https://lore.kernel.org/r/87pll37cin.fsf@suse.de It could be that we hit some null pointers there, and JSON was gone when they're null pointers. To fix it, instead of hacking around only at VMStateInfo level, do that from VMStateField level, so that JSON writer can also be involved. In this case, JSON writer will replace the pointer array (which used to be a "struct") to be the real representation of the nullptr field. Signed-off-by: Peter Xu <peterx@redhat.com> Message-Id: <20250109185249.23952-6-farosas@suse.de> Signed-off-by: Fabiano Rosas <farosas@suse.de>
Diffstat (limited to 'rust/qemu-api')
0 files changed, 0 insertions, 0 deletions