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 D2C7F3D0C1C for ; Thu, 4 Jun 2026 06:39:08 +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=1780555150; cv=none; b=F+0ABZtlW+KGNWthexhRcI0nI3x/LLNbUPpsln5rltMYpo2PptvVafBgl3oQPW0WmoEtExX+V84VtfIC/coMvC20zdLuvXGQUCR0YpZmruvUHvmLo4m6d+Owf61snjZmqrlsSJ5Hw63pzSRBQbVO0PLgoSY6EU4qEdOCIwLgTi4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780555150; c=relaxed/simple; bh=RaeoiWH7Uun9nxt2b6Nvp78PFkfwJ25ykblxc3Xp0J4=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=FRrsGDWCgoB1dMGOSZoyvBtIzfxavfQhFu1J4Xb1f3y+IffUiYMCQ+0sG5FQ3t1mszgiYcuy1GBTiS/WsEHHSqQ5zGf6JHp2IwvC0wFYxeQlyFuxjzOya9qP0kr3evbXiUzw5v1WziQ4BbFm10tj+cVXdVpPqRmBNIXKZ909W7g= 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=NdVTgoO2; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=GEuNBgVt; 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="NdVTgoO2"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="GEuNBgVt" Received: from pps.filterd (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 65418fO0140423 for ; Thu, 4 Jun 2026 06:39:08 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= Vjgpy0mZThcuqyr29c0w8qcQHkkM1zFN58HHnPnYdxc=; b=NdVTgoO2lQY9HAMW bceRRxyiVHKXuuIpdj+fyBb/fnbGH7EvL5p+tnTo4lQHcZlTS54Ihr8vAUQ1+uRf 8gadpLf/GyGxNspTt8KzGglUCBBigBC7go+asz3V1L6n/dP3WjDkqvvRBASbaCmr nHO2ycIC00kzwQiTz1BRxsi83g9hfOJxm4F9MjWXgRgXjnQ4S67Cj+LImSj6O0Pp Xf0Fcdf8DXS/+CAoVkp0L7abxxxX6/BQc4fE5maquWwqQwkdEWslKutDWsM3a95w WyCNiMd0i2jCInd4NdBex/55UpoIhBoIefAvtyREsNSjMauUpBvwi9PyYGE3ATMl Z5/mrw== Received: from mail-qt1-f198.google.com (mail-qt1-f198.google.com [209.85.160.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4ejyen8y65-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Thu, 04 Jun 2026 06:39:07 +0000 (GMT) Received: by mail-qt1-f198.google.com with SMTP id d75a77b69052e-5178ae66ff3so4145731cf.1 for ; Wed, 03 Jun 2026 23:39:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1780555147; x=1781159947; 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=Vjgpy0mZThcuqyr29c0w8qcQHkkM1zFN58HHnPnYdxc=; b=GEuNBgVtA7wyV7QbfGBAWNjW/WLHcsp2GYgkIaXqokz3MNRGbsUpI+Gg1ZGhvvzmnU LwRlrL32nsdcybd8PNOHwUWWiP6IIrfUN9SMYZf7wfjPU/vVU1RDBq5lEcwYUmsrOIG9 79LY+4PtM06Jh2Z2SBX/UStDSL8QGhWQwVfbeA7YNoZiVcJQ4ERp2DqGpmfB44MFWmA3 17a95IqBtV8yHfz7mAzJm7QDNL/CaGpYdfaQgj+HYZkegySKkKrvOm0DGv5m2Or4NrgX Cxxd+LCdpjeis3mQjT5Esjl+drMu5x2eJsVFN+KzIjcW3iH1LhIhfbfgugXwo1NK+zbC wPFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780555147; x=1781159947; 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=Vjgpy0mZThcuqyr29c0w8qcQHkkM1zFN58HHnPnYdxc=; b=VJAnljg2zY9YnS4tBKqpJH07nP7rFL6igSKYZcA4C1Y5vNfMFJ0mvCIL+kAd83Ig30 yj69SAs/yKQdEumRBl0RZzeiLGJtNJiVsfl5ZBW/UhkFQgAHCebNXUM0ClvTq4WDoj69 pRGV1aCH95c3gMgMNVjzd5FiXhfme50xVnY2boJsgl+ffLpmWfCufe75M63XOKtp0sLE 1kRMeFMb9Ao3QcgjNawfJ9kzZqwui+GVXBI6KGfNzKkb1Wvt6IilkD/B/ccx/9Xd0aEb 9ojw9JUA+ygOTdOkw9xa1HoURujCgbMvbITxfydLKudqq5e600+WBoRiS6YxSsR2i7uz Eefg== X-Forwarded-Encrypted: i=1; AFNElJ/viULVN4AVyu0+zOWu/kVkcxJ5WwUp0dnBlXx65KJWaH/II5c8y78GekjsJtQ9EZNsEDZG2TyjC1G+G4M=@vger.kernel.org X-Gm-Message-State: AOJu0YwqQBvfvsL4t0rgXe0AgZv9Aj/IX94Z61Nslu+DP1nNAsKSXsw+ PhHDtHESQSTfqR3j55/JZH4Yd6BF7u2LMXBuShx89J8Q+Tb5Us6nkCREYC/mE/e9/3ad7Wo4E5b sJNUQBb6WOL3ssB8KycSNcEbiKELy/cjkEwwpJdSE+16TClPUEfTW3BbAyv494yuV9yY= X-Gm-Gg: Acq92OGFjkVD3NTbNPu0v1EWDxC/66ntVviX7Qp3sA1I1CyLOCh2P6K2z0pLykjRU1d bHWvNO9bAYyO0DQg1c/AUylBACCn4tuveVx9jnqX1CQZ8kXjGUM+0ABjfZFhrX5e1nCVS9GdGR4 xVEKzVy9UDFwnGopMl31KMcfbg/30IhLr0pJVkG6e3nXOEI+pEvL3jIEpBRZEzzoK/matUmSMxA GIxUKL3yYkFRlrQ6ZoQRxPKM7kSEse5IUEnKJZPLu0LWrOYLk90GOwFT8t/+9gwcz/btpMf1q5f I/qyzBBHzhvtooSuDdjIUHWgkElYXAzdIz5HJe8Wu+xvLBdoy46ay8o0xFw0+3pwiiji5vRdLK8 xnFoXpq1YoMDNw9qczz7dCMGxu/3r41qoJsGMbc5FlRePaOsBkebhI2WkZ4nBU0YHLvo= X-Received: by 2002:ac8:588a:0:b0:517:5afc:ff92 with SMTP id d75a77b69052e-51778748c75mr95741521cf.58.1780555146991; Wed, 03 Jun 2026 23:39:06 -0700 (PDT) X-Received: by 2002:ac8:588a:0:b0:517:5afc:ff92 with SMTP id d75a77b69052e-51778748c75mr95741251cf.58.1780555146520; Wed, 03 Jun 2026 23:39:06 -0700 (PDT) Received: from [192.168.0.172] ([49.205.249.168]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-bf0559f1f97sm273228266b.60.2026.06.03.23.38.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 03 Jun 2026 23:39:05 -0700 (PDT) Message-ID: Date: Thu, 4 Jun 2026 12:08:55 +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 2/2] arm64: dts: qcom: hamoa: Reserve low IOVA range for Iris To: Daniel J Blueman , Vikash Garodia Cc: Dikshita Agarwal , Abhinav Kumar , Bjorn Andersson , Konrad Dybcio , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley , linux-arm-msm@vger.kernel.org, linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org, Bryan O'Donoghue References: <20260601041336.9497-1-daniel@quora.org> <20260601041336.9497-2-daniel@quora.org> Content-Language: en-US From: Vikash Garodia In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Authority-Analysis: v=2.4 cv=JaSMa0KV c=1 sm=1 tr=0 ts=6a211d8b cx=c_pps a=mPf7EqFMSY9/WdsSgAYMbA==:117 a=QLLTW4K7kuvKcNWOCmVsWg==:17 a=IkcTkHD0fZMA:10 a=FelO9ux0wxsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=gowsoOTTUOVcmtlkKump:22 a=VwQbUJbxAAAA:8 a=EUspDBNiAAAA:8 a=NEAV23lmAAAA:8 a=BHWUBWSSduhnyAuw9wkA:9 a=QEXdDO2ut3YA:10 a=dawVfQjAaf238kedN5IG:22 X-Proofpoint-ORIG-GUID: b16rqzbFWTsqlKcOLMfn8wUSphbpaiPG X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjA0MDA2MiBTYWx0ZWRfX7j95Uf6i7FGa gOBC50IMJNAUvB4xwGsRaOfG0ufjtARq/GcK2vCknq9U92X9eeRoR1Pj+dHE3lBo5HKSLIA+tY9 2ZJTVA1mUMM76+zOOewTFSvQhc4BSuYFeBCmxmkXwMq4V/80EH/+lg7plksjmQYpEH016LL9YQC 6ggoLjM4Sgr34wHUxHYGWXWpDnwp0PxNTs5vDkYmlHjl0KVOSeOHhZS5VFc5opcIYgTkbejU+1k IhMHQzqWFje7oHVGmvwh1nMFLr5iEl4SrQJ1ho5zrSaP4D6kx6cVXDsTknh77xF6MWCiMMDYILX yImRi94tIaaIgTrJiHh+DLVRKvhbjxwCdIfv8xc4F86TEFt2y0krOxlFaPABoCjEtYVVkvAs/89 dKNEy3q0KHhEHfHu76AdyClnKPb4g9SGnKCPz1bcYcIzMCno16ttvga5cEFqTKgE4vpMxyzQKQp JloqpE92PSZ8B7Z3OQg== X-Proofpoint-GUID: b16rqzbFWTsqlKcOLMfn8wUSphbpaiPG X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.125,FMLib:17.12.100.49 definitions=2026-06-04_02,2026-05-28_03,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 phishscore=0 bulkscore=0 adultscore=0 lowpriorityscore=0 suspectscore=0 clxscore=1015 malwarescore=0 priorityscore=1501 impostorscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2605210000 definitions=main-2606040062 On 6/2/2026 9:05 PM, Daniel J Blueman wrote: > On Tue, 2 Jun 2026 at 18:27, Bryan O'Donoghue wrote: >> >> On 01/06/2026 05:13, Daniel J Blueman wrote: >>> On X1-family hamoa platforms, Iris DMA below IOVA 0x25800000 (600MB) >>> triggers unhandled SMMU page faults >> >> How do we know that is a correct address - does it come from qcom >> documentation or trial and error ? > > @Vikash, beyond your comment I linked in the patch [1] kindly cite a > source for the different stream-ID <600MB behaviour, and share > specifics, eg if silicon, firmware, or driver and constraint, defect > or otherwise, so I can include a definitive description. > > Also good to know if my workaround is good for long-term, or on the > other hand handling streams <600MB is important/useful. > Thanks Daniel for raising this patch. Did you also try the memory fix i mentioned in the bug [1] discussion ? Coming to 600MB, this have been the VPU hardware restriction all the while since venus days, and since address could not go deeper all the way lower than 600MB, the issue never popped up earlier. Consider the memory layout split as below (Iris device range is capped to 0xe0000000) |-----600MB-----|-----(0xe0000000 - 600MB)-----|----IO reg--| 0-600MB range, VPU hardware would reserve this to generate different stream-IDs primarily for internal (non-pixel) buffers. 0-600 --> VPU would generate *secure* stream ID for non-pixel buffers 601 - 0xe0000000 --> VPU would generate non-secure stream ID for non-pixel buffers. When many concurrent sessions were tried, non-pixel buffers were mapped into 0-600MB range, and VPU generated secure ID for those. Since those were not associated with the iommus configured for iris node, it led to USF (un-identified stream fault) and device would crash. Keeping the region reserved, makes the non-pixel buffer always in the non secure range (601-..) and avoids the crash. Downside of this design - It would eventually reserve 0-600MB un-map 'able for all buffer types, like pixel as well which do not have any such restriction. Forward looking design - create devices dynamically and set reserve regions for those specific device using the api [1], instead of applying one reserve for all. [1] https://lore.kernel.org/all/20260119054936.3350128-1-busanna.reddy@oss.qualcomm.com/ > Thanks, > Dan > > [1] https://github.com/qualcomm-linux/kernel-topics/issues/1157#issuecomment-4458933574 > > -- > Daniel J Blueman