From patchwork Wed Nov 1 07:11:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gaurav Kohli X-Patchwork-Id: 13442567 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8D637C4332F for ; Wed, 1 Nov 2023 07:12:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:CC :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=IMH99uriMQxdQKzx6ZrRoPkY30NDqQYJl38mqGoVXXE=; b=QRfeuhSwpixNbG rN2J8GmvMTxbDf0lj55Iy8GCMHJKig6mG95FCBeJ00pnr1OKNhn/b26q4pDuZe8LHQD+sZCkMQAms uSzJJi04DAEqL7VhSnfpTOauSGKtxNcdX3zFTh3jdfD8STo3lTyT/Pl3/Gl7uElDzXwFGDNL5hQS0 eI6ytm/fVtViw2N58CP+qyYtqct47/NeNgg7ufDhE345f9wKV86WqAJdDWB8PV8d2ggdKIdDEnTgT J3UVePyuqO2W4Yq/nWJjCUiuiitLyMG+A5j85s52wv/dAZq4fxPNg5uyExMW+woMYMJ9gJwRsA2XL 6isFXrOmwXvDzUR3f79Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qy5Oh-006nGH-2j; Wed, 01 Nov 2023 07:12:15 +0000 Received: from mx0a-0031df01.pphosted.com ([205.220.168.131]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qy5Ob-006nFU-3D for linux-arm-kernel@lists.infradead.org; Wed, 01 Nov 2023 07:12:13 +0000 Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A15ajHL030431; Wed, 1 Nov 2023 07:12:00 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : mime-version : content-type; s=qcppdkim1; bh=GmF2UW/uh2FonkvFNEGvXHnhUgmtV8BI/HPj8Y9TIAY=; b=UwXzte1iIpW+I+00nDrpJKpq5vkPIEvnEZxsmic0vAad1SpA4mNfgAAjQoIsflMT+wu2 a3gP63ejka09DRDWSwrv0hXBoi9ifCvg0XONMf8/DyzEr22up7tzanEdPWzIRmzCuJrL uHiah2sGSaT1QTfDTKhrxNXRcw19vIievsSWnMmtQAHRMp85PDRxXZzpvn908oHnT6F5 0niyIivdsoWx6IbQWLixwzXew7027nEzqNmjAWrDcopOor/h/D/wn658yg3GWzbDU3HQ mY9b7+y7D26COtZtidgsYj5jCUDjSOvywhY1OQzYvc9eZwiX0plwrsuz2To8+1N/w79U +Q== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3u3382jfry-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 01 Nov 2023 07:12:00 +0000 Received: from nalasex01c.na.qualcomm.com (nalasex01c.na.qualcomm.com [10.47.97.35]) by NALASPPMTA03.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 3A17BxQP013210 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 1 Nov 2023 07:11:59 GMT Received: from hu-gkohli-hyd.qualcomm.com (10.80.80.8) by nalasex01c.na.qualcomm.com (10.47.97.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.39; Wed, 1 Nov 2023 00:11:56 -0700 From: Gaurav Kohli To: , , , , , , CC: , , "Gaurav Kohli" Subject: [RFC 0/1] Add custom alloc and free pgtable callback Date: Wed, 1 Nov 2023 12:41:43 +0530 Message-ID: <20231101071144.16309-1-quic_gkohli@quicinc.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01c.na.qualcomm.com (10.47.97.35) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: Z-j-vbT05H8hjLiMv0Hju3EaONetCO95 X-Proofpoint-ORIG-GUID: Z-j-vbT05H8hjLiMv0Hju3EaONetCO95 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_04,2023-10-31_03,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 phishscore=0 lowpriorityscore=0 bulkscore=0 suspectscore=0 spamscore=0 impostorscore=0 malwarescore=0 mlxscore=0 adultscore=0 clxscore=1011 mlxlogscore=409 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2310240000 definitions=main-2311010059 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231101_001210_042312_B3F7F1B7 X-CRM114-Status: GOOD ( 14.98 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Linux kernel does not support customizable page table support, Below series from Boris is helping to solve this problem by introducing custome alloc and free ops: https://lore.kernel.org/all/20230809121744.2341454-1-boris.brezillon@collabora.com/ For cases, where HLOS has to setup s1 pgtable and request firmware to share the same to different entity(VMID), there is no easy way to achieve the same. This patchset over Boris patches is an attempt to solve the same problem where HLOS can do below things with help of custom alloc and free pgtable ops: -> Parse VMID from vendor implementation driver. -> Provide custom and free pg table ops, which help to create pages for page table from custom ops. -> And HLOS can also create S1 page table from custom ops and request firmware to share the same to headless VM or different entity(VMID). Gaurav Kohli (1): arm-smmu: Add iommu support to share pgtable drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 81 ++++++++++++++++++++++ drivers/iommu/arm/arm-smmu/arm-smmu.h | 8 +++ 2 files changed, 89 insertions(+)