From patchwork Mon Jun 24 22:12:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxwell Bland X-Patchwork-Id: 13710193 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2DF4DC2BD09 for ; Mon, 24 Jun 2024 22:12:34 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id AFB516B0131; Mon, 24 Jun 2024 18:12:33 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A7D646B013B; Mon, 24 Jun 2024 18:12:33 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8F5E76B012F; Mon, 24 Jun 2024 18:12:33 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 6ECD16B0129 for ; Mon, 24 Jun 2024 18:12:33 -0400 (EDT) Received: from smtpin25.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id E512740326 for ; Mon, 24 Jun 2024 22:12:32 +0000 (UTC) X-FDA: 82267182144.25.B5B9E03 Received: from mx0a-00823401.pphosted.com (mx0a-00823401.pphosted.com [148.163.148.104]) by imf14.hostedemail.com (Postfix) with ESMTP id EA691100005 for ; Mon, 24 Jun 2024 22:12:30 +0000 (UTC) Authentication-Results: imf14.hostedemail.com; dkim=pass header.d=motorola.com header.s=DKIM202306 header.b=NcOofN60; spf=pass (imf14.hostedemail.com: domain of mbland@motorola.com designates 148.163.148.104 as permitted sender) smtp.mailfrom=mbland@motorola.com; dmarc=pass (policy=none) header.from=motorola.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1719267132; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=beDAkvKYsDlCVLz13QLf8oAMscanV0EKlCxkUmhBfqk=; b=OKuJmCu19QmS9YI6UESfxUq4PfNJfI/LE6AXY3eVPXLriJHON0RPGaE/x9YpMdtjTHwL0+ ljm295ftyxN+RFi2f3uE4KgFx1jhbkrJTtN9XAYSpZVz+1y2RE75YGbeoOQkHnlTc/DJQK LHzRAduob1exk5ZW93zugLuO01cuzSQ= ARC-Authentication-Results: i=1; imf14.hostedemail.com; dkim=pass header.d=motorola.com header.s=DKIM202306 header.b=NcOofN60; spf=pass (imf14.hostedemail.com: domain of mbland@motorola.com designates 148.163.148.104 as permitted sender) smtp.mailfrom=mbland@motorola.com; dmarc=pass (policy=none) header.from=motorola.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1719267132; a=rsa-sha256; cv=none; b=ONgGVI1Qmh6R/v95AmkLRcusn6NcyhpLAiGH1lFR+jkt83ZipHuU2dZ8tansnv6+HyBlqq g5vfT6zkdYoWoAQr9LKY4EL/itpGj+T5oFyuOVlA+59pNFQgU6Zr2Asy/+Mcfd1T2m4khY pdWJGEEEXSwj0HCrZndo0RRaFVR5CLo= Received: from pps.filterd (m0355088.ppops.net [127.0.0.1]) by m0355088.ppops.net (8.18.1.2/8.18.1.2) with ESMTP id 45OExZPE016200; Mon, 24 Jun 2024 22:12:22 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=motorola.com; h= cc:content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to; s=DKIM202306; bh=beDAkvKYsDlCVLz13QLf8oA MscanV0EKlCxkUmhBfqk=; b=NcOofN60eggD0fDtyENxaoXl1pTKI3kjFo/BZUW rDhrNO3IKgdPV3JNqsMKA/eT8il00pVvW420+O6x/TG9VtWXABKDFqec5HrUJawW BRofFlq7rKojw1Bf5cC9oOdmA8PN2g3t3xbvl6Qd4h+an6DnZHbrqP1snVtWr2AM 3NZFYVAdR7b6avcv3eR6Y4XRE0nI36AhVqtk0tfNAeP4aGM8BhNnL601exSiy2Q7 gsFR+kE3N/kVz1fiRy4woTc1giQBXF+XaouC4Nfqj3KV9aJw2y2yowEExkvt9YnL QNqTKvR3RDyKQk86jB3DZG1Cb+06dCbiEWiuUIVOtdDuGkg== Received: from ilclpfpp01.lenovo.com ([144.188.128.67]) by m0355088.ppops.net (PPS) with ESMTPS id 3yxbstk762-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 24 Jun 2024 22:12:22 +0000 (GMT) Received: from va32lmmrp02.lenovo.com (va32lmmrp02.mot.com [10.62.176.191]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ilclpfpp01.lenovo.com (Postfix) with ESMTPS id 4W7Mdd4Wdszcxq9; Mon, 24 Jun 2024 22:12:21 +0000 (UTC) Received: from ilclasset02 (ilclasset02.mot.com [100.64.49.13]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: mbland) by va32lmmrp02.lenovo.com (Postfix) with ESMTPSA id 4W7Mdd16g3z2VbbV; Mon, 24 Jun 2024 22:12:21 +0000 (UTC) Date: Mon, 24 Jun 2024 17:12:19 -0500 From: Maxwell Bland To: linux-mm@kvack.org Cc: Catalin Marinas , Will Deacon , Jonathan Corbet , Andrew Morton , Ard Biesheuvel , Mark Rutland , Christophe Leroy , Maxwell Bland , Alexandre Ghiti , linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v5 2/6] arm64: add APTable encoding to pagetable defs Message-ID: References: <2bcb3htsjhepxdybpw2bwot2jnuezl3p5mnj5rhjwgitlsufe7@xzhkyntridw3> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <2bcb3htsjhepxdybpw2bwot2jnuezl3p5mnj5rhjwgitlsufe7@xzhkyntridw3> X-Proofpoint-ORIG-GUID: cBD7-o-fMElZ7gAEi_7CTo0KFY4fieW1 X-Proofpoint-GUID: cBD7-o-fMElZ7gAEi_7CTo0KFY4fieW1 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-06-24_19,2024-06-24_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 suspectscore=0 lowpriorityscore=0 spamscore=0 malwarescore=0 bulkscore=0 mlxscore=0 priorityscore=1501 adultscore=0 phishscore=0 clxscore=1015 mlxlogscore=715 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2406140001 definitions=main-2406240177 X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: EA691100005 X-Stat-Signature: n77dgdsdmmo9x46677e11t5gt4ot1s15 X-Rspam-User: X-HE-Tag: 1719267150-970309 X-HE-Meta: U2FsdGVkX1+Ehqp5fgmdnclc4oNn5WknzFRHN4uq9BzABAoY4G+h1zHBN24fT5mtt4EJZzpbqHUmFo+VBb3J5Lo7h1GwPbSfPse3wPZiLUBfxSmToHHRBd3PcZ5ZCCc2QaBxPvb7vKzA+JMptankDAQld0zERI+IWOuHTDl/8DPF2RvQjKZiirzCSOfNGpkOzW+wW6muq8nmXTyg8UoK1xYONNdz+0Ll2OaDtRItPBg2EffPeepfdvAJ9+r1DImT2bYXt5XeKaEAnICUPa3Wl0nZfzXfwunbUutIzPpCHxJq2xL61jzivBtKtsoi1mZ2TwdVX+c9KHT0dt6KkxTUENFxfbv8aAcT5z2+gTiKnRUa8nqn7UepbN8k00SpMrrZ9gSyip/PrxPwJr9hfpf6s4Riko/nrfEg5h7pna9EXuxReNBg74w85auMpUyHvaCGnMXDeF4FtXBhpP9USfZluyUdM5fLU5Pt7n07bug3r7169XBcTHwgjMKSnVObiXw48aBeBKlr3pB+rW8cX/RhqrdNtT1BdnQ35If+sgTxIYy/npm7NZoBATP6kP7sZ6YMw5Mvpz60Rz9MP0AdhVnI75owpfu5Jvt8O1hhZ2Dj4k3fuE1u7W7z8HobO7zXfE4tgSabE4NzwaU8vpFo+R4qJzpn3UlFCx6c5aetR9T0rui9KCZ2mOxVoh1WIUeVqv6UnCVxxQR7puIrgmMEUDhPcDvRfhixMPq+QTBjQ0Ilq8uCuVtdknhWb30DEwuHDN8R9hA6Xjq4/RGKbiDftZPRPyp9fVRRrFN04u9oeJ0wuGo8QGig4huKBDuQ1g6DAobrEya7VrTvVibVv0OW1ggJm8xB5UYdmog8Z2sQYg8Id09Rfbzxu9ODOEEYwYyHo4ISXPl0XxKFaKH9VK17ynDDMUqemxD/mwLtw2VMgUBEFTUCphLtArUAsG11LfNopzUMRpzuT8piZyDvvNOIHDT McfK+LFw 9S7zVP8UoKXsL8a5QeQXvdhTTQlf8LiVNVwA7ZGFWO4TB0iHbPH9v2gWLd8MK0NUERBoi667R05LW7rzJdMA4V8ZWw9iNqVzkuQLmDvFEB4BAszw+hkNQo4BBvUlkZEP4OWFDxX77g4seUR8lOLP8YHz5oIdpKTupwWo/xqw539wVWni9UuSPsYh+4X6XdJBF7MD6s5kJflO93Ex4k3XVJtk5x/3yv1T+RPmWh+nvhl6O6AYAOx6UuS2V+Cpzgg/pRPxjRStl4gM3a2VYXA2lpFtbpEQR+H4hiSljStDHdfPblNVVnZ67IEF5scdU1/+t6FNQ X-Bogosity: Ham, tests=bogofilter, spamicity=0.000150, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Add in the APTable permission bit encoding to describe table-level hierarchical access control Signed-off-by: Maxwell Bland --- arch/arm64/include/asm/pgtable-hwdef.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/arm64/include/asm/pgtable-hwdef.h b/arch/arm64/include/asm/pgtable-hwdef.h index 9943ff0af4c9..8c229fc96c0a 100644 --- a/arch/arm64/include/asm/pgtable-hwdef.h +++ b/arch/arm64/include/asm/pgtable-hwdef.h @@ -146,6 +146,11 @@ #define PMD_SECT_UXN (_AT(pmdval_t, 1) << 54) #define PMD_TABLE_PXN (_AT(pmdval_t, 1) << 59) #define PMD_TABLE_UXN (_AT(pmdval_t, 1) << 60) +/* + * APTable[1:0] encoding for hierarchical data access control + */ +#define PMD_TABLE_KERN (_AT(pmdval_t, 1) << 61) +#define PMD_TABLE_PRDONLY (_AT(pmdval_t, 1) << 62) /* * AttrIndx[2:0] encoding (mapping attributes defined in the MAIR* registers).