diff options
author | Avihai Horon <avihaih@nvidia.com> | 2023-12-31 12:48:18 +0200 |
---|---|---|
committer | Cédric Le Goater <clg@redhat.com> | 2024-01-05 21:25:20 +0100 |
commit | c817e5a377a334241eed149e35760aca58bdeb34 (patch) | |
tree | e8cd9327d0a42e914b22e44ea9d2db891f8b9751 /scripts/qapi/parser.py | |
parent | 9f734a117cbf63b03577b46c8cad8ad88ec6dced (diff) | |
download | qemu-c817e5a377a334241eed149e35760aca58bdeb34.zip qemu-c817e5a377a334241eed149e35760aca58bdeb34.tar.gz qemu-c817e5a377a334241eed149e35760aca58bdeb34.tar.bz2 |
vfio/migration: Add helper function to set state or reset device
There are several places where failure in setting the device state leads
to a device reset, which is done by setting ERROR as the recover state.
Add a helper function that sets the device state and resets the device
in case of failure. This will make the code cleaner and remove duplicate
comments.
Signed-off-by: Avihai Horon <avihaih@nvidia.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Diffstat (limited to 'scripts/qapi/parser.py')
0 files changed, 0 insertions, 0 deletions