From: Nicolin Chen <nicolinc@nvidia.com>
To: "Tian, Kevin" <kevin.tian@intel.com>
Cc: "jgg@nvidia.com" <jgg@nvidia.com>,
"Liu, Yi L" <yi.l.liu@intel.com>,
"iommu@lists.linux.dev" <iommu@lists.linux.dev>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] iommufd/device: Enforce reserved IOVA also when attached to hwpt_nested
Date: Tue, 6 Aug 2024 09:50:40 -0700 [thread overview]
Message-ID: <ZrJUYDCxWJQCfOQA@Asurada-Nvidia> (raw)
In-Reply-To: <BN9PR11MB5276C2F39301A461FF84EB368CBF2@BN9PR11MB5276.namprd11.prod.outlook.com>
On Tue, Aug 06, 2024 at 08:08:49AM +0000, Tian, Kevin wrote:
> > From: Nicolin Chen <nicolinc@nvidia.com>
> > Sent: Tuesday, August 6, 2024 1:02 PM
> >
> > +iommufd_group_do_replace_reserved_iova(struct iommufd_group *igroup,
> > + struct iommufd_hw_pagetable *hwpt)
> > {
> > - struct iommufd_hw_pagetable *old_hwpt = igroup->hwpt;
> > + struct iommufd_hwpt_paging *hwpt_paging =
> > to_hwpt_paging(hwpt);
> > struct iommufd_device *cur;
> > int rc;
> >
> > lockdep_assert_held(&igroup->lock);
> >
> > - if (!hwpt_is_paging(old_hwpt) ||
> > - hwpt_paging->ioas != to_hwpt_paging(old_hwpt)->ioas) {
> > + if (!hwpt_paging)
> > + return 0;
> > +
> > + if (hwpt_to_ioas(hwpt) &&
>
> this check is always true when hwpt_paging is valid.
>
> Reviewed-by: Kevin Tian <kevin.tian@intel.com>
I can drop it.
Thanks
Nicolin
next prev parent reply other threads:[~2024-08-06 16:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-06 5:02 [PATCH v2] iommufd/device: Enforce reserved IOVA also when attached to hwpt_nested Nicolin Chen
2024-08-06 8:08 ` Tian, Kevin
2024-08-06 16:50 ` Nicolin Chen [this message]
2024-08-06 17:42 ` Jason Gunthorpe
2024-08-06 19:36 ` Nicolin Chen
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=ZrJUYDCxWJQCfOQA@Asurada-Nvidia \
--to=nicolinc@nvidia.com \
--cc=iommu@lists.linux.dev \
--cc=jgg@nvidia.com \
--cc=kevin.tian@intel.com \
--cc=linux-kernel@vger.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