[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZSEkgSlEn5OQjzGV@Asurada-Nvidia>
Date: Sat, 7 Oct 2023 02:27:29 -0700
From: Nicolin Chen <nicolinc@...dia.com>
To: Yan Zhao <yan.y.zhao@...el.com>
CC: Yi Liu <yi.l.liu@...el.com>, <joro@...tes.org>,
<alex.williamson@...hat.com>, <jgg@...dia.com>,
<kevin.tian@...el.com>, <robin.murphy@....com>,
<baolu.lu@...ux.intel.com>, <cohuck@...hat.com>,
<eric.auger@...hat.com>, <kvm@...r.kernel.org>,
<mjrosato@...ux.ibm.com>, <chao.p.peng@...ux.intel.com>,
<yi.y.sun@...ux.intel.com>, <peterx@...hat.com>,
<jasowang@...hat.com>, <shameerali.kolothum.thodi@...wei.com>,
<lulu@...hat.com>, <suravee.suthikulpanit@....com>,
<iommu@...ts.linux.dev>, <linux-kernel@...r.kernel.org>,
<linux-kselftest@...r.kernel.org>, <zhenzhong.duan@...el.com>,
<joao.m.martins@...cle.com>
Subject: Re: [PATCH v4 09/17] iommufd/device: Add helpers to enforce/remove
device reserved regions
On Sat, Oct 07, 2023 at 03:20:41PM +0800, Yan Zhao wrote:
> > @@ -444,10 +465,9 @@ iommufd_device_do_replace(struct iommufd_device *idev,
> > }
> >
> > old_hwpt = igroup->hwpt;
> > - if (hwpt->ioas != old_hwpt->ioas) {
> > + if (iommufd_hw_pagetable_compare_ioas(old_hwpt, hwpt)) {
> > list_for_each_entry(cur, &igroup->device_list, group_item) {
> > - rc = iopt_table_enforce_dev_resv_regions(
> > - &hwpt->ioas->iopt, cur->dev, NULL);
> > + rc = iommufd_device_enforce_rr(cur, hwpt, NULL);
> > if (rc)
> > goto err_unresv;
> > }
> > @@ -461,12 +481,10 @@ iommufd_device_do_replace(struct iommufd_device *idev,
> > if (rc)
> > goto err_unresv;
> >
> > - if (hwpt->ioas != old_hwpt->ioas) {
> > + if (iommufd_hw_pagetable_compare_ioas(old_hwpt, hwpt)) {
> > list_for_each_entry(cur, &igroup->device_list, group_item)
> > - iopt_remove_reserved_iova(&old_hwpt->ioas->iopt,
> > - cur->dev);
> > + iommufd_device_remove_rr(cur, hwpt);
> Should be "iommufd_device_remove_rr(cur, old_hwpt);"
Ah, right. Should fix this.
Thanks!
Nicolin
Powered by blists - more mailing lists