Linux IOMMU Development
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@ziepe.ca>
To: Vasant Hegde <vasant.hegde@amd.com>
Cc: iommu@lists.linux.dev, joro@8bytes.org,
	suravee.suthikulpanit@amd.com, wei.huang2@amd.com,
	jsnitsel@redhat.com
Subject: Re: [PATCH v4 11/16] iommu/amd: Refactor attaching / detaching device functions
Date: Fri, 5 Jan 2024 15:14:37 -0400	[thread overview]
Message-ID: <20240105191437.GQ50608@ziepe.ca> (raw)
In-Reply-To: <20231212085224.6985-12-vasant.hegde@amd.com>

On Tue, Dec 12, 2023 at 08:52:19AM +0000, Vasant Hegde wrote:
> From: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
> 
> If default domain is configured with V2 page table then setup default GCR3
> with domain GCR3 pointer. So that all devices in the domain uses same page
> table for translation. Also return page table setup status from do_attach()
> function.
> 
> Note that current patch configures GCR3 table with MAX supported PASIDs.
> Ideally it should use 1 level PASID table as its using PASID zero only.
> Later in SVA enable path it should be reconfigured to support MAX PASIDs.
> This will be fixed later once SVA support is upstreamed.

??

Given this driver doesn't support PASID at this point you should just
allocate a 1 entry table in this patch.

When PASID support is added then you have to allocate a MAX pasid
table or implement atomic resize.

The patch looks fine otherwise

Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>

Jason

  reply	other threads:[~2024-01-05 19:14 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-12  8:52 [PATCH v4 00/16] iommu/amd: SVA Support (part 3) - refactor support for GCR3 table Vasant Hegde
2023-12-12  8:52 ` [PATCH v4 01/16] iommu/amd: Pass struct iommu_dev_data to set_dte_entry() Vasant Hegde
2023-12-12  8:52 ` [PATCH v4 02/16] iommu/amd: Enable Guest Translation before registering devices Vasant Hegde
2024-01-05 18:17   ` Jason Gunthorpe
2023-12-12  8:52 ` [PATCH v4 03/16] iommu/amd: Introduce get_amd_iommu_from_dev() Vasant Hegde
2024-01-05 18:27   ` Jason Gunthorpe
2024-01-10 12:07     ` Vasant Hegde
2023-12-12  8:52 ` [PATCH v4 04/16] iommu/amd: Introduce struct protection_domain.pd_mode Vasant Hegde
2023-12-12  8:52 ` [PATCH v4 05/16] iommu/amd: Introduce per-device GCR3 table Vasant Hegde
2023-12-12  8:52 ` [PATCH v4 06/16] iommu/amd: Use protection_domain.flags to check page table mode Vasant Hegde
2024-01-05 18:28   ` Jason Gunthorpe
2023-12-12  8:52 ` [PATCH v4 07/16] iommu/amd: Introduce per-device domain ID to workaround potential TLB aliasing issue Vasant Hegde
2024-01-05 18:55   ` Jason Gunthorpe
2024-01-11 11:18     ` Vasant Hegde
2024-01-11 13:59       ` Jason Gunthorpe
2024-01-12 12:45         ` Vasant Hegde
2024-01-12 14:59           ` Jason Gunthorpe
2024-01-16 10:52             ` Vasant Hegde
2024-01-16 14:00               ` Jason Gunthorpe
2024-01-16 17:08                 ` Vasant Hegde
2024-01-16 17:22                   ` Jason Gunthorpe
2023-12-12  8:52 ` [PATCH v4 08/16] iommu/amd: Add support for device based TLB invalidation Vasant Hegde
2024-01-05 19:03   ` Jason Gunthorpe
2023-12-12  8:52 ` [PATCH v4 09/16] iommu/amd: Rearrange GCR3 table setup code Vasant Hegde
2024-01-05 19:04   ` Jason Gunthorpe
2023-12-12  8:52 ` [PATCH v4 10/16] iommu/amd: Refactor helper function for setting / clearing GCR3 Vasant Hegde
2024-01-05 19:12   ` Jason Gunthorpe
2024-01-11 11:52     ` Vasant Hegde
2024-01-11 13:26       ` Jason Gunthorpe
2024-01-12  9:00         ` Vasant Hegde
2023-12-12  8:52 ` [PATCH v4 11/16] iommu/amd: Refactor attaching / detaching device functions Vasant Hegde
2024-01-05 19:14   ` Jason Gunthorpe [this message]
2024-01-11 10:06     ` Vasant Hegde
2023-12-12  8:52 ` [PATCH v4 12/16] iommu/amd: Refactor protection_domain helper functions Vasant Hegde
2023-12-12  8:52 ` [PATCH v4 13/16] iommu/amd: Refactor GCR3 table " Vasant Hegde
2024-01-05 19:21   ` Jason Gunthorpe
2024-01-11  5:39     ` Vasant Hegde
2023-12-12  8:52 ` [PATCH v4 14/16] iommu/amd: Remove unused flush pasid functions Vasant Hegde
2024-01-05 19:22   ` Jason Gunthorpe
2023-12-12  8:52 ` [PATCH v4 15/16] iommu/amd: Rearrange device flush code Vasant Hegde
2024-01-05 19:22   ` Jason Gunthorpe
2023-12-12  8:52 ` [PATCH v4 16/16] iommu/amd: Remove unused GCR3 table parameters from struct protection_domain Vasant Hegde

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=20240105191437.GQ50608@ziepe.ca \
    --to=jgg@ziepe.ca \
    --cc=iommu@lists.linux.dev \
    --cc=joro@8bytes.org \
    --cc=jsnitsel@redhat.com \
    --cc=suravee.suthikulpanit@amd.com \
    --cc=vasant.hegde@amd.com \
    --cc=wei.huang2@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