From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 871FE37E307; Mon, 8 Jun 2026 13:37:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780925825; cv=none; b=N78Q6UQzz/e7AO6rCZQQ0yg5+mcBJElHXcuasyHPUpQ3tr5UuqIdywjGgz1wqOt/IfclI/G4Jpm+wPTLydjS4qqT2/nCTQ9J0mAPBswt+iwmGp2Dh5tFUBIMqRvxYN33AwnDcBZ4SjgtlNJNO0gsXE5cpddMkXs+bfV9U+b+o/g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780925825; c=relaxed/simple; bh=OwWZldgchKpfQIrkoEJ1NJdZJ6yuQ1u78a4A13vOJao=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=Jy0CfhmCqnutICWIvlIeet7vTwKtmoygQUp2I0OfYPHCx/2oFf9SGFDq0u6y3XoIzAMzS0GWD5tZzmj5/xAW4crOYhrqQ5fsK61QNerg8QgKmcvSICjMGgLfurhNNrIgGZEeJOilEAXmdt92cr2EjM/CAtu0Kq5dKe8qz6r/mUY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=jkERIq1h; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="jkERIq1h" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E1F7A1F00893; Mon, 8 Jun 2026 13:37:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1780925824; bh=1Mows+I872SEh0a9XzmTyu1MHCk971rRiVDktwmEk+o=; h=Date:Subject:To:Cc:References:From:In-Reply-To; b=jkERIq1hy6TzNRQA41iskiHcvCnAcgDkFIJg+qm+MTxm7HPsxqzT715+dgA9g8Kex S2OL8zb0WiH21v/AoAkXTkfCj4q8BZ3azETvubnVh52Rb0Hvt+OFCLgDndzXyWwI83 fXtcjllgWXLTI5mUgVL0F2UQMrXFmFUEzfJ2FgxruIvnas+6UQIJusO6NyXMiu4Oab IdTGno2Am/OwN0PmNQK7Ikg7zdJEeQZ2WeLPQD0jtz+mxbNqZPbU0D6eicYiX9pvkv n8wHqgXeq64Llj8R+OZPmYPJvsxbBB2wYM23cbjeLDlVxCS+dHe2iSCWrf/Khd9bfq pX+Umsk2+2GSQ== Message-ID: <93ea251e-3908-4b8b-a2af-7c6f44210277@kernel.org> Date: Mon, 8 Jun 2026 14:36:59 +0100 Precedence: bulk X-Mailing-List: linux-media@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: Val Packett , Vikash Garodia , 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, Xilin Wu References: <20260601041336.9497-1-daniel@quora.org> <20260601041336.9497-2-daniel@quora.org> From: Bryan O'Donoghue Content-Language: en-US Autocrypt: addr=bod@kernel.org; keydata= xsFNBGRJNSgBEADD7Vm2ZFa+v+JGJ2QYTJqQAkqis/uOHkhdFNXqpBarVBd47QU/DMNU5Rxg jedMQEmHo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WLEC NUV5Tdt5EkkAEQEAAcLBdgQYAQoAIBYhBOaT+yqro23hF6tvtCJxO7Ohjcg6BQJkSTUoAhsM AAoJECJxO7Ohjcg6LuIQALnXt36OUuK43wqw6UYt0cnN6EbUqJHApAF5eNFn0jCCB2XELjSz JKJwuNAweowBdabiBniJ+501WIW+ewEsz1uby5fUQjZuCEsIkuaIluyfUFPb73qrQyAGuusd 7teA4WT+/jUku9g7lX5sVoRCrKQPkd16f6Bzfztyqyjcn43/X5yQI+wlboQ6HuKe/3I3yiOx OgmCHzOawpC9PvhEcKj79RLM3Zz5Ts5AuHpRX70Jz8Be76LwVFLp5Msx3S24ZTU1lBo2uiJ3 xSkay2lTpyVWRPx9vgcwzxGguOPJQJwsQeLb7wpoJMPpD3ERoaRii7Q7hvmxklpZjhKYWB3d t6nQ497Ek9loCrp3MIjRCSDN5xEGffiHks9yTeGMUQwO4tX8RE04uOJPkUY7uCFzFqN6/qey X3oFfPgkULMdiHofPAL1OskZSTzGPSfTYRE46NCJw8yoZBQ/oOyWeqaUQbK0wmW/g81wm8p7 LKSGEglMpiX07M1AotgvylN5C8fjbouoK+/RAMsXkk8jba6rPfuuXPaDjCyyKn6zSVHETnHW 3AJbgVY50T8STpnxayBQvWbCvu+6NOEjXCbyaOJig+5l0zlGN9XHjdANXC5HnwmyaGRL9YDq Jh2nVXVJDincOdQRdKcJjYLqaOAoWrYWSDi1iZGspHBTDrnOvfMQzzHY In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 08/06/2026 04:48, Val Packett wrote: > > On 6/4/26 3:38 AM, Vikash Garodia wrote: >> >> >> 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. > > Umm.. is anything *actually* preventing us from adding the "secure" SID > to the iommu node? Yes. If the firmware has already provisioned SMMU entries for TZ SIDs then we would be adding duplicates from Linux, if not then we are claiming TZ SIDs which we can't actually access if we use them => those entries would need to be given out to a TZ driver/application of some sort which we don't have/support now/yet. > I just saw a patch for sc8280xp that did just add an "extra" SID for iris: > > https://github.com/strongtz/linux-radxa-qcom/commit/e92850f792498c3a72d72d667503a29bf6bb0a31 > > and I'm wondering if that's about the same exact issue.. (Adding sophon@ > to Cc: here) > >> 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/ > > > > ~val > >