From patchwork Fri May 3 13:01:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joey Gouly X-Patchwork-Id: 13652781 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 C63B4C25B5C for ; Fri, 3 May 2024 13:02:07 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5D6AD6B0093; Fri, 3 May 2024 09:02:07 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5894A6B0096; Fri, 3 May 2024 09:02:07 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 44EB66B0098; Fri, 3 May 2024 09:02:07 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 2A8386B0093 for ; Fri, 3 May 2024 09:02:07 -0400 (EDT) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 0D364141106 for ; Fri, 3 May 2024 13:02:05 +0000 (UTC) X-FDA: 82077097410.19.7FC10F3 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by imf30.hostedemail.com (Postfix) with ESMTP id 0E99C8002F for ; Fri, 3 May 2024 13:02:02 +0000 (UTC) Authentication-Results: imf30.hostedemail.com; dkim=none; spf=pass (imf30.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=1714741323; 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=sZ4YkuCwNTOaWA/ypJULqxKYcOXcTXL0XcMF1LvyKEQ=; b=6mXwz6pi7A6lI+ns7MwlnULWyqKl+JKsj41mlGyg0LnQqlXOMGmk/qpqHTq/StNsXPsWLB SjwMCsYrc7ZCa4HN+q2IqI8Vm/qW91PUEYUDIqg8vJqrfXwrqkYTCfGMRv1/r16opJ3Du+ FJHcrvZzYCBZbftfULkt2Xgu82m2TKg= ARC-Authentication-Results: i=1; imf30.hostedemail.com; dkim=none; spf=pass (imf30.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-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1714741323; a=rsa-sha256; cv=none; b=jTpJiqLO8451GFilQLaXoHFzW4knyvL1+ooUUFzcU2tBrdnvU2pRbh9XSMJj3XxxImnvJm r/lky+NtOjmVQOEPFfuJzqZfSiIl3EyFA61CW+2PDhXQm3UZUt3zXNyHU6Nduii4Lt3yhs v3lS5RPAyOgwNNbwaC9kUeWPqixF8Gw= 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 777061596; Fri, 3 May 2024 06:02:27 -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 1A7ED3F73F; Fri, 3 May 2024 06:01:58 -0700 (PDT) From: Joey Gouly To: linux-arm-kernel@lists.infradead.org Cc: akpm@linux-foundation.org, aneesh.kumar@kernel.org, aneesh.kumar@linux.ibm.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, szabolcs.nagy@arm.com, tglx@linutronix.de, will@kernel.org, x86@kernel.org, kvmarm@lists.linux.dev Subject: [PATCH v4 02/29] x86/mm: add ARCH_PKEY_BITS to Kconfig Date: Fri, 3 May 2024 14:01:20 +0100 Message-Id: <20240503130147.1154804-3-joey.gouly@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240503130147.1154804-1-joey.gouly@arm.com> References: <20240503130147.1154804-1-joey.gouly@arm.com> MIME-Version: 1.0 X-Stat-Signature: abcmwi3tr5m11yjjmap5j868gmduaxy9 X-Rspam-User: X-Rspamd-Queue-Id: 0E99C8002F X-Rspamd-Server: rspam05 X-HE-Tag: 1714741322-367576 X-HE-Meta: U2FsdGVkX1+Yr7+qdNGjbBipMN//062DjhWGnGJdpduO1p2ieJHnct4zTUtlhf/Q1S33vDcoQGiCrkyjitOXrwSd3RTjVyRxoOgl+9/ee7nLGPBzlL/4cYwU2htZ2xD7DExKTg85FpUGkB1R1TlP+ImkHAHUXdMa7Z3NkeIuCaCmlg6JRjLGwtjJ2QHr38nBzOcvtn8STRu4KfwMRQediecFJ8cUEblbCzk8G6HEWaMyrXkJv2txa1W8Z04PCq+JTsWBiWz4rqn9h2t36LYYE2U+oxGbpDv1OBlgWF5LRL3COBows7Bq5nyTQuvLVT5WKWxyk/3x/0t+URHxZaq4OOjPJedQZJ0330FK2FSnU8NBd0UEdHEvUVpQff9QiehvGVYsBbhrErVBjSxqjv81SSLoqml1ne+Be6plNvFvm0eFoYLhUr8bjJgZGzhlrJFxFpTvsUeS1VvSHRwiz2vbgisxOmoz1+rB+pWTSlcEKMUYMrDDlNCV6tfZ1+xT4/fGMrA1RDUYsA1O7GevaxJAq9sTTnC1fFHaHjZSfchWwLGI7ojFDRYvrhqo7Q0YDyD859PL0jCEwsRjpxtZN+UKUCZkmxxhqUj47+YDmnooakFME8Jme0/3lsOLBERomH+a/xxCL4SBP8ldnYeT+EBuR/cmV+/ka1McBSjzC1385leBCBxofVWJttEP8POXCp+mDJdPeyIqih6DIEgj76OAygN7Q4o4OpTGWtcmNYXT4LZmdGENLjvztobCVWfcxj3ptmSkoqVPjvnCoSN2f/GmoL8Kwp9yjY/SuMVe0UbMds/wf/fKHV/qw912/LTMlPUnK/3pR9qCtIsxFqapoOsNft0jxkX+tW5zbls1V1/S1ByvQZ8OwhqqD5j/foQsvoadlKZkoT+/kVo3YUYEkeejgEpFqKN3tHUKHqpXuRrP6XAvj4jgKsu0/6v7+98flgBdBPQFqeQt94P16yQgDdL m4c4QcvU IxaoQ5nle50VwevmVoCg6qu7sJVa31CDHXC9+w2REASQplcZOIQuDBECvYk2JufcFdBhCoRd5sMyuzIoJwzbD8iFJER3VKInWhruDiwqah5eSX/GxcuBR4B208RmAFgsBLDX3U54URYJb3VR/FZSVS+QvkEPtD3PxYMNOQnrIXqsuJNROpKSHlj3ynn30oEBP9S5yjveDXJPiuLlLIihnOses+NNrjLWtEkf0kTTamq/vRK3QxyxJoT4Z/kisz3I5tu/V9MSITVsig1fqMurbO5K1P9VbqUyebt397M48OuofeAwYk5K62Ei2n3x/PQATESZw/eW8EPahEvQ7RaOtPuIVXNbFlYGxhG5tyOX2Q0RFaKG2onS/3iNVKw== 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 a/arch/x86/Kconfig b/arch/x86/Kconfig index 928820e61cb5..109e767d36e7 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -1879,6 +1879,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