Skip to content

Commit d8d577b

Browse files
Yishai Hadasawilliam
authored andcommitted
vfio/mlx5: Block incremental query upon migf state error
Block incremental query which is state-dependent once the migration file was previously marked with state error. This may prevent redundant calls to firmware upon PRE_COPY which will end-up with a failure and a syndrome printed in dmesg. Signed-off-by: Yishai Hadas <yishaih@nvidia.com> Reviewed-by: Kevin Tian <kevin.tian@intel.com> Acked-by: Leon Romanovsky <leon@kernel.org> Link: https://lore.kernel.org/r/20240205124828.232701-5-yishaih@nvidia.com Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
1 parent 793d4bf commit d8d577b

File tree

1 file changed

+5
-0
lines changed
  • drivers/vfio/pci/mlx5

1 file changed

+5
-0
lines changed

drivers/vfio/pci/mlx5/cmd.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,11 @@ int mlx5vf_cmd_query_vhca_migration_state(struct mlx5vf_pci_core_device *mvdev,
121121
}
122122
query_flags &= ~MLX5VF_QUERY_INC;
123123
}
124+
/* Block incremental query which is state-dependent */
125+
if (mvdev->saving_migf->state == MLX5_MIGF_STATE_ERROR) {
126+
complete(&mvdev->saving_migf->save_comp);
127+
return -ENODEV;
128+
}
124129
}
125130

126131
MLX5_SET(query_vhca_migration_state_in, in, opcode,

0 commit comments

Comments
 (0)