Received: by 2002:a05:7412:f589:b0:e2:908c:2ebd with SMTP id eh9csp701517rdb; Tue, 31 Oct 2023 22:52:02 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHRWnZ7Z7vp3le8NooUO1wHA4M5vije+uSNVkaSDP/T7PdZ6OB6WtQ/4nxi6vEF5sVlOwdG X-Received: by 2002:a05:6358:6f82:b0:168:e636:aa2e with SMTP id s2-20020a0563586f8200b00168e636aa2emr11299415rwn.10.1698817922230; Tue, 31 Oct 2023 22:52:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698817922; cv=none; d=google.com; s=arc-20160816; b=Bdk4Y31h0Nt1hw3tWzRMXpnZ1Qfc2MuAaj6LT5y6OjSzw4nM3jtbouctJYrT5rnS+u lVaZ4apiUXeo58lq1xr91GDv3tk9llWIZEYwWxomRLO/31+4s1bGmDyoMo6ao0mZoOXA ZszRpeu+qTdtcCms+WbS2k/ATpq8z/jHuf4oyBeEvYU5JUl5midQ8TNg2WUYEl9SME4J MaUyw1BrV2GxWTTnbndRzPJO5ilS3TfafqUzUDI07JAPMdx725g7ogWalfJ6ZLouI2Qt MeLZQrXTtNoKbHRMD2UTIV4LOkGWV5FSzy9OOnpfPdPpDUYTj2+zTwfw6hM7Kdu8OVbf 6RpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=GfLm8bZeUAykuu82ydWVftHzqeTVKiAcmOTSLXWPDDg=; fh=4HSN2q4LMkbDBAC0xOOHzQ9uK735JZiIahi3zpvhKEQ=; b=OoBp+3e//ZKsZnQtwymDeqKVhz/LxCBO17S1YAGr1zCMvV5lMv4baQOorNtEdyTut1 WQF713D7I6yryLtMb3kIPCzrCIzqvAh/XmIOWsd+s4U7GoTg8GPgNVJSLAVkGNogDjLF F8vytqnaX/fZu0Zy2LWMSsrXnrW0XymkyvXV3SzIZN8TSaQgH0uwFuVEQA7J6y8IBg0r Tmgb1CGagF7WhPOrZzbSMotGRvrJwAFKg+J79GRk0E5r98THH1HryhJv128T2i7OrZwl RyNve6sOKhicDxxVv9usIXZlbGGSlRGqX4lIqTiDnUtu1QH3wziC4dNRuv/FcN4GCFjc BxBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=cRR3VSN3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id i186-20020a6387c3000000b005aa7d3730dfsi2223609pge.114.2023.10.31.22.52.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Oct 2023 22:52:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=cRR3VSN3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 8E6CC80FDDF3; Tue, 31 Oct 2023 22:51:54 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376753AbjKAFv3 (ORCPT + 99 others); Wed, 1 Nov 2023 01:51:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32874 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345148AbjKAFv2 (ORCPT ); Wed, 1 Nov 2023 01:51:28 -0400 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B8DA3DF; Tue, 31 Oct 2023 22:51:22 -0700 (PDT) Received: from pps.filterd (m0279873.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A15348n002105; Wed, 1 Nov 2023 05:50:57 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=qcppdkim1; bh=GfLm8bZeUAykuu82ydWVftHzqeTVKiAcmOTSLXWPDDg=; b=cRR3VSN38PGsxg2BMtm6tFVOgb21bCnZBy8xFHAjvxRtn0Q6TYG3Q9qBPrC5cTiK2G4s df6hXirXQVo5ucpBl77nfpGP5ZHFNezACSVaYsu8ogYu39KAN8DxIvPW0L8opzUq15eO NcdGFypTD3VdthAB1C+nNBUROSdI8E2IVQQvy8yfvKhj+iGzMibayBZXhChgxcDVUJwG iuJSr0IbzZYtnSePx3WPWNP/McWFODjyzjAfy78dDDWrfctxsRU1r6qXYl3UIBSYitA2 pCJWGCpbbdTZekZwcbT9LfSNqwr0jyKVaFcAIT5+Ru578xLdjqbwvHqvSNP0A+kkpPYi Pw== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3u3a5eh064-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 01 Nov 2023 05:50:57 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA04.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 3A15ouLW032477 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 1 Nov 2023 05:50:56 GMT Received: from [10.214.67.72] (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.39; Tue, 31 Oct 2023 22:50:49 -0700 Message-ID: Date: Wed, 1 Nov 2023 11:20:45 +0530 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 8/9] dt-bindings: reserved-memory: MediaTek: Add reserved memory for SVP Content-Language: en-US To: =?UTF-8?B?WW9uZyBXdSAo5ZC05YuHKQ==?= , "matthias.bgg@gmail.com" , "christian.koenig@amd.com" , "quic_vjitta@quicinc.com" , "robh+dt@kernel.org" , "sumit.semwal@linaro.org" CC: "linux-kernel@vger.kernel.org" , "linux-mediatek@lists.infradead.org" , "jstultz@google.com" , "linaro-mm-sig@lists.linaro.org" , "linux-media@vger.kernel.org" , "devicetree@vger.kernel.org" , =?UTF-8?B?SmlhbmppYW8gWmVuZyAo5pu+5YGl5aejKQ==?= , =?UTF-8?B?S3VvaG9uZyBXYW5nICjnjovlnIvptLsp?= , "conor+dt@kernel.org" , "Brian.Starkey@arm.com" , "benjamin.gaignard@collabora.com" , "tjmercier@google.com" , "krzysztof.kozlowski+dt@linaro.org" , "dri-devel@lists.freedesktop.org" , "linux-arm-kernel@lists.infradead.org" , "angelogioacchino.delregno@collabora.com" References: <20230911023038.30649-1-yong.wu@mediatek.com> <20230911023038.30649-9-yong.wu@mediatek.com> <2c3ad77806df3ef23cb69336f2049821529e337b.camel@mediatek.com> From: Jaskaran Singh In-Reply-To: <2c3ad77806df3ef23cb69336f2049821529e337b.camel@mediatek.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: mvhv334wkL28YRcs-bX1bkeddaiQ8P7B X-Proofpoint-ORIG-GUID: mvhv334wkL28YRcs-bX1bkeddaiQ8P7B X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-01_03,2023-10-31_03,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1011 priorityscore=1501 bulkscore=0 adultscore=0 spamscore=0 lowpriorityscore=0 malwarescore=0 phishscore=0 impostorscore=0 mlxscore=0 mlxlogscore=999 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2310240000 definitions=main-2311010050 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Tue, 31 Oct 2023 22:51:54 -0700 (PDT) On 10/20/2023 3:20 PM, Yong Wu (吴勇) wrote: > On Thu, 2023-10-19 at 10:16 +0530, Vijayanand Jitta wrote: >> >> Instead of having a vendor specific binding for cma area, How about >> retrieving >> > https://lore.kernel.org/lkml/1594948208-4739-1-git-send-email-hayashi.kunihiko@socionext.com/ >> ? >> dma_heap_add_cma can just associate cma region and create a heap. So, >> we can reuse cma heap >> code for allocation instead of replicating that code here. >> > > Thanks for the reference. I guess we can't use it. There are two > reasons: > > a) The secure heap driver is a pure software driver and we have no > device for it, therefore we cannot call dma_heap_add_cma. > Hi Yong, We're considering using struct cma as the function argument to dma_heap_add_cma() rather than struct device. Would this help resolve the problem of usage with dma_heap_add_cma()? > b) The CMA area here is dynamic for SVP. Normally this CMA can be used > in the kernel. In the SVP case we use cma_alloc to get it and pass the > entire CMA physical start address and size into TEE to protect the CMA > region. The original CMA heap cannot help with the TEE part. > Referring the conversation at https://lore.kernel.org/lkml/7a2995de23c24ef22c071c6976c02b97e9b50126.camel@mediatek.com/; since we're considering abstracting secure mem ops, would it make sense to use the default CMA heap ops (cma_heap_ops), allocate buffers from it and secure each allocated buffer? Thanks, Jaskaran. > Thanks. > >> Thanks, >> Vijay >> >> >>