From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-dy2-f43.google.com (mail-dy2-f43.google.com [74.125.229.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 08F9F3E0749 for ; Thu, 24 Sep 2026 22:53:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.229.43 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790290424; cv=none; b=lZuo8OJ6RXuucl9GcZ7fSK7QfX5h+cvtnVnGyi+LPM0XkbEekokTTUsSBFSjiCkjGcy6MAvkV9YVaH4dKLaAUuUhmkOPyyxy/QrRDiQkq9BeoX1YxZhP6ctq0xGLqmUaVer4fBszh3B+Edk+x8zh0wdVUjth+IofZPipZqXbBUk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790290424; c=relaxed/simple; bh=iZ+xWnTaiwYqY244ouiVEpHW7Wth/ThJfp2DnzItInI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=VwNd4vDy4HTmFkPi+j9Ogxz3p2uTbXI3Nh2oCWcAA6Uoz0O1Cz/JZQZ4gXa1qFUDGI4Lt0va7Eb98/veVISTMMRsN0rLhaNb7KushNqsIZdHzFdZwQpiooNvPH/s7ZjvWNlgtrsBIrPdECMvcc3dLZ46L4fb4RPWaUdXt/Bug6U= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ziepe.ca; spf=pass smtp.mailfrom=ziepe.ca; dkim=pass (2048-bit key) header.d=ziepe.ca header.i=@ziepe.ca header.b=jdSaFljT; arc=none smtp.client-ip=74.125.229.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ziepe.ca Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ziepe.ca Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ziepe.ca header.i=@ziepe.ca header.b="jdSaFljT" Received: by mail-dy2-f43.google.com with SMTP id 5a478bee46e88-33c24422d4dso293374eec.2 for ; Thu, 24 Sep 2026 15:53:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; t=1790290422; x=1790895222; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :content-type:mime-version:references:message-id:subject:cc:to:from :date:from:to:cc:subject:date:message-id:reply-to:content-type; bh=HkHFg2PAsl7Q9sZ/6W2u68QBDReBA8b5w0p9gEJFVho=; b=jdSaFljTli1plzX/hr/fLlSUKOf0gQVV4iDlrLVhr+fznUA1rH6AeMNPoT/KvwIUvh kt2nd6sJoI4onq3Q0ozuZT70qy7PfwUGhdAOnhU0RGSrpskMhS02mF/0pYlTJWR0M9sz L+76mrK7EFxqN8ORwd9aKLXxDxkG+BiPsO6xntKrcRhufxs7JSGnMjBYfErqOqk9KsiD vPoUxSoY+zFAYZg0hyowmfSyFLr6jEr3iSEJVFroh8+msaYppDTa1Ut8dGDRz5pbnYfA P5viOz8cjIxxKCLuAIP6+xU7kGrxx6dc9mr9UWVScqjrLLZNrcfuSZkkTF210Bs3ph+z 4OYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1790290422; x=1790895222; h=in-reply-to:content-transfer-encoding:content-disposition :content-type:mime-version:references:message-id:subject:cc:to:from :date:x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to:content-type; bh=HkHFg2PAsl7Q9sZ/6W2u68QBDReBA8b5w0p9gEJFVho=; b=cJjEBDvobouSEdrKDffIx51xalzYg9MQWsOziu4yjaaLhLVQ+/zbEaMckwbsSSfB2E 7NACS34xbP6loNY0JamteIiUpr6tZzykE640eLW0Xj4v4BZpfu0w54pVrLBpevubwJg7 j84gpa/r6be6H8r5YmZ6Rv2lWkoPL6OS2FryvVy4VPPbMdlaS4MC82Ysj12vT4u7ceiS gjEvlgSD9Ln1gti6LSbWONsVUJ72Tvr7jEPvd8FCYv4GvS2RXrh+4eX9CSvj5L+i8/V3 rCfW82eu7YJF+OO7wk8q2duu8R1lh+5gsWsy6WQ2XfePtgGAy20P95OEv1IKhokPzkml jY7g== X-Forwarded-Encrypted: i=1; AKwUvBxpvuR/gWEgxmJVwRBv5M/UTjq9lJNbgYuOdszvQbqxvNaRMcbHRu2/7lzv7TcFkBXEed/2TALACG/lXKz2@vger.kernel.org X-Gm-Message-State: AFuF++nYugCmwlWqdfAjIQIbpmB3rnvIHcv4297IiHvWxSpXP3AYhSQ3 rG3DEHnp+waG86ETIdAJGGal95XC6+DrWvFsvGtLWx1Z0sQ2qDycNgGcfNRiFQFXTpY= X-Gm-Gg: AYBFou09godtcnLd82M81WAEU1rm7JoXp9EcsljPvY0i6H7Hofh/Qp6R/S4GutP+htg uN41mLAHksfLmtdD8RGRX4Zm6ivDftEX5WbPHp/YxzW4kPvJoxRd8jC+/ay5y2B+q5y3r8QncF0 j5QUkOBIz0zHvAJYuKigpp974ohaXj8BVKrsPm5+thIP5mH50TpxiHik2/L/36COnUGx4B+kbu/ C7ctITAt2E904zyAEtXafrqDaeluP1piobpiK3xeK6plhwceftk143fyifyGwlXMheGzpG+WlKx jQuA9taHZQOk5hENxt5YpYqDi7DpaPK0lk/pWyCOQL96HOEDiwsdjU4p39swH7O0GhCX2bFV7g3 lZ9AAd6XsvaiyT/Oe+jJGqfYGDysBD6ZEF/qlc3w4pfE3GUt6L8V++585pelx2eZ33+xrudGkq9 8Xbl+buWvfTi1y3R49TMMCKG7gEah9dw7qBbI7VgnnTxTB1Q== X-Received: by 2002:a05:693c:829b:10b0:33b:d89e:9fb2 with SMTP id 5a478bee46e88-34000f36181mr3727679eec.4.1790290422026; Thu, 24 Sep 2026 15:53:42 -0700 (PDT) Received: from ziepe.ca ([130.41.10.202]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-34141d2fe4bsm1631877eec.4.2026.09.24.15.53.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Sep 2026 15:53:41 -0700 (PDT) Received: from jgg by wakko with local (Exim 4.97) (envelope-from ) id 1x9sJw-00000000efs-2Wk8; Thu, 24 Sep 2026 19:53:40 -0300 Date: Thu, 24 Sep 2026 19:53:40 -0300 From: Jason Gunthorpe To: Daniel Mentz Cc: Vijayanand Jitta , Will Deacon , Robin Murphy , "Joerg Roedel (AMD)" , linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, iommu@lists.linux.dev, linux-kernel@vger.kernel.org, Prakash Gupta Subject: Re: [PATCH v5] iommu/io-pgtable-arm: Add support for contiguous hint bit Message-ID: <20260924225340.GC16465@ziepe.ca> References: <20260921-iommu_contig_hint-v5-1-e7fbd1c3774d@oss.qualcomm.com> <20260924001502.GO1540250@ziepe.ca> Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Thu, Sep 24, 2026 at 11:49:50AM -0700, Daniel Mentz wrote: > On Wed, Sep 23, 2026 at 5:15 PM Jason Gunthorpe wrote: > > > > On Mon, Sep 21, 2026 at 04:44:07PM +0530, Vijayanand Jitta wrote: > > > From: Prakash Gupta > > > > > > Add support for the contiguous hint (CONT) bit in ARM LPAE page tables. > > > When a set of consecutive PTEs map a naturally aligned contiguous block of > > > memory, set CONT on every descriptor in that group so the hardware can > > > combine translations and improve TLB reach. > > > > > > Advertise the supported CONT group sizes in pgsize_bitmap. Callers select > > > those sizes through the normal page-size selection path; io-pgtable-arm > > > then installs the corresponding tagged descriptors directly. A partial > > > unmap of a tagged CONT group is rejected before modifying any descriptor, > > > so a rejected request cannot leave the group partly unmapped. > > > > > > The IO_PGTABLE_QUIRK_ARM_NO_CONT_HINT quirk allows SMMU drivers to disable > > > CONT support for hardware with implementation-specific errata. > > > > smmuv3 has this errata, it must be disabled there too. I didn't notice > > it in this patch? > > SMMU is an architecture specification. I am not aware of errors in > this architecture specification that would preclude the usage of the > contiguous bit. I understand that Arm MMU-700 has the following > erratum > > 3777127 Under invalidation in TBU possible when using contiguous page > table entries And a neoverse one too. > The recommended workaround is described as > > "Ensure that contiguous page tables are removed using a single range > invalidation. Arm recommends using range invalidations to remove > contiguous entries anyway for performance reasons." > > and I believe we are already doing this. No we aren't. Go read my fix on this: https://lore.kernel.org/linux-iommu/1-v7-e84261bbe7cd+2ea80b-smmu_tlbi_jgg@nvidia.com/ I have another patch that fixes it for iommu domain mappings too. Jason