lkml.org 
[lkml]   [2022]   [Jul]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] vdpa: Use device_iommu_capable()
On Wed, Jun 8, 2022 at 7:53 PM Robin Murphy <robin.murphy@arm.com> wrote:
>
> Use the new interface to check the capability for our device
> specifically.
>
> Signed-off-by: Robin Murphy <robin.murphy@arm.com>

Acked-by: Jason Wang <jasowang@redhat.com>

> ---
> drivers/vhost/vdpa.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/vhost/vdpa.c b/drivers/vhost/vdpa.c
> index 935a1d0ddb97..4cfebcc24a03 100644
> --- a/drivers/vhost/vdpa.c
> +++ b/drivers/vhost/vdpa.c
> @@ -1074,7 +1074,7 @@ static int vhost_vdpa_alloc_domain(struct vhost_vdpa *v)
> if (!bus)
> return -EFAULT;
>
> - if (!iommu_capable(bus, IOMMU_CAP_CACHE_COHERENCY))
> + if (!device_iommu_capable(dma_dev, IOMMU_CAP_CACHE_COHERENCY))
> return -ENOTSUPP;
>
> v->domain = iommu_domain_alloc(bus);
> --
> 2.36.1.dirty
>

\
 
 \ /
  Last update: 2022-07-08 05:15    [W:0.050 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site