[RFC,6/6] mm: Deprecate pasid field

Message ID 20230707013441.365583-7-tina.zhang@intel.com
State New
Headers
Series Share sva domain with all devices bound to a mm |

Commit Message

Zhang, Tina July 7, 2023, 1:34 a.m. UTC
  Drop the pasid field, as all the information needed for sva domain
management has been moved to the newly added iommu_mm field.

Signed-off-by: Tina Zhang <tina.zhang@intel.com>
---
 mm/init-mm.c | 1 -
 1 file changed, 1 deletion(-)
  

Comments

Jason Gunthorpe July 10, 2023, 5:29 p.m. UTC | #1
On Fri, Jul 07, 2023 at 09:34:41AM +0800, Tina Zhang wrote:
> Drop the pasid field, as all the information needed for sva domain
> management has been moved to the newly added iommu_mm field.
> 
> Signed-off-by: Tina Zhang <tina.zhang@intel.com>
> ---
>  mm/init-mm.c | 1 -
>  1 file changed, 1 deletion(-)

Shouldn't this remove the field from the mmu_struct as well??

Jason
  
Zhang, Tina July 11, 2023, 1:46 a.m. UTC | #2
> -----Original Message-----
> From: Jason Gunthorpe <jgg@ziepe.ca>
> Sent: Tuesday, July 11, 2023 1:29 AM
> To: Zhang, Tina <tina.zhang@intel.com>
> Cc: Tian, Kevin <kevin.tian@intel.com>; Joerg Roedel <joro@8bytes.org>; Will
> Deacon <will@kernel.org>; Lu Baolu <baolu.lu@linux.intel.com>; Michael
> Shavit <mshavit@google.com>; iommu@lists.linux.dev; linux-
> kernel@vger.kernel.org
> Subject: Re: [RFC PATCH 6/6] mm: Deprecate pasid field
> 
> On Fri, Jul 07, 2023 at 09:34:41AM +0800, Tina Zhang wrote:
> > Drop the pasid field, as all the information needed for sva domain
> > management has been moved to the newly added iommu_mm field.
> >
> > Signed-off-by: Tina Zhang <tina.zhang@intel.com>
> > ---
> >  mm/init-mm.c | 1 -
> >  1 file changed, 1 deletion(-)
> 
> Shouldn't this remove the field from the mmu_struct as well??
Oops! You're right 😊

Thanks,
-Tina
> 
> Jason
  

Patch

diff --git a/mm/init-mm.c b/mm/init-mm.c
index c43b7d0347312..50824dd5a949a 100644
--- a/mm/init-mm.c
+++ b/mm/init-mm.c
@@ -43,7 +43,6 @@  struct mm_struct init_mm = {
 	.user_ns	= &init_user_ns,
 	.cpu_bitmap	= CPU_BITS_NONE,
 #ifdef CONFIG_IOMMU_SVA
-	.pasid		= IOMMU_PASID_INVALID,
 	.iommu_mm       = &default_iommu_mm,
 #endif
 	INIT_MM_CONTEXT(init_mm)