Message ID | 20221109165140.9137-2-kirill.shutemov@linux.intel.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp447317wru; Wed, 9 Nov 2022 08:57:25 -0800 (PST) X-Google-Smtp-Source: AMsMyM6WWwWXgUpBmb/vQbixx9WAp3otSETMoPUvcV5RcK68jVhyeSAGhsAeOYrtdmXp4iqsi8vy X-Received: by 2002:a17:906:1112:b0:7ad:d11e:a2c2 with SMTP id h18-20020a170906111200b007add11ea2c2mr1407937eja.473.1668013044971; Wed, 09 Nov 2022 08:57:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668013044; cv=none; d=google.com; s=arc-20160816; b=f6hXa71uNUuh15FyuflXGTDBWgZchMgcUfT2jFCG6CDmhsFp/DuwthItrNtqai6UQr aOLGu3nZs70/sDUerhRHDI8s5Q7zVxqusRXK4imNaD2uR1R8auQbLpEZANAFpbDBCT6V W/NKy6J0Pe9kwQlAm8TS9UxGggIz/YPpUGFEU5kNj2mV9K6y9+joNGnOqBeWnwtVCzCT 6wuDzmyaLKM4fxMBMbU/emBtrV7lghGFLcPaHmkOhgo10HE5+d5VY4OInWKKJcBA8ApA 7s/Lz1JuqgqbSlq2DAFl9zZYJIs9eL5+M786/GjzjjxuFXg5A9Oeb5LnJt4lsOoatD1A H8yQ== 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=/gQxZVfxZ0XVnQZf+76lcdkLcCWBm7/MmNe6nzWlntI=; b=Q/3PB+ys+9z9IGCDDIM5wmw3kPvqg66Opz/3rgnVB1wSczq4ANTD4UOEMruIi6kChy g2T7eb8cUZoK1Niad52NsYUGUNidnB5Ra1l+HIPAX6p9bkHhq41WbjhUsu9AaUNUH9yc 6hESVKaPWH4k6m//hxOLbczuFWSz6SSTzONaTYCHdUHayfTQRkRjQ037V/mzcyqMDl4u +Qxfl0cdtRvog+phN3FKIRY3IQpzTRgImAms2YklcxV/yesWu7z6KyqYuCVCxdMWLlY6 XBzGN75SDgTz0euj0CWP4/wewRskdAWGp5OnaRlWFgas6YvJuOw+oa4xKCmlxHJU8wGK SGsg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=QpTntwL+; 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=intel.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w26-20020a170906b19a00b007a4feae7ae7si12396214ejy.575.2022.11.09.08.57.01; Wed, 09 Nov 2022 08:57:24 -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=@intel.com header.s=Intel header.b=QpTntwL+; 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230366AbiKIQwK (ORCPT <rfc822;dexuan.linux@gmail.com> + 99 others); Wed, 9 Nov 2022 11:52:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51364 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229835AbiKIQwJ (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 9 Nov 2022 11:52:09 -0500 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 74D7EF5AA for <linux-kernel@vger.kernel.org>; Wed, 9 Nov 2022 08:52:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1668012728; x=1699548728; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=YRI2YivWJDaeR3A5b46DIJCCsip9GmvTxTmH9XsxWxQ=; b=QpTntwL+FVQNTknom4ZIYddUTiI+tOIcetkLbYYUZP8o1WhDjKJ6EkHl 5olebQlHyFG8z+P33xcJGBZPzNkUsaS5xSrxK8G/dKRqQ4auSDWaPlWB4 anPB5wUNJYXC3zy0Qlhj7avVVjhxmNU3RZLMi9CxS2olm+NGwcVZCEjJg K4j5uExCozC1hMZc3g+plmpcJtOvKLx/0o6vCGco8oGDqoBvGgQVYzU9P Vtq1Y3yhN2LvHRrU4vk1QuugtnxOYbsMFBykbjPjnRLVEWL2cD6My2e4Y 2/a4c5J3i4mllwrby5yK10iORBaI5lQ6B6+r9H+7bDVMTs9oOwGhqgVD2 Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10526"; a="294405263" X-IronPort-AV: E=Sophos;i="5.96,151,1665471600"; d="scan'208";a="294405263" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Nov 2022 08:52:07 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10526"; a="700426422" X-IronPort-AV: E=Sophos;i="5.96,151,1665471600"; d="scan'208";a="700426422" Received: from dschramm-mobl.ger.corp.intel.com (HELO box.shutemov.name) ([10.251.219.85]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Nov 2022 08:52:03 -0800 Received: by box.shutemov.name (Postfix, from userid 1000) id 6269610946C; Wed, 9 Nov 2022 19:52:00 +0300 (+03) From: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> To: Dave Hansen <dave.hansen@linux.intel.com>, Andy Lutomirski <luto@kernel.org>, Peter Zijlstra <peterz@infradead.org> Cc: x86@kernel.org, Kostya Serebryany <kcc@google.com>, Andrey Ryabinin <ryabinin.a.a@gmail.com>, Andrey Konovalov <andreyknvl@gmail.com>, Alexander Potapenko <glider@google.com>, Taras Madan <tarasmadan@google.com>, Dmitry Vyukov <dvyukov@google.com>, "H . J . Lu" <hjl.tools@gmail.com>, Andi Kleen <ak@linux.intel.com>, Rick Edgecombe <rick.p.edgecombe@intel.com>, Bharata B Rao <bharata@amd.com>, Jacob Pan <jacob.jun.pan@linux.intel.com>, Ashok Raj <ashok.raj@intel.com>, linux-mm@kvack.org, linux-kernel@vger.kernel.org, "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> Subject: [PATCHv12 01/16] x86/mm: Fix CR3_ADDR_MASK Date: Wed, 9 Nov 2022 19:51:25 +0300 Message-Id: <20221109165140.9137-2-kirill.shutemov@linux.intel.com> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221109165140.9137-1-kirill.shutemov@linux.intel.com> References: <20221109165140.9137-1-kirill.shutemov@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,SPF_HELO_NONE,SPF_NONE 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749038446708117314?= X-GMAIL-MSGID: =?utf-8?q?1749038446708117314?= |
Series |
Linear Address Masking enabling
|
|
Commit Message
Kirill A. Shutemov
Nov. 9, 2022, 4:51 p.m. UTC
The mask must not include bits above physical address mask. These bits are reserved and can be used for other things. Bits 61 and 62 are used for Linear Address Masking. Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Reviewed-by: Rick Edgecombe <rick.p.edgecombe@intel.com> Reviewed-by: Alexander Potapenko <glider@google.com> Tested-by: Alexander Potapenko <glider@google.com> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org> --- arch/x86/include/asm/processor-flags.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/include/asm/processor-flags.h b/arch/x86/include/asm/processor-flags.h index 02c2cbda4a74..a7f3d9100adb 100644 --- a/arch/x86/include/asm/processor-flags.h +++ b/arch/x86/include/asm/processor-flags.h @@ -35,7 +35,7 @@ */ #ifdef CONFIG_X86_64 /* Mask off the address space ID and SME encryption bits. */ -#define CR3_ADDR_MASK __sme_clr(0x7FFFFFFFFFFFF000ull) +#define CR3_ADDR_MASK __sme_clr(PHYSICAL_PAGE_MASK) #define CR3_PCID_MASK 0xFFFull #define CR3_NOFLUSH BIT_ULL(63)