Thread (44 messages) 44 messages, 5 authors, 2021-10-19

Re: [PATCH V1 mlx5-next 13/13] vfio/mlx5: Trap device RESET and update state accordingly

From: Jason Gunthorpe <jgg@nvidia.com>
Date: 2021-10-13 18:06:57
Also in: kvm, linux-pci

On Wed, Oct 13, 2021 at 12:47:07PM +0300, Yishai Hadas wrote:
quoted hunk ↗ jump to hunk
Trap device RESET and update state accordingly, it's done by registering
the matching callbacks.

Signed-off-by: Yishai Hadas <yishaih@nvidia.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
 drivers/vfio/pci/mlx5/main.c | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/drivers/vfio/pci/mlx5/main.c b/drivers/vfio/pci/mlx5/main.c
index e36302b444a6..8fe44ed13552 100644
+++ b/drivers/vfio/pci/mlx5/main.c
@@ -613,6 +613,19 @@ static const struct vfio_device_ops mlx5vf_pci_ops = {
 	.match = vfio_pci_core_match,
 };
 
+static void mlx5vf_reset_done(struct vfio_pci_core_device *core_vdev)
+{
+	struct mlx5vf_pci_core_device *mvdev = container_of(
+			core_vdev, struct mlx5vf_pci_core_device,
+			core_device);
+
+	mvdev->vmig.vfio_dev_state = VFIO_DEVICE_STATE_RUNNING;
This should hold the state mutex too

Jason
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help