lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3d503305-0c07-cf6f-7f22-ad7a4da55fb7@amd.com>
Date:   Tue, 5 Sep 2023 10:28:45 +0530
From:   Vasant Hegde <vasant.hegde@....com>
To:     Tina Zhang <tina.zhang@...el.com>, Jason Gunthorpe <jgg@...pe.ca>,
        Kevin Tian <kevin.tian@...el.com>,
        Lu Baolu <baolu.lu@...ux.intel.com>
Cc:     Michael Shavit <mshavit@...gle.com>, iommu@...ts.linux.dev,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 4/6] mm: Add structure to keep sva information



On 9/5/2023 5:39 AM, 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.
> 
> Signed-off-by: Tina Zhang <tina.zhang@...el.com>

Looks good to me.

Reviewed-by: Vasant Hegde <vasant.hegde@....com>

-Vasant


> ---
>  include/linux/iommu.h    | 5 +++++
>  include/linux/mm_types.h | 2 ++
>  2 files changed, 7 insertions(+)
> 
> diff --git a/include/linux/iommu.h b/include/linux/iommu.h
> index ab8784dfdbd9..937f3abc26f2 100644
> --- a/include/linux/iommu.h
> +++ b/include/linux/iommu.h
> @@ -670,6 +670,11 @@ struct iommu_sva {
>  	struct iommu_domain		*domain;
>  };
>  
> +struct iommu_mm_data {
> +	u32			pasid;
> +	struct list_head	sva_domains;
> +};
> +
>  int iommu_fwspec_init(struct device *dev, struct fwnode_handle *iommu_fwnode,
>  		      const struct iommu_ops *ops);
>  void iommu_fwspec_free(struct device *dev);
> diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
> index 7d30dc4ff0ff..b486f521afee 100644
> --- a/include/linux/mm_types.h
> +++ b/include/linux/mm_types.h
> @@ -595,6 +595,7 @@ struct mm_cid {
>  #endif
>  
>  struct kioctx_table;
> +struct iommu_mm_data;
>  struct mm_struct {
>  	struct {
>  		/*
> @@ -808,6 +809,7 @@ struct mm_struct {
>  
>  #ifdef CONFIG_IOMMU_SVA
>  		u32 pasid;
> +		struct iommu_mm_data *iommu_mm;
>  #endif
>  #ifdef CONFIG_KSM
>  		/*

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ