mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 08:43:55 -06:00
vfio/migration: Add Error** argument to .vfio_save_config() handler
Use vmstate_save_state_with_err() to improve error reporting in the callers and store a reported error under the migration stream. Add documentation while at it. Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Eric Auger <eric.auger@redhat.com> Reviewed-by: Avihai Horon <avihaih@nvidia.com> Signed-off-by: Cédric Le Goater <clg@redhat.com>
This commit is contained in:
parent
fbd2469a66
commit
3783f814e7
3 changed files with 45 additions and 10 deletions
|
@ -133,7 +133,30 @@ struct VFIODeviceOps {
|
|||
int (*vfio_hot_reset_multi)(VFIODevice *vdev);
|
||||
void (*vfio_eoi)(VFIODevice *vdev);
|
||||
Object *(*vfio_get_object)(VFIODevice *vdev);
|
||||
void (*vfio_save_config)(VFIODevice *vdev, QEMUFile *f);
|
||||
|
||||
/**
|
||||
* @vfio_save_config
|
||||
*
|
||||
* Save device config state
|
||||
*
|
||||
* @vdev: #VFIODevice for which to save the config
|
||||
* @f: #QEMUFile where to send the data
|
||||
* @errp: pointer to Error*, to store an error if it happens.
|
||||
*
|
||||
* Returns zero to indicate success and negative for error
|
||||
*/
|
||||
int (*vfio_save_config)(VFIODevice *vdev, QEMUFile *f, Error **errp);
|
||||
|
||||
/**
|
||||
* @vfio_load_config
|
||||
*
|
||||
* Load device config state
|
||||
*
|
||||
* @vdev: #VFIODevice for which to load the config
|
||||
* @f: #QEMUFile where to get the data
|
||||
*
|
||||
* Returns zero to indicate success and negative for error
|
||||
*/
|
||||
int (*vfio_load_config)(VFIODevice *vdev, QEMUFile *f);
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue