mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Robin Murphy <robin.murphy@arm.com>
To: Jason Gunthorpe <jgg@ziepe.ca>
Cc: Samiullah Khawaja <skhawaja@google.com>,
	Joerg Roedel <joro@8bytes.org>, Will Deacon <will@kernel.org>,
	Kevin Tian <kevin.tian@intel.com>,
	Alex Williamson <alex@shazbot.org>,
	iommu@lists.linux.dev, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	Pasha Tatashin <pasha.tatashin@soleen.com>,
	David Matlack <dmatlack@google.com>,
	Lu Baolu <baolu.lu@linux.intel.com>,
	Pranjal Shrivastava <praan@google.com>
Subject: Re: [RFC PATCH 3/3] iommu/arm-smmu-v3: Add support for hitless replace of S1 domains
Date: Fri, 23 Oct 2026 15:04:23 +0100	[thread overview]
Message-ID: <d4570e2d-5b92-4f05-a8b3-34d5d5b299bd@arm.com> (raw)
In-Reply-To: <20261023134900.GB3977851@ziepe.ca>

On 23/10/2026 2:49 pm, Jason Gunthorpe wrote:
> On Fri, Oct 23, 2026 at 02:43:28PM +0100, Robin Murphy wrote:
>>> @@ -3664,8 +3726,8 @@ static int arm_smmu_attach_dev(struct iommu_domain *domain, struct device *dev,
>>>    		struct arm_smmu_cd target_cd;
>>>    		arm_smmu_make_s1_cd(&target_cd, master, smmu_domain);
>>> -		arm_smmu_write_cd_entry(master, IOMMU_NO_PASID, cdptr,
>>> -					&target_cd);
>>> +		arm_smmu_replace_cd_entry(master, IOMMU_NO_PASID, cdptr,
>>> +					  &target_cd);
>>
>> No, we cannot blindly do this for arbitrary ->attach_dev calls - the
>> majority of S1->S1 transitions are going to be moving back and forth between
>> the default domain and user domains, where there is zero expectation, let
>> alone guarantee, that the translations would be equivalent and thus not
>> liable to lead to TLB conflict aborts or amalgamation hell.
> 
> Heh, yeah this probably only works properly with BBML2 or something so
> the temporary ASID doesn't explode.

This is fundamental VMSA behaviour - see R_FVQCK in the Arm ARM. BBML 
only applies to the one specific case of identical VA->PA translations 
with identical attributes _only_ differing in the leaf level at which 
they are described.

Thanks,
Robin.

  reply	other threads:[~2026-10-23 14:04 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-25  1:13 [RFC PATCH 0/3] iommu/arm-smmu-v3: Add support for hitless replace of CD entries Samiullah Khawaja
2026-09-25  1:13 ` [RFC PATCH 1/3] vfio: selftests: Add support of creating iommus from iommufd Samiullah Khawaja
2026-10-21 22:19   ` David Matlack
2026-09-25  1:13 ` [RFC PATCH 2/3] vfio: selftests: Add iommufd hwpt replace test Samiullah Khawaja
2026-10-21 22:39   ` David Matlack
2026-09-25  1:13 ` [RFC PATCH 3/3] iommu/arm-smmu-v3: Add support for hitless replace of S1 domains Samiullah Khawaja
2026-10-23 13:43   ` Robin Murphy
2026-10-23 13:49     ` Jason Gunthorpe
2026-10-23 14:04       ` Robin Murphy [this message]
2026-10-23 14:29         ` Jason Gunthorpe
2026-09-25 21:44 ` [RFC PATCH 0/3] iommu/arm-smmu-v3: Add support for hitless replace of CD entries David Matlack
2026-09-25 22:27   ` Samiullah Khawaja
2026-10-23 12:10 ` Robin Murphy
2026-10-23 13:46   ` Jason Gunthorpe
2026-10-23 14:12     ` Robin Murphy

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=d4570e2d-5b92-4f05-a8b3-34d5d5b299bd@arm.com \
    --to=robin.murphy@arm.com \
    --cc=alex@shazbot.org \
    --cc=baolu.lu@linux.intel.com \
    --cc=dmatlack@google.com \
    --cc=iommu@lists.linux.dev \
    --cc=jgg@ziepe.ca \
    --cc=joro@8bytes.org \
    --cc=kevin.tian@intel.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pasha.tatashin@soleen.com \
    --cc=praan@google.com \
    --cc=skhawaja@google.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

all inboxes | Powered by JetHome®