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 0FEC123536B for ; Mon, 2 Feb 2026 10:56:42 +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=1770029804; cv=none; b=Z8Ky+YSGbZRQMw8M+X5m+/+CrlrFNKMbPl2Yf2QGLzOv2FI8CLQIEENWHXHg8RlSnRXx6AmXCtp4etExcMy9nyIHWqx/iyvYMQsOkbNzdo6y/w1d/Fc4ttiu/QPNzamqAC9ueY5la6Yuo7/AWoUFdx/NpIxUcl3iIV+HUUrgyQw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770029804; c=relaxed/simple; bh=q66RPD2oOJwfCVDjgotrvDTzNwrnipJAVBK9XKsirOI=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=cYvXptBiMomvnlTPrvLuV+svCLurapFH+aFhVRSysNUIOmTC4/Nhnrt3fDUNxXXfl5z3iIrfx+IqHh3SxA0xoUcFM6O+Wi4O++voI/CQm4+URbett3PW5Et+GGlKJS9snkUcIFIn8wWNZw1lvvICXM7VxGyQxg4xf/tcLGDrIjg= 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=UlSP/4XY; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=U71+b/f5; 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="UlSP/4XY"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="U71+b/f5" Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 61284Ssu454603 for ; Mon, 2 Feb 2026 10:56:42 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= 7w2p63ZPTwKUNcs0zkPpFjjBdO4n5Is3TFmtV2iGM3w=; b=UlSP/4XYPoQ9fx5v 0AvNG533wA+WA3Ye78zPpERxE0ShGNyad7qnrA/W0pFr5MEUVzvMsoitzhRfbL27 NcpUEq7sczlohdSbVIfOLo1qWNtbz5egH+csgU+5kRBNmEmOX30WMvsdhxIgHCwC 9JvEP5U6edT2Erure7Jlcjcri1knST/85JNU565yFeaONVSY0rOcYHbkqUD4kEKh n4bhfwFO8/42oC0zhn47geVyi/kAn6Fo2HQyaiD6bqQ0exR7EILFEE13JRjxp3FN g8y0uro5E7Vua7cEO4epR5jahs99y3TqNeeG5s7oPDNGjs0BOq1sCENFDD2SedGT 0Jbclw== Received: from mail-pl1-f200.google.com (mail-pl1-f200.google.com [209.85.214.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4c1ared37u-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 02 Feb 2026 10:56:41 +0000 (GMT) Received: by mail-pl1-f200.google.com with SMTP id d9443c01a7336-2a0e952f153so129329585ad.0 for ; Mon, 02 Feb 2026 02:56:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1770029801; x=1770634601; darn=vger.kernel.org; h=content-transfer-encoding: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; bh=7w2p63ZPTwKUNcs0zkPpFjjBdO4n5Is3TFmtV2iGM3w=; b=U71+b/f589sFQeECUjyknHKaHe7FbkfFZJLq3FbCLMxpKxPi7ojkwfcLGcc05x0uXp DHwvIKARmuKUwTkM8RfQwxXvkzLSIyM6aBVM0Qkp2c2GOs62rWTGh0CTM4wRZkdUu8j7 Sm44DXXBZoPzjucqH84hvKSwX99YP6TpEA34Eb7w5tswlZXnEJVAGPhJT4pqr8s45naw ixw4usjwLG413AHACO5aB4dOT0ByGpuTrGRNvQE5ZS7RQFVJT/EDJnTz8z5z3qQeO28K FRBhRrZf0SKZguyJtpzNGftG127kheZ3VmLlEhD+hikonamczAxPJFZRQjAidmD4m2zf JhEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770029801; x=1770634601; h=content-transfer-encoding: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; bh=7w2p63ZPTwKUNcs0zkPpFjjBdO4n5Is3TFmtV2iGM3w=; b=RkMhGCjKeoEx917yrwgxMZJb1mSHybgo8QgY8sYnXGahJxCavLVLiCBLHZrOiVQ8wY U0JTtEAlnx+jDbDYcn1OKfdr1gi4oEFZx12nYtNiUy4ZXgDoXGlhpYB+iPHcTnGE/GKP boWgIoy5xvMq2BgfbAYfp75qaGqVYLk1PVOLfcQDvwvKF/PLWoz3Tb0m+6gyzGLGpkWW rwFhjl1StRPI8xIoCVmzD5WJNs1I6xotxEIRK2xSvz96hTBy3G6DQy+vfIlRWpRLBN1M 0PsUZtAFcxExtvwp3GGCraB1hkcamyAxMFknIlEu/5W5/ChpRGUZW85EpjlWFbObFiA/ DRIQ== X-Forwarded-Encrypted: i=1; AJvYcCVMzarCSz7hg6k2rEaXJboLTeUYEFo6gfp+WzswtWyv02W48L/nCfkDmRhw0IVN+th+f3FmoNQWeTq5/sc=@vger.kernel.org X-Gm-Message-State: AOJu0YyWqkS6LX6ky26coJGvAiUsxJ71CjsTFYE1Bbfvmb+CROqzbMer Zsh7zypTIM4KTpzsoinxWm2h0MmL9TxSEmrPdgWK1Hb+U7H1FWinaLMDwTISc06LuXJzpAQZrp4 boea9+8j/Ew5H6R2DCwHOnUM47zvroyfDG8fRIZzdAW0stNgknKVjFp+5s6aAYoFsb3M= X-Gm-Gg: AZuq6aIamGWMgGFtG4kkW5NoJ1RiNqC9HC2Og769Myh9XoCb/Xf8pxoW7OlClfREjgy GCMC6ypy9wCsZdjqJ3gA0XeUABKyieGVcdIuCJFupv4cY3mIFLfHhJeDOM22VB56oCPr9/t/jIf cueQ2AAsCjx+WdEu+GZhUTtd5pUcMs/X963Yg6+/dzWNzvRe493Cu49SECPStVvFKXr/vDgFvnh 6IwdDqxV/9cRN+aBQHZJkjcTJFHYXkyM+sE2wV9waiSY3rqy4sGtXfagq+h6aP21ANeQoTzfGBd Ag/n7Akdr2CkQkaXeKmnqsDxBzt17TFqOedpSkY9JeW0zVq6fGf8odmq2jQEc9TBsh1dXXYGJyX 8KSU+9OQdEx6sBHE/eiPyqO5hmxZ6RU3o4pcDqHo9WFRo X-Received: by 2002:a17:902:f78f:b0:2a9:410:2400 with SMTP id d9443c01a7336-2a90410270amr48497905ad.28.1770029801018; Mon, 02 Feb 2026 02:56:41 -0800 (PST) X-Received: by 2002:a17:902:f78f:b0:2a9:410:2400 with SMTP id d9443c01a7336-2a90410270amr48497625ad.28.1770029800618; Mon, 02 Feb 2026 02:56:40 -0800 (PST) Received: from [10.219.57.109] ([202.46.23.19]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2a88b41390bsm141408555ad.23.2026.02.02.02.56.33 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 02 Feb 2026 02:56:40 -0800 (PST) Message-ID: <10ea031e-b803-4a4d-a0fb-c18a34b37e47@oss.qualcomm.com> Date: Mon, 2 Feb 2026 16:26:32 +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 3/7] of/iommu: add multi-map support To: Robin Murphy , Dmitry Baryshkov , Vikash Garodia Cc: Dikshita Agarwal , Abhinav Kumar , Bryan O'Donoghue , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Saravana Kannan , Joerg Roedel , Will Deacon , Stefan Schmidt , Hans Verkuil , Krzysztof Kozlowski , Vishnu Reddy , Hans Verkuil , linux-arm-msm@vger.kernel.org, linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, iommu@lists.linux.dev, Bryan O'Donoghue , Charan Teja Kalla References: <20260126-kaanapali-iris-v1-0-e2646246bfc1@oss.qualcomm.com> <20260126-kaanapali-iris-v1-3-e2646246bfc1@oss.qualcomm.com> <78ffd1ce-5408-4bf5-a782-0c4ca14017b1@arm.com> Content-Language: en-US From: Vijayanand Jitta In-Reply-To: <78ffd1ce-5408-4bf5-a782-0c4ca14017b1@arm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Authority-Analysis: v=2.4 cv=NNfYOk6g c=1 sm=1 tr=0 ts=698082e9 cx=c_pps a=IZJwPbhc+fLeJZngyXXI0A==:117 a=j4ogTh8yFefVWWEFDRgCtg==:17 a=IkcTkHD0fZMA:10 a=HzLeVaNsDn8A:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=VwQbUJbxAAAA:8 a=EUspDBNiAAAA:8 a=dOfmg-3FkkVntAroJ4EA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=uG9DUKGECoFWVXl0Dc02:22 X-Proofpoint-GUID: hTqzM0N6CwjYJrwhEidE0IwNcSq97gLj X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMjAyMDA4OCBTYWx0ZWRfXwwTaIEOAuIVa +assTIKcI+pw3QaiOnyTSLkT7DARwI6XfzecDvZdxSBW8uG3AGkjz9ILsSIcYU4LZof6EzkNaVg 4WeeDHg9BkBIKe7BbgHM6vxeDMX0O7pkLeZMVpsQ3aUQ0+f4tAdfN4emWWooXOWfqFsTsrageld 0XBJvPZgNMBA1Qr7ZE7Po3OKnA3/q5jdSPo7diZFoQTC7S+94wjit2i38BsTRf6IlFEpr58cXMU d4HlrMqWeqYFHzfKoOBTvDhjloj7ckgdfRowoskyMSbqv3C+FXYBVz84+l0hsHxk/aM8ESg4kzU ixrO/v8GRFG85yxejAjF1EnCI9skNFiatm6+jSMPwWpbaTa+0I4A9NKHys5ZDzBJgUtytgn3NY0 1AKP4p0x9FhmoSw3gmiCa7W+5BZm2qb/bA5ps2un/B9eKZ0UYPCZ3vSccvYhmjvL4Ua4nZQALiP EtnYM1mdp9zY+BWDzbQ== X-Proofpoint-ORIG-GUID: hTqzM0N6CwjYJrwhEidE0IwNcSq97gLj X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-02-02_03,2026-01-30_04,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 lowpriorityscore=0 adultscore=0 priorityscore=1501 clxscore=1015 suspectscore=0 spamscore=0 phishscore=0 bulkscore=0 malwarescore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2601150000 definitions=main-2602020088 On 1/27/2026 7:50 PM, Robin Murphy wrote: > On 2026-01-27 11:45 am, Dmitry Baryshkov wrote: >> On Mon, Jan 26, 2026 at 05:55:46PM +0530, Vikash Garodia wrote: >>> From: Charan Teja Kalla >>> >>> When multiple mappings are present for an input id, linux matches just >>> the first one. There is a usecase[1] where all the mappings are to be >>> maintained in parallel for an iommu-map entry of a same input id. >> >> This contradicts the IOMMU idealogy (at least as far as I understood it >> fom the maintainers): the device (driver) doesn't control which IOMMUs >> are getting used. Instead _all_ defined entries should get used. For >> iommu-map it means that if the map defines several entries for a single >> function, then all entries should always get mapped. > > Indeed there is no concept of "multi-map" - if a single input ID represents more than one thing then that notion of "input ID" is fundamentally wrong. A single *device* may have multiple IDs, as in the case of PCI bridge aliasing, but in that case there are multiple things to map. > vpu hardware do have video decode and encode usecases that would generate multiple Stream ID's. So, all these Stream ID's would need to be represented using single input id as mentioned in dt binding. Referring patch [1/7] in this series iommu-map = <0x100 &apps_smmu 0x1940 0x0 0x1>, <0x100 &apps_smmu 0x1a20 0x0 0x1>, <0x100 &apps_smmu 0x1944 0x0 0x1>; Here, IRIS_CB_NON_SECURE_NON_PIXEL [1] is the input id. enum iris_iommu_map_function_id {   IRIS_CB_NON_SECURE_NON_PIXEL  = 0x100, [1] https://lore.kernel.org/all/20260126-kaanapali-iris-v1-5-e2646246bfc1@oss.qualcomm.com/ Thanks, Vijay > Thanks, > Robin.