Message ID | 20221025001722.17466-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 l7csp737773wru; Mon, 24 Oct 2022 18:10:19 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4o0s4YD8aOjY9uqig5bXfLaYURlQGuW3RoYVxnIAXIaBEJxnvLj3yNCRmo0Qu0jz61xisG X-Received: by 2002:a17:906:7315:b0:7ab:8542:559c with SMTP id di21-20020a170906731500b007ab8542559cmr2117914ejc.639.1666660219493; Mon, 24 Oct 2022 18:10:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666660219; cv=none; d=google.com; s=arc-20160816; b=A2a7ImOTC8YvJeMxvLDgfUd3js0m96ipE/OtP6eyJzBU2sUGJ76HgPFgZ/cETyE0CM AXnV6/aOhMPudZB8uotLWj42EbDigDoi1lXCgxtcYnAMIvFflgJ6VJq8ExxYJ/Zj//XQ UsiQRh5H/WMhd06/H6Zb42ePgKGyWTvIk6gMzjRwHdPGocOvR+yEvKVvyoHSzq9+qvHE AHVAzcfYKW1lK+aw7U0ZiTzrz7g6D6dmVS/4ik1m/mMtu9ZI6HqF2ib+qMkVvwh4ZmGO X+M4LatZP7qWZMyFnTWv12ReWbEYjBJ474bVFvQdLT/awM8LaVN6ttNldDEsyUkxsT6d gBpQ== 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=LAcHGIkFSpE+PVl/hnWJyVZj5R6Iv4Jn93iPZZhcN96KohFjpIz3nBtxnVhlxZ5g03 /kpYa3FyMJU3zvPJYQrvsI22A1JqZf94GWBMmEFIy7QOUhr0mSWqXoiF5nhiNijbW8We c+8XNmslUkl7QGc6gl3ocdPyZ4QVxYcNfCKDy2sHsW4xINel9yXY9M3rQwHQqbjDF1Mx qLpYiAoosS51H5aDFOc79dzpJkxcbsx+IovFYxGeArikyw2436hz7pcbE4UynsT5/shW ebW5t+3xuOLeRE0TrrCsWZX/6nJBKAVNuBiP5A6M1cfChW4saee0Ov3mWTLgt3qjjYtp y2yg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=UJ6GA99M; 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 ae8-20020a17090725c800b007813b1924ccsi1359427ejc.934.2022.10.24.18.09.56; Mon, 24 Oct 2022 18:10:19 -0700 (PDT) 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=UJ6GA99M; 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 S230439AbiJYBJC (ORCPT <rfc822;pwkd43@gmail.com> + 99 others); Mon, 24 Oct 2022 21:09:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42730 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231249AbiJYBIQ (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 24 Oct 2022 21:08:16 -0400 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B4D182AD7 for <linux-kernel@vger.kernel.org>; Mon, 24 Oct 2022 17:17:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666657056; x=1698193056; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=YRI2YivWJDaeR3A5b46DIJCCsip9GmvTxTmH9XsxWxQ=; b=UJ6GA99MGnwOQkRnAJ4nJq2qI14hLSPwDN9bwnMVcXywr6HrFdyIJApC R04kl/UAUnBiWlk1i4s7dj9ZEcyPMslryKPTrJetF4vg406yEaFDf6FCV VETTnuHDOcU5tKa2t4urwyY00sjogFSj89fhjyyX3ZCZnee0F6cLT3yTO pDQIrUcykK+VgKDb/3dHtutZIQ3prrqQaG/fTH+vo1Q5i8ePUucX9JhNS njkKvLFkUzgLHd9RLr985hTUk3Qn77sBrTRhgUTmS8/yuji6kucRKxZFf 8X5wbuOZrT81ZqUO5sQE0AmtXhez2i5N3fIGEkWh4fO6yWR2J4AtB/+Q4 Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10510"; a="309238816" X-IronPort-AV: E=Sophos;i="5.95,210,1661842800"; d="scan'208";a="309238816" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Oct 2022 17:17:32 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10510"; a="582587458" X-IronPort-AV: E=Sophos;i="5.95,210,1661842800"; d="scan'208";a="582587458" Received: from ghoyler-mobl.ger.corp.intel.com (HELO box.shutemov.name) ([10.249.39.118]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Oct 2022 17:17:28 -0700 Received: by box.shutemov.name (Postfix, from userid 1000) id AA335106656; Tue, 25 Oct 2022 03:17:25 +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: [PATCHv11 01/16] x86/mm: Fix CR3_ADDR_MASK Date: Tue, 25 Oct 2022 03:17:07 +0300 Message-Id: <20221025001722.17466-2-kirill.shutemov@linux.intel.com> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221025001722.17466-1-kirill.shutemov@linux.intel.com> References: <20221025001722.17466-1-kirill.shutemov@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,URIBL_BLOCKED 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?1747619906438757241?= X-GMAIL-MSGID: =?utf-8?q?1747619906438757241?= |
Series |
Linear Address Masking enabling
|
|
Commit Message
Kirill A. Shutemov
Oct. 25, 2022, 12:17 a.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)