[PATCH v5 7/7] vfio/migration: Remove print of "Migration disabled"

Zhenzhong Duan posted 7 patches 1 year, 2 months ago
Only 5 patches received!
There is a newer version of this series
[PATCH v5 7/7] vfio/migration: Remove print of "Migration disabled"
Posted by Zhenzhong Duan 1 year, 2 months ago
Property enable_migration supports [on/off/auto].
In ON mode, error pointer is passed to errp and logged.
In OFF mode, we doesn't need to log "Migration disabled" as it's intentional.
In AUTO mode, we should only ever see errors or warnings if the device
supports migration and an error or incompatibility occurs while further
probing or configuring it. Lack of support for migration shoundn't
generate an error or warning.

Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
---
 hw/vfio/pci.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c
index 9cf70c1965d3..1c969fccc543 100644
--- a/hw/vfio/pci.c
+++ b/hw/vfio/pci.c
@@ -3209,7 +3209,6 @@ static void vfio_realize(PCIDevice *pdev, Error **errp)
     if (!pdev->failover_pair_id) {
         ret = vfio_migration_realize(vbasedev, errp);
         if (!ret) {
-            error_report("%s: Migration disabled", vbasedev->name);
             goto out_deregister;
         }
     }
-- 
2.34.1
Re: [PATCH v5 7/7] vfio/migration: Remove print of "Migration disabled"
Posted by Joao Martins 1 year, 2 months ago

On 30/06/2023 08:36, Zhenzhong Duan wrote:
> Property enable_migration supports [on/off/auto].
> In ON mode, error pointer is passed to errp and logged.
> In OFF mode, we doesn't need to log "Migration disabled" as it's intentional.
> In AUTO mode, we should only ever see errors or warnings if the device
> supports migration and an error or incompatibility occurs while further
> probing or configuring it. Lack of support for migration shoundn't
> generate an error or warning.
> 
> Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>

Reviewed-by: Joao Martins <joao.m.martins@oracle.com>

> ---
>  hw/vfio/pci.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c
> index 9cf70c1965d3..1c969fccc543 100644
> --- a/hw/vfio/pci.c
> +++ b/hw/vfio/pci.c
> @@ -3209,7 +3209,6 @@ static void vfio_realize(PCIDevice *pdev, Error **errp)
>      if (!pdev->failover_pair_id) {
>          ret = vfio_migration_realize(vbasedev, errp);
>          if (!ret) {
> -            error_report("%s: Migration disabled", vbasedev->name);
>              goto out_deregister;
>          }
>      }