aboutsummaryrefslogtreecommitdiff
path: root/tests/functional/qemu_test/linuxkernel.py
diff options
context:
space:
mode:
authorPeter Xu <peterx@redhat.com>2025-03-04 23:03:42 +0100
committerCédric Le Goater <clg@redhat.com>2025-03-06 06:47:33 +0100
commit99fab22350e4eed1d8a238ed97c77b1a5ee77dd4 (patch)
tree72600c2b094e4797cdab326bafa23fb030dd2b70 /tests/functional/qemu_test/linuxkernel.py
parent0525b91a0b993f95d29b2ea84155e7e4366c120e (diff)
downloadqemu-99fab22350e4eed1d8a238ed97c77b1a5ee77dd4.zip
qemu-99fab22350e4eed1d8a238ed97c77b1a5ee77dd4.tar.gz
qemu-99fab22350e4eed1d8a238ed97c77b1a5ee77dd4.tar.bz2
migration/multifd: Make MultiFDSendData a struct
The newly introduced device state buffer can be used for either storing VFIO's read() raw data, but already also possible to store generic device states. After noticing that device states may not easily provide a max buffer size (also the fact that RAM MultiFDPages_t after all also want to have flexibility on managing offset[] array), it may not be a good idea to stick with union on MultiFDSendData.. as it won't play well with such flexibility. Switch MultiFDSendData to a struct. It won't consume a lot more space in reality, after all the real buffers were already dynamically allocated, so it's so far only about the two structs (pages, device_state) that will be duplicated, but they're small. With this, we can remove the pretty hard to understand alloc size logic. Because now we can allocate offset[] together with the SendData, and properly free it when the SendData is freed. [MSS: Make sure to clear possible device state payload before freeing MultiFDSendData, remove placeholders for other patches not included] Signed-off-by: Peter Xu <peterx@redhat.com> Signed-off-by: Maciej S. Szmigiero <maciej.szmigiero@oracle.com> Acked-by: Fabiano Rosas <farosas@suse.de> Link: https://lore.kernel.org/qemu-devel/7b02baba8e6ddb23ef7c349d312b9b631db09d7e.1741124640.git.maciej.szmigiero@oracle.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
Diffstat (limited to 'tests/functional/qemu_test/linuxkernel.py')
0 files changed, 0 insertions, 0 deletions