netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] vdpa: Use device_iommu_capable()
@ 2022-06-08 11:48 Robin Murphy
  2022-07-07 14:46 ` Robin Murphy
  2022-07-08  3:14 ` Jason Wang
  0 siblings, 2 replies; 3+ messages in thread
From: Robin Murphy @ 2022-06-08 11:48 UTC (permalink / raw)
  To: mst, jasowang; +Cc: kvm, virtualization, netdev, linux-kernel

Use the new interface to check the capability for our device
specifically.

Signed-off-by: Robin Murphy <robin.murphy@arm.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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] vdpa: Use device_iommu_capable()
  2022-06-08 11:48 [PATCH] vdpa: Use device_iommu_capable() Robin Murphy
@ 2022-07-07 14:46 ` Robin Murphy
  2022-07-08  3:14 ` Jason Wang
  1 sibling, 0 replies; 3+ messages in thread
From: Robin Murphy @ 2022-07-07 14:46 UTC (permalink / raw)
  To: mst, jasowang; +Cc: netdev, linux-kernel, kvm, virtualization

On 2022-06-08 12:48, Robin Murphy wrote:
> Use the new interface to check the capability for our device
> specifically.

Just checking in case this got lost - vdpa is now the only remaining 
iommu_capable() user in linux-next, and I'd like to be able to remove 
the old interface next cycle.

Thanks,
Robin.

> Signed-off-by: Robin Murphy <robin.murphy@arm.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);

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] vdpa: Use device_iommu_capable()
  2022-06-08 11:48 [PATCH] vdpa: Use device_iommu_capable() Robin Murphy
  2022-07-07 14:46 ` Robin Murphy
@ 2022-07-08  3:14 ` Jason Wang
  1 sibling, 0 replies; 3+ messages in thread
From: Jason Wang @ 2022-07-08  3:14 UTC (permalink / raw)
  To: Robin Murphy; +Cc: mst, kvm, virtualization, netdev, linux-kernel

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
>


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-07-08  3:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-08 11:48 [PATCH] vdpa: Use device_iommu_capable() Robin Murphy
2022-07-07 14:46 ` Robin Murphy
2022-07-08  3:14 ` Jason Wang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).