From: Robin Murphy <robin.murphy@arm.com>
To: Jason Gunthorpe <jgg@nvidia.com>, Michael Shavit <mshavit@google.com>
Cc: iommu@lists.linux.dev, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, will@kernel.org,
nicolinc@nvidia.com, tina.zhang@intel.com,
jean-philippe@linaro.org
Subject: Re: [RFC PATCH v1 2/8] iommu/arm-smmu-v3: Perform invalidations over installed_smmus
Date: Thu, 17 Aug 2023 20:41:08 +0100 [thread overview]
Message-ID: <05f69a1a-97c9-ebca-5e01-c0b00699c93e@arm.com> (raw)
In-Reply-To: <ZN5y4N8ffSoiR/sm@nvidia.com>
On 2023-08-17 20:20, Jason Gunthorpe wrote:
> On Fri, Aug 18, 2023 at 02:16:24AM +0800, Michael Shavit wrote:
>> Prepare and batch invalidation commands for each SMMU that a domain is
>> installed onto.
>> Move SVA's check against the smmu's ARM_SMMU_FEAT_BTM bit into
>> arm_smmu_tlb_inv_range_asid so that it can be checked against each
>> installed SMMU.
>>
>> Signed-off-by: Michael Shavit <mshavit@google.com>
>> ---
>> It's not obvious to me whether skipping the tlb_inv_range_asid when
>> ARM_SMMU_FEAT_BTM is somehow specific to SVA? Is moving the check into
>> arm_smmu_tlb_inv_range_asid still valid if that function were called
>> outside of SVA?
>
> Logically it should be linked to SVA, and specifically to the mmu
> notifier callback. The mmu notifier callback is done whenever the CPU
> did an invalidation and BTM means the SMMU tracks exactly those
> automatically. Thus we don't need to duplicated it. Indeed, we should
> probably not even register a mmu notifier on BTM capable devices.
Almost - broadcast invalidates from the CPU only apply to SMMU TLBs; we
still need the notifier for the sake of issuing ATC invalidate commands
to endpoints.
> It is certainly wrong to skip invalidations generated for any other
> reason.
>
> From what I can tell SVA domains should have their CD table entry
> programmed with "ASET=0" and normal paging domains should be
> programmed with "ASET=1". This causes only the SVA domains to listen
> to the BTM invalidations.
Correct.
Thanks,
Robin.
next prev parent reply other threads:[~2023-08-17 19:41 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-17 18:16 [RFC PATCH v1 0/8] Install domain onto multiple smmus Michael Shavit
2023-08-17 18:16 ` [RFC PATCH v1 1/8] iommu/arm-smmu-v3: Add list of installed_smmus Michael Shavit
2023-08-17 19:05 ` Jason Gunthorpe
2023-08-17 19:34 ` Robin Murphy
2023-08-18 5:34 ` Michael Shavit
2023-08-17 18:16 ` [RFC PATCH v1 2/8] iommu/arm-smmu-v3: Perform invalidations over installed_smmus Michael Shavit
2023-08-17 19:20 ` Jason Gunthorpe
2023-08-17 19:41 ` Robin Murphy [this message]
2023-08-18 3:44 ` Michael Shavit
2023-08-18 13:51 ` Jason Gunthorpe
2023-08-21 8:33 ` Michael Shavit
2023-08-21 11:57 ` Jason Gunthorpe
2023-08-22 8:17 ` Michael Shavit
2023-08-22 8:21 ` Michael Shavit
2023-08-22 10:10 ` Michael Shavit
2023-08-22 14:15 ` Jason Gunthorpe
2023-08-17 18:16 ` [RFC PATCH v1 3/8] iommu/arm-smmu-v3-sva: Allocate new ASID from installed_smmus Michael Shavit
2023-08-17 18:38 ` Jason Gunthorpe
2023-08-21 9:31 ` Michael Shavit
2023-08-21 11:54 ` Jason Gunthorpe
2023-08-21 13:38 ` Michael Shavit
2023-08-21 13:50 ` Jason Gunthorpe
2023-08-21 14:16 ` Michael Shavit
2023-08-21 14:26 ` Jason Gunthorpe
2023-08-21 14:39 ` Michael Shavit
2023-08-21 14:56 ` Jason Gunthorpe
2023-08-22 8:53 ` Michael Shavit
2023-08-17 18:16 ` [RFC PATCH v1 4/8] iommu/arm-smmu-v3: check smmu compatibility on attach Michael Shavit
2023-08-17 19:16 ` Robin Murphy
2023-08-18 3:14 ` Michael Shavit
2023-08-17 18:16 ` [RFC PATCH v1 5/8] iommu/arm-smmu-v3: Add arm_smmu_device as a parameter to domain_finalise Michael Shavit
2023-08-17 18:16 ` [RFC PATCH v1 6/8] iommu/arm-smmu-v3: Free VMID when uninstalling domain from SMMU Michael Shavit
2023-08-17 18:50 ` Jason Gunthorpe
2023-08-17 18:16 ` [RFC PATCH v1 7/8] iommu/arm-smmu-v3: check for domain initialization using pgtbl_ops Michael Shavit
2023-08-17 18:16 ` [RFC PATCH v1 8/8] iommu/arm-smmu-v3: allow multi-SMMU domain installs Michael Shavit
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=05f69a1a-97c9-ebca-5e01-c0b00699c93e@arm.com \
--to=robin.murphy@arm.com \
--cc=iommu@lists.linux.dev \
--cc=jean-philippe@linaro.org \
--cc=jgg@nvidia.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mshavit@google.com \
--cc=nicolinc@nvidia.com \
--cc=tina.zhang@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome