From: Nicolin Chen <nicolinc@nvidia.com>
To: Jason Gunthorpe <jgg@nvidia.com>
Cc: <kevin.tian@intel.com>, <joro@8bytes.org>, <will@kernel.org>,
<robin.murphy@arm.com>, <baolu.lu@linux.intel.com>,
<iommu@lists.linux.dev>, <linux-kernel@vger.kernel.org>,
<yi.l.liu@intel.com>
Subject: Re: [PATCH v3] iommufd: Only enforce cache coherency in iommufd_hw_pagetable_alloc
Date: Mon, 23 Oct 2023 16:23:51 -0700 [thread overview]
Message-ID: <ZTcAhwYjjzqM0A5M@Asurada-Nvidia> (raw)
In-Reply-To: <20231023230509.GI3952@nvidia.com>
On Mon, Oct 23, 2023 at 08:05:09PM -0300, Jason Gunthorpe wrote:
> On Mon, Oct 23, 2023 at 11:57:00AM -0700, Nicolin Chen wrote:
> > According to the conversion in the following link:
Ah, a typo here: conversation.
> > https://lore.kernel.org/linux-iommu/20231020135501.GG3952@nvidia.com/
> >
> > The enforce_cache_coherency should be set/enforced in the hwpt allocation
> > routine. The iommu driver in its attach_dev() op should decide whether to
> > reject or not a device that doesn't match with the configuration of cache
> > coherency. Drop the enforce_cache_coherency piece in the attach/replace()
> > and move the remaining "num_devices" piece closer to the refcount that is
> > using it.
> >
> > Accordingly drop its function prototype in the header and mark it static.
> > Also add some extra comments to clarify the expected behaviors.
> >
> > Suggested-by: Kevin Tian <kevin.tian@intel.com>
> > Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com>
> > Signed-off-by: Nicolin Chen <nicolinc@nvidia.com>
> > ---
> > Changelog
> > v3:
> > * Reworked the first line of the added commets.
> > v2: https://lore.kernel.org/all/20231023035733.27378-1-nicolinc@nvidia.com/
> > * Dropped "fixes" tags and merged two patches into one (Jason)
> > * Added comments to the remaining enforce_cache_coherency call (Jason)
> > [Please feel free to rephrase, or let me know what to change.]
> > * Replace "num_devices++" with list_for_each_entry (Baolu)
> > v1: https://lore.kernel.org/all/cover.1697848510.git.nicolinc@nvidia.com/
> >
> > drivers/iommu/iommufd/device.c | 20 ++------------------
> > drivers/iommu/iommufd/hw_pagetable.c | 9 ++++++++-
> > drivers/iommu/iommufd/iommufd_private.h | 1 -
> > 3 files changed, 10 insertions(+), 20 deletions(-)
>
> This looks OK to me, Kevin is it what you think it should be now?
I will respin a v4 after Kevin's reply. And I can attach his
"Reviewed-by" if everything looks good to him too.
Thanks
Nic
next prev parent reply other threads:[~2023-10-23 23:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-23 18:57 Nicolin Chen
2023-10-23 23:05 ` Jason Gunthorpe
2023-10-23 23:23 ` Nicolin Chen [this message]
2023-10-24 1:18 ` Tian, Kevin
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=ZTcAhwYjjzqM0A5M@Asurada-Nvidia \
--to=nicolinc@nvidia.com \
--cc=baolu.lu@linux.intel.com \
--cc=iommu@lists.linux.dev \
--cc=jgg@nvidia.com \
--cc=joro@8bytes.org \
--cc=kevin.tian@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=robin.murphy@arm.com \
--cc=will@kernel.org \
--cc=yi.l.liu@intel.com \
/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®