From patchwork Thu Aug 22 15:10:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joey Gouly X-Patchwork-Id: 13773672 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 6B637C5321D for ; Thu, 22 Aug 2024 15:11:38 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id F3DAA6B0156; Thu, 22 Aug 2024 11:11:37 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id EEB1680032; Thu, 22 Aug 2024 11:11:37 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id CF0AB8001E; Thu, 22 Aug 2024 11:11:37 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id AB0D56B0156 for ; Thu, 22 Aug 2024 11:11:37 -0400 (EDT) Received: from smtpin10.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 1F7EFC178D for ; Thu, 22 Aug 2024 15:11:37 +0000 (UTC) X-FDA: 82480220634.10.633DC19 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by imf17.hostedemail.com (Postfix) with ESMTP id F007C40009 for ; Thu, 22 Aug 2024 15:11:33 +0000 (UTC) Authentication-Results: imf17.hostedemail.com; dkim=none; spf=pass (imf17.hostedemail.com: domain of joey.gouly@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=joey.gouly@arm.com; dmarc=pass (policy=none) header.from=arm.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1724339412; 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-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=g7IaXVZdBs5xv39RK9QztWdWeQqbVpdYum+vkYswvwk=; b=LHOzmH0L3MBNuM1RKIGWhsJTGHBgZjTLixs4I7R74bmW6UzVNEcx5Pru7RlBBnwPob7y8o rg5B4pRmE8oD68DKkidmOTuGfMuIMKIZfin3tcOaRR1sm9eM2sKHprJFJCenQe0eofYm+T De+V0r9PSAR7w6+Pjt+EbmDihqGFQJY= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1724339412; a=rsa-sha256; cv=none; b=JLXK1oQKjMAi6pTiQ73AGLd9EOSv7EFzGeI8DlNraWOAhOW2td1UQSJZXYXz0Pip05UYAU ngDLBrTbnSl9ENUE6PuvTRkZ4IvEBZlWvYpdOdu4qyHPmTA0XPnx4AS2xrGa9Yy76UV86h UC4Rz8yqCu633m1FsbsTjxiZdURl6sU= ARC-Authentication-Results: i=1; imf17.hostedemail.com; dkim=none; spf=pass (imf17.hostedemail.com: domain of joey.gouly@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=joey.gouly@arm.com; dmarc=pass (policy=none) header.from=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 037931576; Thu, 22 Aug 2024 08:11:59 -0700 (PDT) Received: from e124191.cambridge.arm.com (e124191.cambridge.arm.com [10.1.197.45]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id D92D73F58B; Thu, 22 Aug 2024 08:11:28 -0700 (PDT) From: Joey Gouly To: linux-arm-kernel@lists.infradead.org Cc: nd@arm.com, akpm@linux-foundation.org, aneesh.kumar@kernel.org, aneesh.kumar@linux.ibm.com, anshuman.khandual@arm.com, bp@alien8.de, broonie@kernel.org, catalin.marinas@arm.com, christophe.leroy@csgroup.eu, dave.hansen@linux.intel.com, hpa@zytor.com, joey.gouly@arm.com, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linuxppc-dev@lists.ozlabs.org, maz@kernel.org, mingo@redhat.com, mpe@ellerman.id.au, naveen.n.rao@linux.ibm.com, npiggin@gmail.com, oliver.upton@linux.dev, shuah@kernel.org, skhan@linuxfoundation.org, szabolcs.nagy@arm.com, tglx@linutronix.de, will@kernel.org, x86@kernel.org, kvmarm@lists.linux.dev, linux-kselftest@vger.kernel.org Subject: [PATCH v5 02/30] x86/mm: add ARCH_PKEY_BITS to Kconfig Date: Thu, 22 Aug 2024 16:10:45 +0100 Message-Id: <20240822151113.1479789-3-joey.gouly@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240822151113.1479789-1-joey.gouly@arm.com> References: <20240822151113.1479789-1-joey.gouly@arm.com> MIME-Version: 1.0 X-Stat-Signature: 4m5e3ts7k3kkkcqe19y6gn8ux8m5xr88 X-Rspamd-Queue-Id: F007C40009 X-Rspam-User: X-Rspamd-Server: rspam08 X-HE-Tag: 1724339493-175717 X-HE-Meta: U2FsdGVkX18hbjSNQ1IIsXljTWQKskXauAmIQ1NzavPZizVne9MEKG4wmjs5fvHT+lflgkqjXw7XBKSfuMmtJz5e6eMBngevYWq2vuhCVOct+KXsGjKEzxyzmjJRf3VAKQaUA290EmnlYERKPXJaa7q2jgW7ZnWotTR/pYWtiz9jLjg0WO3UBWCJYadZIVYck4gcWC9tvnpb0xNSJdeovpePGuY8KBLmbL/bOnaiKUqP/dAC5ZIs/KZxSi2PzPg8Cdb1GiW+sWtYsoYVz+jBZlVFIoz42UqnaZBKJsQL/6Ez5DuvxFRRYuytshvM1sc3qCl3c23mODsFelmJ5HcDTH7wz+yBOnSQ9jCFZjBL7kEzqbCazRrqMYgsP3REmny53FcfTxHo81rvHsXghVOHXraOMfpYo4Bax0xhPEIYGBojTDu4Od1FsQmX2kmsf9tgH/sKd3fCfX32A+UH2V7MIhnPZHmFN8XjYOWJJCXj9XcsbjnOyKnusqaB40zbZVVMN0t2LK0IA1Uf7V7kLv9/jdJUdTW0mg+NmvqYP7/4LuNyL1tftOTJp1MT4V7V0OuI/nEka/iPQ03jbVx4vQtCejg1LsKF+fCgZCQgszgW3nULJ9CzVKbnHNkO6br4/NKPA2MFvsz7CJs9vptl99WzR1uMWm5C47ndN4+GnsFCfkyQQP8jM3csIWGYElRy/BtLCfYzaRM3603W6dyKZg0As1UrM59e33tO+CT8BoIqTJ+eEa+XICcdyac6nyKkQ8pnLA49YE7MT3j9y1x2pLjzsQUVhQaobLzsd5bLJKd5AS7C3hBI4iNNTxixevWYXZZB7cZ1Ds/5/H+mYHO4BCqXHYP27Sn2YGKNE/Be1kVPxbRKDhT7O6ScKTJ6aIWoBWzcQ8xQs3k8MKJZki4qik15ZABY2c0IAUfCY/UD0mdrRd+iW8dhd8pzpQdygblCHOpq0zisopCvJlEZi03QxLT cK4qemDX OQ8i6imklCDypMBKQl8NL+dnkQB02QmZNd0pOCPwVfP2CYBbAWryCqzH+INi5MJPoX7cUi4rXaFckmSchkTVzacgSN61xcA/pbctNI4cCuSR2t8vnwVfTtbu6kyKSpVR65DzRbJB1sMXv29kds6WhuMXFdfXHHgGj6EvijIoOih4BlK0gTs9zeOJDEMNezOt+5OT42u/ThtjPKJE8pgk+cBX5OvVa4BUBseHEI5wcip5ifQaXfs2DpGkk3vIBJ05hrOHr70YemYhbnQ9tJS1ACdvc3b65r+P/QfLPJjYBcnwLVDpZY1IlZ89EWgy5yuqhLPgqI43HFaIBddXciWei5wN+Aty8P/reo1m3AkMK8j/8E/FYu2IX/xbBAw== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: The new config option specifies how many bits are in each PKEY. Signed-off-by: Joey Gouly Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: Dave Hansen Cc: H. Peter Anvin Cc: x86@kernel.org Acked-by: Dave Hansen --- arch/x86/Kconfig | 4 ++++ 1 file changed, 4 insertions(+) diff --git arch/x86/Kconfig arch/x86/Kconfig index 007bab9f2a0e..683c0a64efe2 100644 --- arch/x86/Kconfig +++ arch/x86/Kconfig @@ -1889,6 +1889,10 @@ config X86_INTEL_MEMORY_PROTECTION_KEYS If unsure, say y. +config ARCH_PKEY_BITS + int + default 4 + choice prompt "TSX enable mode" depends on CPU_SUP_INTEL