Hi Harpal,

> This patch will add a new API i.e. pci_vfio_unmap_resource.
> It will basically cleanup all the vfio resources allocated for a device.
> cleanup includes :-
> 1) removing vfio_res from vfio_res_list
> 2) unmap mapped bars
> 3) close device fd
> 4) close group fd
> 5) free vfio_res

Do I understand it correctly that your code assumes that there is always a 
single PCI device per group? From what I understand, unless we're only using a 
single port from the NIC, this won't be the case. 

Also, extraneous comment symbols:

> +     // /* unmap BARs */

Best regards,
Anatoly

Reply via email to