Re: [PATCH] vfio/migration: Add helper function to set state or reset device

2024-01-02 Thread Cédric Le Goater
On 12/31/23 11:48, Avihai Horon wrote: 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 co

Re: [PATCH] vfio/migration: Add helper function to set state or reset device

2024-01-02 Thread Philippe Mathieu-Daudé
On 31/12/23 11:48, Avihai Horon wrote: 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 co

Re: [PATCH] vfio/migration: Add helper function to set state or reset device

2024-01-02 Thread Cédric Le Goater
On 12/31/23 11:48, Avihai Horon wrote: 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 co

[PATCH] vfio/migration: Add helper function to set state or reset device

2023-12-31 Thread Avihai Horon
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.