From: Tina Zhang <tina.zhang@intel.com>
To: Jason Gunthorpe <jgg@ziepe.ca>
Cc: Kevin Tian <kevin.tian@intel.com>,
Lu Baolu <baolu.lu@linux.intel.com>,
Michael Shavit <mshavit@google.com>,
Vasant Hegde <vasant.hegde@amd.com>, <iommu@lists.linux.dev>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v4 4/6] mm: Add structure to keep sva information
Date: Fri, 22 Sep 2023 09:51:33 +0800 [thread overview]
Message-ID: <cc71e279-8f43-0e84-f4b3-7040c31adac3@intel.com> (raw)
In-Reply-To: <20230921190427.GA13795@ziepe.ca>
On 9/22/23 03:04, Jason Gunthorpe wrote:
> On Tue, Sep 12, 2023 at 08:59:34PM +0800, Tina Zhang wrote:
>> Introduce iommu_mm_data structure to keep sva information (pasid and the
>> related sva domains). Add iommu_mm pointer, pointing to an instance of
>> iommu_mm_data structure, to mm.
>>
>> Reviewed-by: Vasant Hegde <vasant.hegde@amd.com>
>> Signed-off-by: Tina Zhang <tina.zhang@intel.com>
>> ---
>> include/linux/iommu.h | 5 +++++
>> include/linux/mm_types.h | 2 ++
>> 2 files changed, 7 insertions(+)
>
> This is not a great way to structure the patches
>
> This patch should move the pasid into the struct and do all the
> infrastructure to allocate/free the struct.
>
> The next patch should just add the list head to the now existing struct:
Agree. It would be great if we can put a new filed adding and its
related handing logic into one patch. It will be convenient not only for
the author but also for the reviewers, as it can convey the intention of
the code change more easily.
In this case, the reason we put new members' introduction into one patch
and their handling logic into another patch, is that it seems an easy
way to replace the old pasid field w/o involving extra temporary logic
to keep everything work between patches. Fortunately, we only have two
new fields, which might make this option not so ugly :)
Regards,
-Tina
>
>> +struct iommu_mm_data {
>> + u32 pasid;
>> + struct list_head sva_domains;
>> +};
>
> The code looks fine though
>
> Jason
next prev parent reply other threads:[~2023-09-22 1:52 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-12 12:59 [PATCH v4 0/6] Share sva domains with all devices bound to a mm Tina Zhang
2023-09-12 12:59 ` [PATCH v4 1/6] iommu: Add mm_get_enqcmd_pasid() helper function Tina Zhang
2023-09-12 12:59 ` [PATCH v4 2/6] iommu/vt-d: Remove mm->pasid in intel_sva_bind_mm() Tina Zhang
2023-09-13 2:25 ` Baolu Lu
2023-09-21 18:56 ` Jason Gunthorpe
2023-09-22 2:09 ` Tina Zhang
2023-09-12 12:59 ` [PATCH v4 3/6] iommu: Introduce mm_get_pasid() helper function Tina Zhang
2023-09-21 19:02 ` Jason Gunthorpe
2023-09-22 2:07 ` Tina Zhang
2023-09-12 12:59 ` [PATCH v4 4/6] mm: Add structure to keep sva information Tina Zhang
2023-09-13 2:38 ` Baolu Lu
2023-09-21 19:04 ` Jason Gunthorpe
2023-09-22 1:51 ` Tina Zhang [this message]
2023-09-12 12:59 ` [PATCH v4 5/6] iommu: Support mm PASID 1:n with sva domains Tina Zhang
2023-09-21 23:31 ` Jason Gunthorpe
2023-09-22 1:07 ` Tina Zhang
2023-09-12 12:59 ` [PATCH v4 6/6] mm: Deprecate pasid field Tina Zhang
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=cc71e279-8f43-0e84-f4b3-7040c31adac3@intel.com \
--to=tina.zhang@intel.com \
--cc=baolu.lu@linux.intel.com \
--cc=iommu@lists.linux.dev \
--cc=jgg@ziepe.ca \
--cc=kevin.tian@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mshavit@google.com \
--cc=vasant.hegde@amd.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®