From: Jason Gunthorpe <jgg@nvidia.com>
To: iommu@lists.linux.dev, Kevin Tian <kevin.tian@intel.com>,
linux-kselftest@vger.kernel.org, Shuah Khan <shuah@kernel.org>
Cc: Nicolin Chen <nicolinc@nvidia.com>, Yi Liu <yi.l.liu@intel.com>
Subject: Re: [PATCH v3 00/12] Revise the hwpt lifetime model
Date: Mon, 6 Mar 2023 13:16:48 -0400 [thread overview]
Message-ID: <ZAYgALkSB4/gFiTU@nvidia.com> (raw)
In-Reply-To: <0-v3-ae9c2975a131+2e1e8-iommufd_hwpt_jgg@nvidia.com>
On Wed, Mar 01, 2023 at 03:30:17PM -0400, Jason Gunthorpe wrote:
> As discussed here is a small series to address the confusing lifetime
> scheme for the hwpt. This was some leftover from prior rework that was
> never fully cleaned up.
>
> Make it clear that the ioas and ioas->hwpt_list are associated with the
> hwpt during creation and never changed until it is destroyed. A hwpt with
> a positive reference count is always valid for device attachment.
>
> This also improves the selftest handling of the mock domains so that we
> can implement more testing for the hwpt model.
>
> This is a step toward the nesting and replace series.
>
> I have this on github:
>
> https://github.com/jgunthorpe/linux/commits/iommufd_hwpt
>
> v3:
> - Split patch to just make the hwpt_item handling consistent
> - Remove two confusing comments
> - Four new patches to clean up the confusing 'domain_id' in the selftest
> v2: https://lore.kernel.org/r/0-v2-406f7ac07936+6a-iommufd_hwpt_jgg@nvidia.com
> - Basically completely different
> - Add a test for HWPT cases by enhancing the mock iommu driver to be more
> complete
> - Move the device attachment as well into iommufd_hw_pagetable_alloc()
> so destroy is more symmetric
> v1: https://lore.kernel.org/r/0-v1-4336b5cb2fe4+1d7-iommufd_hwpt_jgg@nvidia.com
Applied to iommufd for-next with the noted comment update
Thanks,
Jason
prev parent reply other threads:[~2023-03-06 17:18 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-01 19:30 [PATCH v3 00/12] Revise the hwpt lifetime model Jason Gunthorpe
2023-03-01 19:30 ` [PATCH v3 01/12] iommufd: Assert devices_lock for iommufd_hw_pagetable_has_group() Jason Gunthorpe
2023-03-01 19:30 ` [PATCH v3 02/12] iommufd: Add iommufd_lock_obj() around the auto-domains hwpts Jason Gunthorpe
2023-03-01 19:30 ` [PATCH v3 03/12] iommufd: Consistently manage hwpt_item Jason Gunthorpe
2023-03-02 1:20 ` Tian, Kevin
2023-03-01 19:30 ` [PATCH v3 04/12] iommufd: Move ioas related HWPT destruction into iommufd_hw_pagetable_destroy() Jason Gunthorpe
2023-03-02 1:21 ` Tian, Kevin
2023-03-01 19:30 ` [PATCH v3 05/12] iommufd: Move iommufd_device to iommufd_private.h Jason Gunthorpe
2023-03-01 19:30 ` [PATCH v3 06/12] iommufd: Make iommufd_hw_pagetable_alloc() do iopt_table_add_domain() Jason Gunthorpe
2023-03-01 19:30 ` [PATCH v3 07/12] iommufd/selftest: Rename the sefltest 'device_id' to 'stdev_id' Jason Gunthorpe
2023-03-02 1:21 ` Tian, Kevin
2023-03-01 19:30 ` [PATCH v3 08/12] iommufd/selftest: Rename domain_id to stdev_id for FIXTURE iommufd_ioas Jason Gunthorpe
2023-03-02 1:23 ` Tian, Kevin
2023-03-06 14:50 ` Jason Gunthorpe
2023-03-01 19:30 ` [PATCH v3 09/12] iommufd/selftest: Rename domain_id to hwpt_id for FIXTURE iommufd_mock_domain Jason Gunthorpe
2023-03-02 1:24 ` Tian, Kevin
2023-03-01 19:30 ` [PATCH v3 10/12] iommufd/selftest: Rename the remaining mock device_id's to stdev_id Jason Gunthorpe
2023-03-02 1:25 ` Tian, Kevin
2023-03-01 19:30 ` [PATCH v3 11/12] iommufd/selftest: Make selftest create a more complete mock device Jason Gunthorpe
2023-03-01 19:30 ` [PATCH v3 12/12] iommufd/selftest: Add a selftest for iommufd_device_attach() with a hwpt argument Jason Gunthorpe
2023-03-02 1:26 ` Tian, Kevin
2023-03-06 17:16 ` 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=ZAYgALkSB4/gFiTU@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