All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pranjal Shrivastava <praan@google.com>
To: Jason Gunthorpe <jgg@nvidia.com>
Cc: Alexandre Ghiti <alex@ghiti.fr>,
	Albert Ou <aou@eecs.berkeley.edu>,
	iommu@lists.linux.dev, Joerg Roedel <joro@8bytes.org>,
	linux-riscv@lists.infradead.org,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Paul Walmsley <pjw@kernel.org>,
	Robin Murphy <robin.murphy@arm.com>,
	Tomasz Jeznach <tjeznach@rivosinc.com>,
	Will Deacon <will@kernel.org>,
	Andrew Jones <andrew.jones@oss.qualcomm.com>,
	Fangyu Yu <fangyu.yu@linux.alibaba.com>,
	patches@lists.linux.dev
Subject: Re: [PATCH v2 3/8] iommupt: Add PT_FEAT_DETAILED_GATHER
Date: Fri, 8 May 2026 20:35:09 +0000	[thread overview]
Message-ID: <af5I_Xps4Ma-qUDx@google.com> (raw)
In-Reply-To: <3-v2-b5156f657dc1+25f-iommu_riscv_inv_jgg@nvidia.com>

On Fri, May 08, 2026 at 11:53:02AM -0300, Jason Gunthorpe wrote:
> Generating the ARM SMMUv3 and RISC-V invalidation commands optimally
> requires some additional details from iommupt:
> 
> - leaf_levels_bitmap is used to compute the ARM Range Invalidation
>   Table Top Level hint
> 
> - leaf_levels_bitmap is also used to compute the stride when
>   generating single invalidations to invalidate once per leaf
> 
> - table_levels_bitmap also computes the ARM TTL for future cases when
>   there are no leaves
> 
> Put these under a feature since only two drivers need to calculate
> them.
> 
> This is also useful for the coming kunit iotlb invalidation test to
> know more about what invalidation is happening.
> 
> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
> ---

The conditional gathering via PT_FEAT_DETAILED_GATHER looks nice.

Reviewed-by: Pranjal Shrivastava <praan@google.com>

Thanks,
Praan

WARNING: multiple messages have this Message-ID (diff)
From: Pranjal Shrivastava <praan@google.com>
To: Jason Gunthorpe <jgg@nvidia.com>
Cc: Alexandre Ghiti <alex@ghiti.fr>,
	Albert Ou <aou@eecs.berkeley.edu>,
	iommu@lists.linux.dev, Joerg Roedel <joro@8bytes.org>,
	linux-riscv@lists.infradead.org,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Paul Walmsley <pjw@kernel.org>,
	Robin Murphy <robin.murphy@arm.com>,
	Tomasz Jeznach <tjeznach@rivosinc.com>,
	Will Deacon <will@kernel.org>,
	Andrew Jones <andrew.jones@oss.qualcomm.com>,
	Fangyu Yu <fangyu.yu@linux.alibaba.com>,
	patches@lists.linux.dev
Subject: Re: [PATCH v2 3/8] iommupt: Add PT_FEAT_DETAILED_GATHER
Date: Fri, 8 May 2026 20:35:09 +0000	[thread overview]
Message-ID: <af5I_Xps4Ma-qUDx@google.com> (raw)
In-Reply-To: <3-v2-b5156f657dc1+25f-iommu_riscv_inv_jgg@nvidia.com>

On Fri, May 08, 2026 at 11:53:02AM -0300, Jason Gunthorpe wrote:
> Generating the ARM SMMUv3 and RISC-V invalidation commands optimally
> requires some additional details from iommupt:
> 
> - leaf_levels_bitmap is used to compute the ARM Range Invalidation
>   Table Top Level hint
> 
> - leaf_levels_bitmap is also used to compute the stride when
>   generating single invalidations to invalidate once per leaf
> 
> - table_levels_bitmap also computes the ARM TTL for future cases when
>   there are no leaves
> 
> Put these under a feature since only two drivers need to calculate
> them.
> 
> This is also useful for the coming kunit iotlb invalidation test to
> know more about what invalidation is happening.
> 
> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
> ---

The conditional gathering via PT_FEAT_DETAILED_GATHER looks nice.

Reviewed-by: Pranjal Shrivastava <praan@google.com>

Thanks,
Praan

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

  reply	other threads:[~2026-05-08 20:35 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-08 14:52 [PATCH v2 0/8] Support non-leaf and range invalidation features in RISC-V Jason Gunthorpe
2026-05-08 14:52 ` Jason Gunthorpe
2026-05-08 14:53 ` [PATCH v2 1/8] iommu: Split the kdoc comment for struct iommu_iotlb_gather Jason Gunthorpe
2026-05-08 14:53   ` Jason Gunthorpe
2026-05-08 20:24   ` Pranjal Shrivastava
2026-05-08 20:24     ` Pranjal Shrivastava
2026-05-08 14:53 ` [PATCH v2 2/8] iommupt: Add struct iommupt_pending_gather Jason Gunthorpe
2026-05-08 14:53   ` Jason Gunthorpe
2026-05-08 20:26   ` Pranjal Shrivastava
2026-05-08 20:26     ` Pranjal Shrivastava
2026-05-08 14:53 ` [PATCH v2 3/8] iommupt: Add PT_FEAT_DETAILED_GATHER Jason Gunthorpe
2026-05-08 14:53   ` Jason Gunthorpe
2026-05-08 20:35   ` Pranjal Shrivastava [this message]
2026-05-08 20:35     ` Pranjal Shrivastava
2026-05-08 14:53 ` [PATCH v2 4/8] iommu/riscv: Enable PT_FEAT_DETAILED_GATHER and pass gather to iotlb_inval Jason Gunthorpe
2026-05-08 14:53   ` Jason Gunthorpe
2026-05-08 14:53 ` [PATCH v2 5/8] iommu/riscv: Compute best stride for single invalidation Jason Gunthorpe
2026-05-08 14:53   ` Jason Gunthorpe
2026-05-08 14:53 ` [PATCH v2 6/8] iommu/riscv: Add RISCV_IOMMU_CAPABILITIES_NL Jason Gunthorpe
2026-05-08 14:53   ` Jason Gunthorpe
2026-05-08 14:53 ` [PATCH v2 7/8] iommu/riscv: Include the dword number in RISCV_IOMMU_CMD macros Jason Gunthorpe
2026-05-08 14:53   ` Jason Gunthorpe
2026-05-14 20:04   ` Tomasz Jeznach
2026-05-14 20:04     ` Tomasz Jeznach
2026-05-08 14:53 ` [PATCH v2 8/8] iommu/riscv: Add NAPOT range invalidation support Jason Gunthorpe
2026-05-08 14:53   ` Jason Gunthorpe
2026-05-09 20:39 ` [PATCH v2 0/8] Support non-leaf and range invalidation features in RISC-V Andrew Jones
2026-05-09 20:39   ` Andrew Jones

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=af5I_Xps4Ma-qUDx@google.com \
    --to=praan@google.com \
    --cc=alex@ghiti.fr \
    --cc=andrew.jones@oss.qualcomm.com \
    --cc=aou@eecs.berkeley.edu \
    --cc=fangyu.yu@linux.alibaba.com \
    --cc=iommu@lists.linux.dev \
    --cc=jgg@nvidia.com \
    --cc=joro@8bytes.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=palmer@dabbelt.com \
    --cc=patches@lists.linux.dev \
    --cc=pjw@kernel.org \
    --cc=robin.murphy@arm.com \
    --cc=tjeznach@rivosinc.com \
    --cc=will@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.