From: Robin Murphy <robin.murphy@arm.com>
To: alex.williamson@redhat.com, cohuck@redhat.com
Cc: kvm@vger.kernel.org, iommu@lists.linux-foundation.org,
linux-kernel@vger.kernel.org, jgg@nvidia.com,
baolu.lu@linux.intel.com, iommu@lists.linux.dev
Subject: [PATCH v3 2/2] vfio: Use device_iommu_capable()
Date: Fri, 24 Jun 2022 18:59:35 +0100 [thread overview]
Message-ID: <4ea5eb64246f1ee188d1a61c3e93b37756932eb7.1656092606.git.robin.murphy@arm.com> (raw)
In-Reply-To: <194a12d3434d7b38f84fa96503c7664451c8c395.1656092606.git.robin.murphy@arm.com>
Use the new interface to check the capabilities for our device
specifically.
Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
---
drivers/vfio/vfio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/vfio/vfio.c b/drivers/vfio/vfio.c
index 61e71c1154be..4c06b571eaba 100644
--- a/drivers/vfio/vfio.c
+++ b/drivers/vfio/vfio.c
@@ -605,7 +605,7 @@ int vfio_register_group_dev(struct vfio_device *device)
* VFIO always sets IOMMU_CACHE because we offer no way for userspace to
* restore cache coherency.
*/
- if (!iommu_capable(device->dev->bus, IOMMU_CAP_CACHE_COHERENCY))
+ if (!device_iommu_capable(device->dev, IOMMU_CAP_CACHE_COHERENCY))
return -EINVAL;
return __vfio_register_dev(device,
--
2.36.1.dirty
next prev parent reply other threads:[~2022-06-24 17:59 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-24 17:51 [PATCH v3 1/2] vfio/type1: Simplify bus_type determination Robin Murphy
2022-06-24 17:59 ` Robin Murphy [this message]
2022-06-24 18:50 ` [PATCH v3 2/2] vfio: Use device_iommu_capable() Jason Gunthorpe
2022-06-27 7:22 ` Tian, Kevin
2022-06-24 18:50 ` [PATCH v3 1/2] vfio/type1: Simplify bus_type determination Jason Gunthorpe
2022-06-27 7:22 ` Tian, Kevin
2022-06-27 19:21 ` Alex Williamson
2022-06-27 19:39 ` Robin Murphy
2022-06-30 19:51 ` Alex Williamson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4ea5eb64246f1ee188d1a61c3e93b37756932eb7.1656092606.git.robin.murphy@arm.com \
--to=robin.murphy@arm.com \
--cc=alex.williamson@redhat.com \
--cc=baolu.lu@linux.intel.com \
--cc=cohuck@redhat.com \
--cc=iommu@lists.linux-foundation.org \
--cc=iommu@lists.linux.dev \
--cc=jgg@nvidia.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®