From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f171.google.com (mail-pl1-f171.google.com [209.85.214.171]) (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 DCC86407CCA for ; Thu, 28 May 2026 18:15:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.171 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779992106; cv=none; b=HgLH5drtrO9ojEb8VSbLiOFhWX3jKApQiVCCnfiBGBQjdm16oQgEker8TfDvcNVotsPog8GuovvuvO+TIgjtEpVj9AA8XykQZgLxLbVzw20oYwRDmvX99/rrne0bHubQaRTAgQoYszoooC7SaF9brQVHC9Vs6HXVZFHfR/5L/XA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779992106; c=relaxed/simple; bh=oVw3Nd5J5iK2SatiaW52qk8wnvZOzD4L0X/96I7vm/Y=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=hoENQ06FNAb5VUwoMQ0dsTNi+SFeWJRfr0BtWO1s3hrDM7FEwDQp6i/bgTPiVeXULK/WYcM+t/M2N3vhfiPYCwuYIHHOHtqT0ogDF/yp6U8oTwzmLjhZ3Uc55ByM+X9QOI5t757kvhcpWP1s+gHCcTcco7HnhfuYQTWJdY9aSqY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=FAc1JUfA; arc=none smtp.client-ip=209.85.214.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="FAc1JUfA" Received: by mail-pl1-f171.google.com with SMTP id d9443c01a7336-2ba3b9bcf69so105ad.0 for ; Thu, 28 May 2026 11:15:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1779992105; x=1780596905; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=1J/+HWoid0BEbW+tXsuIRks6EMfRCMcY0XqrXIbQ7CY=; b=FAc1JUfA0WkW40L3EwIaVOoXQ2HS53ve+XKSatxSDpx8O5dI5X/QYiVXTRjZv6+Oef eYshNseJBtGeF7OUl6JubrpTWCWpTQ1rYpLE5LISYRZEDQh1ootPkxKZbd33EFSYkDCI MMSoLjlHmjWn2uNbIO/CkGhgzMqyW3VAQLTzwzypNdCm0KtiYERVS510bWDYAluJyHMa Jgq/8gKOHGSAMk+PHVYy24P1bntfRTxv/2LcG/ym4Cn6bnis28Ppi9+Usm09TFx3nazW WvSkRb4fS0CWmUYrJCGl7tyGK6tkOeRituDZyocQwGa7Pq12YYT3+W9qjqJb3a4YVFSx g/6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779992105; x=1780596905; h=in-reply-to:content-disposition: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; bh=1J/+HWoid0BEbW+tXsuIRks6EMfRCMcY0XqrXIbQ7CY=; b=mbDoLfNIchHrCiYO2ONZqYSDr6jryaKryWn4VuSCLrjErlStqPwDI4LTrHRTXTqvu4 09gdbXQ1FlhkUMPePtMJzcKw026uuiPiVDMarRgL2mGvypQCKw/pR/rGBSP22Zp8Tl3T 2k938CAill7bW5RzSeb0iY0KYZ5s1pTlBVBJ0hQI8TiHk3ZYwYsV6hfhHHOTdFXht/a8 d7ihSjRk9CURXPjKqrPGytwMFc7tGrVxJCOpTlwCN4w7scUfaqvm/jNMKoycA4PSCa0P iOGJOsQHaq1SRKbMEsJDysGIPgl6dBtI5+7YI3eKkETjesV+Q/ILl2vTmd5F9xs9Mlkw Lt6A== X-Forwarded-Encrypted: i=1; AFNElJ/VRDShDg1+Xhm58NgKbK8C5jO50KAxsPrP0vB5WTBJdhz4bV3SZrgwDN5h0oRqqgIqLcW0THKBqnaLtAM=@vger.kernel.org X-Gm-Message-State: AOJu0YzPWOKNyASLsak8vKgDMeNcrdr9bneRsiLM4qEp/3OGd0TJlacD 3pvz85AWSlyz7yL5t3F12RvLzugeIv6nlTgvl8ExNkd6h+Cz1KwweB0+yIMfF4IQpA== X-Gm-Gg: Acq92OG/5njry7fGpNCyqXFuVDAt8d5c4JceGMLjHo5tz63dge31Ye8WNEZ39ySKmL3 w5py1blTDhMu9mJrkQ1GR8NnxFbJVOpWI9c2yvRnJEK2F/1myg1K8NgfofEu9bgZVac4fQfdI29 z8OlkgA8JFWWcjrDHZLFczCVi0LOvyyZAokEk8/7+mLJWXLjyYcyZDf0KIm0YRzzgrGuWVFgHGs /15AOqZmr0ryDTcB3Gwzs0vsfpeVelmBGor7vx99OeRNq4jDIFs8i48I28ISV+mEKi4M7TZwhMW 3l+sjA8AjcV+Odh3u9ViTBhkuoj3mB3J8QGjFK9ouOYW5hvMDdLb7gGiaElMXf28Q9DghhivvdH OyZColeAwkGMvrE4l79+y33W638O4bhuYpymoiVCf+9h9edTzPN12HOuYN9J3DpH+2mlSmC4B/y loHZuKa5cZvfkTI6nh7Egf9KB+3Ki/0m7iZCOIwGEmI2z8AtKwwIujuDQxI1PcJ1jm8V6R X-Received: by 2002:a17:902:da8d:b0:2bd:3bfd:74f1 with SMTP id d9443c01a7336-2bf1e2f6227mr112265ad.2.1779992104891; Thu, 28 May 2026 11:15:04 -0700 (PDT) Received: from google.com (44.234.124.34.bc.googleusercontent.com. [34.124.234.44]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-36b908f8f80sm2156136a91.5.2026.05.28.11.15.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 May 2026 11:15:04 -0700 (PDT) Date: Thu, 28 May 2026 18:14:57 +0000 From: Pranjal Shrivastava To: Jason Gunthorpe Cc: Nicolin Chen , will@kernel.org, robin.murphy@arm.com, joro@8bytes.org, bhelgaas@google.com, baolu.lu@linux.intel.com, kevin.tian@intel.com, miko.lenczewski@arm.com, linux-arm-kernel@lists.infradead.org, iommu@lists.linux.dev, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, dan.j.williams@intel.com, jonathan.cameron@huawei.com, vsethi@nvidia.com, linux-cxl@vger.kernel.org, nirmoyd@nvidia.com Subject: Re: [PATCH v6 3/3] iommu/arm-smmu-v3: Allow ATS to be always on Message-ID: References: <18bb6f421b3be891caa8f1fb50f3a4d56b52d5be.1779392420.git.nicolinc@nvidia.com> <20260528152930.GA3195266@nvidia.com> <20260528180018.GB3195266@nvidia.com> Precedence: bulk X-Mailing-List: linux-kernel@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: <20260528180018.GB3195266@nvidia.com> On Thu, May 28, 2026 at 03:00:18PM -0300, Jason Gunthorpe wrote: > On Thu, May 28, 2026 at 04:32:23PM +0000, Pranjal Shrivastava wrote: > > On Thu, May 28, 2026 at 12:29:30PM -0300, Jason Gunthorpe wrote: > > > On Thu, May 28, 2026 at 03:24:40PM +0000, Pranjal Shrivastava wrote: > > > > > > > > + master->ats_always_on = true; > > > > > + > > > > > + return arm_smmu_alloc_cd_tables(master); > > > > > > > > Nit: I'm not sure if I'm getting this right, are we saying we *need* to > > > > allocate CDs for CXL.cache cases in the probe itself because STE.EATS > > > > requires Config=Translate with S1DSS in bypass? > > > > > > Yeah, basically. > > > > > > Effectively the ARM rules for enabling ATS and Bypass together require > > > a valid CD table pointer. > > > > Ack. But do we expect transactions before attach_dev? What'd happen if > > we don't allocate CDs here? > > It can be done at any point before a non-abort STE is formed. > > The core code pretty much does this immediately after probe so there > isn't much point in moving it later. > Right.. that's what I'm not understanding clearly, if the STE is Abort anyway during probe, why are we breaking the alloc-at-attach convention? Usually, we allocate CD tables in the first attach_dev call. Why does that not work here? [Disclaimer: Not a pushback, just trying to understand the requirement] Praan