Re: [PATCH v7 6/6] vfio/nvgrace-gpu: wait for the GPU mem to be ready

From: Ankit Agrawal

Date: Wed Nov 26 2025 - 06:35:51 EST


>> +     ret = vfio_pci_core_setup_barmap(vdev, 0);
>> +     if (ret)
>> +             return ret;
>
> Should make sure vfio_pci_core_disable() is called on err path above.

Yes, will have to do the following.

@@ -112,8 +112,10 @@ static int nvgrace_gpu_open_device(struct vfio_device *core_vdev)
* memory mapping.
*/
ret = vfio_pci_core_setup_barmap(vdev, 0);
- if (ret)
+ if (ret) {
+ vfio_pci_core_disable(vdev);
return ret;
+ }

vfio_pci_core_finish_enable(vdev);

> With that,
> Reviewed-by: Shameer Kolothum <skolothumtho@xxxxxxxxxx>