From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9ECB93AE192 for ; Wed, 4 Mar 2026 17:25:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772645128; cv=none; b=iKRltmi1yweC0msat6Dn0WYvRGPmZvURLPAvkobZTntLE5iebFUoyGUUjON70khjXj9LTq44zpRjM3LBA5oWkRtKspM78Lf+/ag8vZw075CCmx3/2r21f5zaK2zASJUblugSd6APPc+USuKpoylAtlvCdZ9j0AJPPBX/Z/ou/EU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772645128; c=relaxed/simple; bh=67bOIxQRhaOaL+Bl0hFqP1e77dKoUcI7f6kD9A+4XWM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=RZCgEG+V9EJeyD1JRkH1ffASz6PdmbezYRPlGMRuZWhPzIOWcbSOjXA4BiQCu35Nh0laZFIQrAXjicB+MU4J6xhL/FFMsTHSl1e8uL8KwoxmfASmlaqoOBdpxvrQxEvuKXExjKTTn7Lp21aE3cUWZ+zwYwAudGescz1x2kMSxBM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 1AFBF339; Wed, 4 Mar 2026 09:25:12 -0800 (PST) Received: from arm.com (usa-sjc-mx-foss1.foss.arm.com [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id A59AB3F73B; Wed, 4 Mar 2026 09:25:16 -0800 (PST) Date: Wed, 4 Mar 2026 17:25:10 +0000 From: Catalin Marinas To: Jason Gunthorpe Cc: Piotr Jaroszynski , Ryan Roberts , Will Deacon , linux-arm-kernel@lists.infradead.org, linux-mm@kvack.org, Alistair Popple , John Hubbard , Zi Yan , Breno Leitao , stable@vger.kernel.org Subject: Re: [PATCH] arm64: contpte: fix set_access_flags() no-op check for SMMU/ATS faults Message-ID: References: <20260303063751.2531716-1-pjaroszynski@nvidia.com> <20260304134313.GM972761@nvidia.com> <20260304153949.GP972761@nvidia.com> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260304153949.GP972761@nvidia.com> On Wed, Mar 04, 2026 at 11:39:49AM -0400, Jason Gunthorpe wrote: > On Wed, Mar 04, 2026 at 03:01:51PM +0000, Catalin Marinas wrote: > > Good point. For the AF bit, the hardware is not allowed to cache it in > > the TLB, so we can't get an AF fault for an unrelated VA nearby. > > The way we have read the spec is there is no restriction on what PTE > the HW accesses when it encounters a CONT group. Trying to find some rule in the Arm ARM, it only says that hardware AF/DBM only happens to a single entry but it is not specific about which in a contiguous range. So yeah, it's better not to assume anything. If it helps software, we could tighten the architecture but I think the benefit is marginal. -- Catalin