On Wed, 10 Mar 2021 10:05:59 -0500
Tony Krowiak <akrowiak@xxxxxxxxxxxxx> wrote:
- ret = vfio_ap_mdev_reset_queues(mdev);Is it guaranteed that matrix_mdev can't be NULL here? If yes, please
+ matrix_mdev = mdev_get_drvdata(mdev);
remind me of the mechanism that ensures this.
+Didn't we agree to make the call to vfio_ap_mdev_reset_queues()
+ /*
+ * If the KVM pointer is in the process of being set, wait until
+ * the process has completed.
+ */
+ wait_event_cmd(matrix_mdev->wait_for_kvm,
+ matrix_mdev->kvm_busy == false,
+ mutex_unlock(&matrix_dev->lock),
+ mutex_lock(&matrix_dev->lock));
+
+ if (matrix_mdev->kvm)
+ ret = vfio_ap_mdev_reset_queues(mdev);
+ else
+ ret = -ENODEV;
unconditional again (for reference please take look at
Message-ID: <64afa72c-2d6a-2ca1-e576-34e15fa579ed@xxxxxxxxxxxxx>)?
Regards,
Halil