From: Jason Gunthorpe <jgg@nvidia.com>
To: "Tian, Kevin" <kevin.tian@intel.com>
Cc: "iommu@lists.linux.dev" <iommu@lists.linux.dev>,
"linux-kselftest@vger.kernel.org"
<linux-kselftest@vger.kernel.org>, Shuah Khan <shuah@kernel.org>,
Nicolin Chen <nicolinc@nvidia.com>,
"Liu, Yi L" <yi.l.liu@intel.com>
Subject: Re: [PATCH v2 7/7] iommufd/selftest: Add a selftest for iommufd_device_attach() with a hwpt argument
Date: Fri, 24 Feb 2023 14:19:00 -0400 [thread overview]
Message-ID: <Y/j/lKB498EyB+oW@nvidia.com> (raw)
In-Reply-To: <BN9PR11MB5276995EF79AE2557ADE27BD8CA89@BN9PR11MB5276.namprd11.prod.outlook.com>
On Fri, Feb 24, 2023 at 07:02:06AM +0000, Tian, Kevin wrote:
> > From: Jason Gunthorpe <jgg@nvidia.com>
> > Sent: Thursday, February 23, 2023 5:03 AM
> >
> > This can now be covered since we have a full struct device.
> >
> > Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
> > ---
> > tools/testing/selftests/iommu/iommufd.c | 13 ++++++++++++-
> > 1 file changed, 12 insertions(+), 1 deletion(-)
> >
> > diff --git a/tools/testing/selftests/iommu/iommufd.c
> > b/tools/testing/selftests/iommu/iommufd.c
> > index 0c4bbd4079a425..69cb79d6a0711d 100644
> > --- a/tools/testing/selftests/iommu/iommufd.c
> > +++ b/tools/testing/selftests/iommu/iommufd.c
> > @@ -187,6 +187,7 @@ FIXTURE(iommufd_ioas)
> > int fd;
> > uint32_t ioas_id;
> > uint32_t domain_id;
> > + uint32_t hwpt_id;
> > uint64_t base_iova;
> > };
> >
> > @@ -212,7 +213,7 @@ FIXTURE_SETUP(iommufd_ioas)
> > }
> >
> > for (i = 0; i != variant->mock_domains; i++) {
> > - test_cmd_mock_domain(self->ioas_id, NULL, &self-
> > >domain_id);
> > + test_cmd_mock_domain(self->ioas_id, &self->domain_id,
> > &self->hwpt_id);
>
> I didn't get how this works. self->domain_id now means device_id but
> other references still take it as a domain, e.g.
The names are just wrong, Nicolin pointed this out and I had a later
patch to fix it, but lets move it earlier to this series.
Thanks,
Jason
prev parent reply other threads:[~2023-02-24 18:19 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-22 21:02 [PATCH v2 0/7] Revise the hwpt lifetime model Jason Gunthorpe
2023-02-22 21:02 ` [PATCH v2 1/7] iommufd: Assert devices_lock for iommufd_hw_pagetable_has_group() Jason Gunthorpe
2023-02-22 21:02 ` [PATCH v2 2/7] iommufd: Add iommufd_lock_obj() around the auto-domains hwpts Jason Gunthorpe
2023-02-24 6:12 ` Tian, Kevin
2023-02-22 21:02 ` [PATCH v2 3/7] iommufd: Move ioas related HWPT destruction into iommufd_hw_pagetable_destroy() Jason Gunthorpe
2023-02-24 6:25 ` Tian, Kevin
2023-02-22 21:02 ` [PATCH v2 4/7] iommufd: Move iommufd_device to iommufd_private.h Jason Gunthorpe
2023-02-24 6:27 ` Tian, Kevin
2023-02-22 21:02 ` [PATCH v2 5/7] iommufd: Make iommufd_hw_pagetable_alloc() do iopt_table_add_domain() Jason Gunthorpe
2023-02-23 9:03 ` Tian, Kevin
2023-02-23 13:07 ` Jason Gunthorpe
2023-02-24 6:35 ` Tian, Kevin
2023-02-24 17:02 ` Jason Gunthorpe
2023-02-22 21:02 ` [PATCH v2 6/7] iommufd/selftest: Make selftest create a more complete mock device Jason Gunthorpe
2023-02-24 6:50 ` Tian, Kevin
2023-02-24 14:26 ` Jason Gunthorpe
2023-02-22 21:02 ` [PATCH v2 7/7] iommufd/selftest: Add a selftest for iommufd_device_attach() with a hwpt argument Jason Gunthorpe
2023-02-24 7:02 ` Tian, Kevin
2023-02-24 18:19 ` Jason Gunthorpe [this message]
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=Y/j/lKB498EyB+oW@nvidia.com \
--to=jgg@nvidia.com \
--cc=iommu@lists.linux.dev \
--cc=kevin.tian@intel.com \
--cc=linux-kselftest@vger.kernel.org \
--cc=nicolinc@nvidia.com \
--cc=shuah@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