From patchwork Tue Mar 7 14:05:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 65564 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp2459618wrd; Tue, 7 Mar 2023 06:26:31 -0800 (PST) X-Google-Smtp-Source: AK7set8D+E2iyZhQ6B2BJSgT4q9gq2BCRRxsqoYW7qTIUIOY6vFEcwIOwNXcVkZHkMiyYzT/3kAF X-Received: by 2002:a17:90b:1b45:b0:237:c565:7bc6 with SMTP id nv5-20020a17090b1b4500b00237c5657bc6mr15469354pjb.10.1678199191445; Tue, 07 Mar 2023 06:26:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678199191; cv=none; d=google.com; s=arc-20160816; b=DieHXZac5NT13JmzJWWjX29TA64CP/aP7KLdKFxcIbP/eL9b96y1nqpJ8bkPECjBCt bfZQ4y5rr9UCqz7O+Azk294f80okEwYqJ0uM49gneZBHDfKvpJNcmRsMDoqPL0Xqh/iY 3B0lYb2i1Y0+f58BwOqdTUi4vw8Aeo0hgh3hkW1rPJxPsnww+8idM67Bunu+Rn/iuDJ3 cVyV6Jwdjzw8nEibd+hpOBeWbCQqzm4fGwqBNWzFl3n1cVquEc7toRCL+eU/HV0790+h uhvENilLISRKneR4IpHURqzF64RPjobvEoKzrw/BFjSUBCBgmm5jAU2aJSuYHJmogaaz TC1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=wOj4HD6P72N56SYywBh1gn4rXpYdTNPd23dnIkSH9Ko=; b=ia4yV4HMR3vPSQvahmdfrUHNuaHgb9V0mJBC9S06nMp8302HNybuL1OaQE161CN7a1 JYb0LXwnP9Fwjw5LRkSOacJF6b24NKkjyAxdhdSDLDSFJovKR/rG6wD4dEiVypHnCu5q OsVXdbg46gFBetqa3gwcwgapKegQ/twK+d4dX5j0ddPAkaX3028BuqSnHm4sNMhFKH/t rCqFqshiipeN3K2Cxu5AfGedE3966jkTjzNVUpqjggOjLJ8ZxlfbGsbiTD0hCmdGqk4T wqrfMRM7AN0a9IRD54S/RRfAQwH86eLSe15qOejoL7R6whyB64MA+uxTqamm8AXxAdYS H0gg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=JMooe098; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x4-20020a17090a8a8400b0023739b10620si11619238pjn.187.2023.03.07.06.26.18; Tue, 07 Mar 2023 06:26:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=JMooe098; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231404AbjCGOMh (ORCPT + 99 others); Tue, 7 Mar 2023 09:12:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49122 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231387AbjCGOMC (ORCPT ); Tue, 7 Mar 2023 09:12:02 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 72DC1888B9 for ; Tue, 7 Mar 2023 06:09:05 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id A2C72613CA for ; Tue, 7 Mar 2023 14:08:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1E93CC433D2; Tue, 7 Mar 2023 14:08:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1678198097; bh=KyeVOWyCVtFoTF1LJWtSXOxn+egSaaC3be0AkldlV1c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JMooe098dHSvS1lQPK7GmT7Datna6P62s4X6DVa9UodJ25o24vy8IvaPovzlhZhgG DIeE4wDoRcH6WNduY/7q7KGv8XTiqORo/6W+CHdDx1uxzfmzdpmSv+CdLTAFceAz20 6tpY1cp4859he3ucXZgwPCMVYwWeZFrnel7Lkefp4Lc1WGwgADULkfgx4VMVW2MhrR vdg8ExweFZYZwhCNN0mjkKWfUR+r9xhBYxzvX0scTbnA6NgTWnqAGs0bujVcPQAQco CZlrATLopOmqR7jPD4OjQGl2kHgmjZIJppgtTszZJl/giF9ybnm7QQee/ECV1syOwy sRAtUk8wQn7dw== From: Ard Biesheuvel To: linux-kernel@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, Ard Biesheuvel , Catalin Marinas , Will Deacon , Marc Zyngier , Mark Rutland , Ryan Roberts , Anshuman Khandual , Kees Cook Subject: [PATCH v3 41/60] arm64/mm: Add FEAT_LPA2 specific TCR_EL1.DS field Date: Tue, 7 Mar 2023 15:05:03 +0100 Message-Id: <20230307140522.2311461-42-ardb@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230307140522.2311461-1-ardb@kernel.org> References: <20230307140522.2311461-1-ardb@kernel.org> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=961; i=ardb@kernel.org; h=from:subject; bh=FGpJVT/P4QQvSVy9l1/wAhcmiWJoU30A2wDupoSxpoU=; b=owGbwMvMwCFmkMcZplerG8N4Wi2JIYXdJfvh8eUxgbdFyxc4HVixJr01y795zapFhS8Ckox+s ky5dWRJRykLgxgHg6yYIovA7L/vdp6eKFXrPEsWZg4rE8gQBi5OAZiIUhTD/7AN6ZNfPoxb19Pz 7aDW9+ucZb91gw/ze8w6t1jw1N4E5vMM/z32PtH7UHRtf9nVLfOyLrmkMGzes3uN5A3FjP9KLgy hUfwA X-Developer-Key: i=ardb@kernel.org; a=openpgp; fpr=F43D03328115A198C90016883D200E9CA6329909 X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759719395059912213?= X-GMAIL-MSGID: =?utf-8?q?1759719395059912213?= From: Anshuman Khandual As per ARM ARM (0487G.A) TCR_EL1.DS fields controls whether 52 bit input and output address get supported on 4K and 16K page size configuration, when FEAT_LPA2 is known to have been implemented. This adds TCR_DS field definition which would be used when FEAT_LPA2 gets enabled. Acked-by: Catalin Marinas Signed-off-by: Anshuman Khandual Signed-off-by: Ard Biesheuvel --- arch/arm64/include/asm/pgtable-hwdef.h | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/include/asm/pgtable-hwdef.h b/arch/arm64/include/asm/pgtable-hwdef.h index f658aafc47dfa29a..c4ad7fbb12c5c07a 100644 --- a/arch/arm64/include/asm/pgtable-hwdef.h +++ b/arch/arm64/include/asm/pgtable-hwdef.h @@ -276,6 +276,7 @@ #define TCR_E0PD1 (UL(1) << 56) #define TCR_TCMA0 (UL(1) << 57) #define TCR_TCMA1 (UL(1) << 58) +#define TCR_DS (UL(1) << 59) /* * TTBR.