vfio/migration: Add Error** argument to .vfio_save_config() handler
authorCédric Le Goater <clg@redhat.com>
Thu, 16 May 2024 12:46:54 +0000 (14:46 +0200)
committerCédric Le Goater <clg@redhat.com>
Thu, 16 May 2024 14:59:19 +0000 (16:59 +0200)
commit3783f814e7e2e11cbd4e18e51e710db37900a1b8
treebae379388e7f9c94a3f3f76ba9f41eaddbab1b77
parentfbd2469a66e3fd3f3457170928daf8098f207427
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>
hw/vfio/migration.c
hw/vfio/pci.c
include/hw/vfio/vfio-common.h