From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6037C3A4F58 for ; Tue, 18 Aug 2026 05:10:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787029839; cv=none; b=mtyVcYq7EAO7WCwdWKWd/KV7hj82srOE5QhGodBITaMXIhb11r3cqi6s2kZ2VNWcCJkir8Io1R+lphCWErqkhyC2V6LYg3wpUnmbEsurhWUqBXjuIHiamiDdrjll+WMhOZluk2HvwgJELyFCxFibjNzj3THhgQlC4kbwwvcEAAE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787029839; c=relaxed/simple; bh=FeAbcPh2BNksaU1ol+KzsK0r4wOWdTJppcdaT2TRPqs=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=sSOGiS573mgBiqCzpkuAbDUQKsyEReqi80JRcB9umZtHvV0Ux9XfG2VP65NwrIa5PiRlHNLTyGNvDSr6ZM0CMbuAa10w0OGgjspeM5cNIkHc+3MGqUriTsmbXGcUuDaglZzu3t1zzsZgUnDsikeo2IrMrRXqOFP4A8zDgUu33y4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=KeBhHxQZ; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=LWr7poZJ; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="KeBhHxQZ"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="LWr7poZJ" Received: from pps.filterd (m0279873.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 67I564o43464511 for ; Tue, 18 Aug 2026 05:10:37 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= Rp3lIMjCbjVBjSLiXhtJRxpN1gXNwjBR1B2cE1UgyMk=; b=KeBhHxQZWxpTR36D Psjvj/wq85jpkNoelRCr7GA7IQCCNbmQzbbatB7HF/+kMmEmIX47iSfKo78TrcSi zRz5ZSG449nqvSpSoNWzt68dQQgrrECiYvvocNwe0bQUC3g/OuRn/tEfNoxb24oC O9wbXTcyPL56yRHFNej8KVXdeaEMBbZEEIPNDfRrpfJcoG68OgijLhbpI6ejiKy9 0/VB2vb/qCwEl8lPPqalgpvM78u5K5Sp+CNMHTxsKImtrqVSh44YqH9H+pABffO5 hr6Tf/yxspMv8oPqYzuJdIWNp2SdtEDSQsiwbvkCPxvoGVfB+nOTF1tlZ9n7YP78 D4B/iQ== Received: from mail-pf1-f199.google.com (mail-pf1-f199.google.com [209.85.210.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4g4611asdh-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 18 Aug 2026 05:10:37 +0000 (GMT) Received: by mail-pf1-f199.google.com with SMTP id d2e1a72fcca58-84e048a801dso5684747b3a.3 for ; Mon, 17 Aug 2026 22:10:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1787029836; x=1787634636; darn=vger.kernel.org; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to :content-type; bh=Rp3lIMjCbjVBjSLiXhtJRxpN1gXNwjBR1B2cE1UgyMk=; b=LWr7poZJYk7Q0HTF5LwrWCT9KE4JuohiFX3PV+0O4QlVUd0fXDrxhbK9qUC7HsnJaf rNQ6/FfjGdng7iKIft9KFK12ZpAfHG7VeogePVdd5k2jeX8bY6RWpUdWocaW1rQ5NOhx 99iAa6i0hHaiEY+krpniHI5EFQHpVETeZX5FI8xDeS2/vfddChZO67qTSCzgc8f5KOHD 8rM662Fuh8v7cHO/p7py8HFJO3etIDGjYUYDEzc5M9Qtkj2opIZNy3EowEryaU1E8uZK 7shtfAzhDB7RIFDlCqeFv1btfd4hM/u7fqWUlpYBQZxj7xPFIdJabOO0Y+5pWIN6rQRG ZvRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1787029836; x=1787634636; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=Rp3lIMjCbjVBjSLiXhtJRxpN1gXNwjBR1B2cE1UgyMk=; b=VlA3/YFKYdk2Qu3W6j1UkgUDh5kgTX1ZEJmo82OoaBehTbEN2t0xoMApPP3kTFdzqC BWjVtKvaZ2h6obNMouop9LSjciuQC+ktUMiimhAvZfcmz6iJqtAFHZUgM+WNfDyQwzAx XoGFTh6tjQTmPezuxA+047/ODc80+H6ACHaUgpq5B6dKsHMNMO16t0WApGhrbMuH8c+/ LrENPjNaSZAkvfNoiX/xOdsPVN+cskJYterXE8432tCjgCxTeRpiMzrYFZ4WBVfpc0fu GI+LMEv91ol+HWChiYu5yQuWdisngmOHx+uI2yi1CkNKCOhvNd3YzbNQIY2+ieyvREv9 x0iA== X-Forwarded-Encrypted: i=1; AHgh+RqaPruAKwaBObz49AHx51gAJjgW73tb9P03chOQfivWkOhy4AXQoccCmNKnX2r8Gi16JDhqya6KXXq6T08=@vger.kernel.org X-Gm-Message-State: AOJu0YxmyBFv1OsjKLJqhDqXE5wOcyh1LYZLSv/17CnBkk+PvxImux2u dUunIZdKfCGnUZ2xT89KerfTrMvpGrLmaJVTt1VZqkfBEF/rhOLiKyx3daZ6dnoskzHdlGEuLON HI+fLxT/KMp+v/UtapDfCtEjNDYZrcdia+um1d2Mf4bG7f0icmwvEwVPJbUiNbGSMnK4= X-Gm-Gg: AR+sD107MTRMJwac++5LBqI0vQy1mFeFGu6N8aVnk9VYhaWB/aqEOiR/bTsyblOam1q zlY/UdJpxwdVyNcOoEqgV+zaxnDB7OKvFxPq0iZCdDXsFcW/m4McYND8Cn+XeDu2uRtd43KUK+3 9rKD60mwc4T6sL1DeY4YadbiKhwD1rvrlSoX9PGmT3ykJTHF4MVUL3tSw3jlqIvF/ezFzX/V6G2 11NplE3kIHAc9XWx8Yo7owlLMsZ2iI73w7sCGVRP7n87uGM2+7l8Oiq6CuB6QMgWZTJemNoMgh6 VIKzqI+5RzWyDkezOhU2JiZtnZorIiETfhq23icwM/I/b/Td76V1ysUMHWD2v54jIiDZrR1gYcE Py+wwO77zA5yfPQgswJ/RQdO0SesU2w== X-Received: by 2002:a05:6a00:188b:b0:845:e8b9:347 with SMTP id d2e1a72fcca58-84fddfe099cmr29499677b3a.13.1787029836097; Mon, 17 Aug 2026 22:10:36 -0700 (PDT) X-Received: by 2002:a05:6a00:188b:b0:845:e8b9:347 with SMTP id d2e1a72fcca58-84fddfe099cmr29499576b3a.13.1787029835654; Mon, 17 Aug 2026 22:10:35 -0700 (PDT) Received: from [10.219.56.166] ([202.46.23.19]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-851b6ff2232sm1015652b3a.52.2026.08.17.22.10.26 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 17 Aug 2026 22:10:35 -0700 (PDT) Message-ID: <89ec74da-15ed-4278-b651-5c753fa4f146@oss.qualcomm.com> Date: Tue, 18 Aug 2026 10:40:25 +0530 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 05/15] iommu: Add QDA compute context bank bus to iommu_buses To: Jason Gunthorpe Cc: Oded Gabbay , Jonathan Corbet , Shuah Khan , Randy Dunlap , Nathan Chancellor , Nick Desaulniers , Bill Wendling , Justin Stitt , "Joerg Roedel (AMD)" , Will Deacon , Robin Murphy , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Sumit Semwal , =?UTF-8?Q?Christian_K=C3=B6nig?= , Bharath Kumar , Chenna Kesava Raju , srinivas.kandagatla@oss.qualcomm.com, dmitry.baryshkov@oss.qualcomm.com, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-doc@vger.kernel.org, linux-arm-msm@vger.kernel.org, llvm@lists.linux.dev, iommu@lists.linux.dev, linux-media@vger.kernel.org, linaro-mm-sig@lists.linaro.org References: <20260817-qda-v2-v2-0-69a02e9090d4@oss.qualcomm.com> <20260817-qda-v2-v2-5-69a02e9090d4@oss.qualcomm.com> <20260817134416.GA1415075@ziepe.ca> Content-Language: en-US From: Ekansh Gupta In-Reply-To: <20260817134416.GA1415075@ziepe.ca> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Proofpoint-GUID: u9mNjHajN78IlZEO2uOovEs2lT1Wi9CT X-Proofpoint-ORIG-GUID: u9mNjHajN78IlZEO2uOovEs2lT1Wi9CT X-Proofpoint-Spam-Info: AW1haW4tMjYwODE4MDAzNiBTYWx0ZWRfX3fCrj2ICiP/g iFRWEl0KGCR50gilE4zforV7GwaT3JdHb3q17SVfavNzrZLwLFkDzF6F9h9jWDxkpfIMF1sUTXP ltnRfJwPNE7K3vh2d3s75H43A/tDnDQ= X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwODE4MDAzNiBTYWx0ZWRfX4/39w9rpsI7v ZwYsPzfxF5BKPIbUtKYxrImQA4sTOAynIICToAdz6Kc3mQlYprLk7IZNowqcxPUJOsUvBx8MXG/ MAm0Xfko6FSSwDWt8cRc2VRFLruvHoeZ0Px6pUAMaCVMAMTaB1A+cXmmI65hP1c7xKY3lNwxY+Q zSIn/rJ6999fnL3bEwEpkcvRCXBsq7FdKMhl2Qs+i2zxCASFBnJHSzCt3v8jeXOhLhavCxd+PmS LjaduduBsS0r2huUZEcz7UH4CT1hBybl4fbrhfL6To9FsC4RoZJ8A4JRZKwN2DunDfr6jiUAEqp GflzEn9ohR1scOLdwTzHpVYkljfM3HnHrDsDXwHgpsNnbtioVXw07D+so2A6RcNbMoQUkym9CiK /6BTMqOCZ0mKno5XZssX6Uw7EWtB+/sCG6c9nk3txTVYuJEtEIpRv63h6uPPuQtBmiNhdxGFbiF j8GAt2y2Dob1dlyXAqA== X-Authority-Analysis: v=2.4 cv=UslT8ewB c=1 sm=1 tr=0 ts=6a83e94d cx=c_pps a=WW5sKcV1LcKqjgzy2JUPuA==:117 a=j4ogTh8yFefVWWEFDRgCtg==:17 a=IkcTkHD0fZMA:10 a=Sv0fKeRqtYgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=rJkE3RaqiGZ5pbrm-msn:22 a=VwQbUJbxAAAA:8 a=UlZBYPnkdO8YS_jrOJUA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=OpyuDcXvxspvyRM73sMx:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-08-17_04,2026-08-12_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 clxscore=1015 impostorscore=0 suspectscore=0 phishscore=0 bulkscore=0 priorityscore=1501 malwarescore=0 spamscore=0 adultscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2608180036 On 17-08-2026 19:14, Jason Gunthorpe wrote: > On Mon, Aug 17, 2026 at 10:17:40AM +0530, Ekansh Gupta wrote: >> Register the QDA compute context bank bus (qda-compute-cb) with the >> IOMMU subsystem by adding it to the iommu_buses[] array. >> >> The QDA driver creates synthetic devices on this bus to represent >> IOMMU context banks (CBs). Each CB device needs its own IOMMU domain >> so that the DSP memory manager can enforce per-session address space >> isolation. Without this registration, the IOMMU subsystem does not >> probe CB devices for IOMMU groups and of_dma_configure() in the bus >> dma_configure callback has no IOMMU domain to attach to. > > I didn't notice a clear explanation of the proposed DT schema for this The context banks are described in DT as child nodes of the fastrpc RPMsg endpoint with compatible "qcom,fastrpc-compute-cb" and a `reg` property for the stream ID, this is the existing binding in Documentation/devicetree/bindings/misc/qcom,fastrpc.yaml. QDA reuses this schema unchanged. > > But it looks awfully similar to the other driver that was creating a > kernel synthetic bus for actual real HW, that wasn't well liked. > > What is this for? Why can't you have a normal DT binding for the > iommu with normal devices? The CB child nodes are not separate addressable hardware — they are SMMU stream-ID assignments described as sub-resources of the parent DSP interface. Using platform devices for them was explicitly rejected by Greg KH [1] and subsequently using a generic shared bus in drivers/base/ was also rejected [2]. Greg's conclusion was that each driver needing this pattern should have its own custom bus type. That is exactly what QDA does: the qda-compute-cb bus is a per-driver bus type with a dma_configure callback, following the same pattern as the existing host1x_context_device_bus_type that has been in the iommu_buses[] array since 2021. The bus creates devices synchronously in probe, calls of_dma_configure() via its bus callback so the IOMMU subsystem probes them normally, and tears them down on remove. [1] https://lore.kernel.org/all/2025062434-reviving-grumble-1e53@gregkh/ [2] https://lore.kernel.org/all/2026042442-luxurious-antonym-f20c@gregkh/ //Ekansh> > Jason