aboutsummaryrefslogtreecommitdiff
path: root/python/qemu/machine
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2023-09-28 15:19:49 +0200
committerJuan Quintela <quintela@redhat.com>2023-10-11 11:17:03 +0200
commit0110c6b86a828c9c2f42fbed4fc0da30ad7bf6eb (patch)
tree17972273d485336ab1ceae6f13a9481e708aeef5 /python/qemu/machine
parentd63f4016b1d154e9ab62e849e6fbb6ded344bcb2 (diff)
downloadqemu-0110c6b86a828c9c2f42fbed4fc0da30ad7bf6eb.zip
qemu-0110c6b86a828c9c2f42fbed4fc0da30ad7bf6eb.tar.gz
qemu-0110c6b86a828c9c2f42fbed4fc0da30ad7bf6eb.tar.bz2
migration/rdma: Fix QEMUFileHooks method return values
The QEMUFileHooks methods don't come with a written contract. Digging through the code calling them, we find: * save_page(): Negative values RAM_SAVE_CONTROL_DELAYED and RAM_SAVE_CONTROL_NOT_SUPP are special. Any other negative value is an unspecified error. qemu_rdma_save_page() returns -EIO or rdma->error_state on error. I believe the latter is always negative. Nothing stops either of them to clash with the special values, though. Feels unlikely, but fix it anyway to return only the special values and -1. * before_ram_iterate(), after_ram_iterate(): Negative value means error. qemu_rdma_registration_start() and qemu_rdma_registration_stop() comply as far as I can tell. Make them comply *obviously*, by returning -1 on error. * hook_ram_load: Negative value means error. rdma_load_hook() already returns -1 on error. Leave it alone. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Li Zhijian <lizhijian@fujitsu.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com> Message-ID: <20230928132019.2544702-24-armbru@redhat.com>
Diffstat (limited to 'python/qemu/machine')
0 files changed, 0 insertions, 0 deletions