Re: [PATCH 02/14] vfio: factor out a vfio_iommu_driver_allowed helper

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 13 Sep 2021 09:15:54 +0200
Christoph Hellwig <hch@xxxxxx> wrote:

> Factor out a little helper to make the checks for the noiommu driver less
> ugly.
> 
> Signed-off-by: Christoph Hellwig <hch@xxxxxx>
> Reviewed-by: Jason Gunthorpe <jgg@xxxxxxxxxx>
> Reviewed-by: Kevin Tian <kevin.tian@xxxxxxxxx>
> ---
>  drivers/vfio/vfio.c | 37 +++++++++++++++++++++----------------
>  1 file changed, 21 insertions(+), 16 deletions(-)
> 
> diff --git a/drivers/vfio/vfio.c b/drivers/vfio/vfio.c
> index b39da9b90c95bc..faf8e0d637bb94 100644
> --- a/drivers/vfio/vfio.c
> +++ b/drivers/vfio/vfio.c
...
> @@ -999,8 +1014,8 @@ void vfio_unregister_group_dev(struct vfio_device *device)
>  		wait_event(group->container_q, !group->container);
>  
>  #ifdef CONFIG_VFIO_NOIOMMU
> -	if (iommu_group_get_iommudata(group) == &noiommu)
> -		iommu_group_remove_device(dev);
> +	if (iommu_group_get_iommudata(group->iommu_group) == &noiommu)
> +		iommu_group_remove_device(device->dev);
>  #endif
>  	/* Matches the get in vfio_register_group_dev() */
>  	vfio_group_put(group);

This is a build fix to the previous patch in the series, it should be
rolled in there.  Thanks,

Alex




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux