vfio/mlx5: Add support for tracker object change event
authorYishai Hadas <yishaih@nvidia.com>
Mon, 5 Feb 2024 12:48:25 +0000 (14:48 +0200)
committerAlex Williamson <alex.williamson@redhat.com>
Thu, 22 Feb 2024 19:17:32 +0000 (12:17 -0700)
commitf886473071d6c0c98857eb5d7871a5e5ac26e950
tree1e03efbd3693cac7a92565767e759fff1e3b43b4
parent1cbcb564f5b67cee2fc2f78132b9733118a79c6d
vfio/mlx5: Add support for tracker object change event

Add support for tracker object change event by referring to its
MLX5_EVENT_TYPE_OBJECT_CHANGE event when occurs.

This lets the driver recognize whether the firmware moved the tracker
object to an error state.

In that case, the driver will skip/block any usage of that object
including an early exit in case the object was previously marked with an
error.

This functionality also covers the case when no CQE is delivered as of
the error state.

The driver was adapted to the device specification to handle the above.

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-3-yishaih@nvidia.com
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
drivers/vfio/pci/mlx5/cmd.c
drivers/vfio/pci/mlx5/cmd.h