Received: by 2002:a5d:925a:0:0:0:0:0 with SMTP id e26csp1469418iol; Fri, 10 Jun 2022 08:07:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw29b+O92i7gtlJr5NJmEarBZ4NhRkU8aG+KWipbm4Qm/aMGyGxKCpZfk/L7lu/eU2HbdL7 X-Received: by 2002:a17:903:228c:b0:163:baf6:582a with SMTP id b12-20020a170903228c00b00163baf6582amr45110884plh.43.1654873653701; Fri, 10 Jun 2022 08:07:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654873653; cv=none; d=google.com; s=arc-20160816; b=MjchfBv4MXiREa4rNmUoH52UKoqOewzb0Gbv8hxGfSkkIwUb7+kI5J1PTNz8YHJf17 0Bll3+agpNU54vVes72CG6c/SfIvA2atstdnKZJs1GCZ4lxM5ghxc0FVRDISutjj/Qts entZ7lidTL6ZrWs3HaZXE6+X3eydkjq9dRGkpLm3kWfjrsKlY2yFWFgu3SX54LlHXjH4 Mdwb9skcD5+lycHoEQhvIHVwP/8Einr82MmeUCxKTycY1ASvmSjbkAGIpGzeFk40znzr 5McT4Gjyou27pxrkl08fOW6RGYhrgUwcJBZWei1qnPvZ13Bkbyoac7CIpw1T3Zn/MsIn IZiQ== 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=mW1mKRxg2W+vIVy9TME/PDqbytocWiqggYlaB8vzshA=; b=GdZfg5mrnJPd0GuK3EGgMDbsBDDpT0f/jktgdUSHoLg/7J2VixMcs73bLv8sU5WqyX iz/9pTu/agPTKR9qvL7sJygiMUcs5vWREL1NxvTVXFq1pQUZgdQ7AMLIE1tG1hE64HA8 zbhiV76382mPcoQy6WZZUA6kTlx78Fk1nmIBXwqkFm5SenvY2VO0NGFAHgYov8j9UDjK 52K6ajZEXN9rIqog7crYyjVlS3e7nNQ7pT6HAswnZd/IuFw8FPwVOu7QsOet0pqHLiAm 0WG+mhfNocAZGLgWamZM32Pj+2Ae5X9bm6AhYUnqnVgEDjtObQokZLHXqWcls8wkJ1QA NUSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=C08FpuM2; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d67-20020a636846000000b003fda8768897si20638054pgc.846.2022.06.10.08.07.18; Fri, 10 Jun 2022 08:07:33 -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=C08FpuM2; 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 S1344905AbiFJOfg (ORCPT + 99 others); Fri, 10 Jun 2022 10:35:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55480 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234903AbiFJOfb (ORCPT ); Fri, 10 Jun 2022 10:35:31 -0400 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A275ADF9A for ; Fri, 10 Jun 2022 07:35:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1654871730; x=1686407730; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=YJmOMZm2CAZNr36cdPGE67zJRph2jZlNrnhMlnzgytk=; b=C08FpuM2a8gzioaFhz5vTP+t7NqxIsI1KC39J+rzoe0erzifx9SryX7d v4iX2c3jV0Fxlv9UGbHU3wdbZvK4UudTC16ArkbDnms/oXZc00wbiIn78 rE2YVOVVzl7MKsyxW1BK5orsnKc3BC9DjV1Utrc4XfwqMlNHmaIs1BXx7 Zbi3X6IYvf+Rg1Fn7Ne6gDXCGfmNK3bAXCkiwYuegEWQdJrWEeruo4Jzm tL+Be1xwu5BjkFi1Rvl/zLXUE6L7GJVVfOtKzqFVm9HUyjJHQOEaO0vBM usg3q/JUCxYG2xc5+ERplAvYDBphFzOZDvsHEpTTuvR+m7HUmNGPEFWCp A==; X-IronPort-AV: E=McAfee;i="6400,9594,10374"; a="341706097" X-IronPort-AV: E=Sophos;i="5.91,290,1647327600"; d="scan'208";a="341706097" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Jun 2022 07:35:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,290,1647327600"; d="scan'208";a="710959727" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga004.jf.intel.com with ESMTP; 10 Jun 2022 07:35:26 -0700 Received: by black.fi.intel.com (Postfix, from userid 1000) id 23E9549; Fri, 10 Jun 2022 17:35:30 +0300 (EEST) From: "Kirill A. Shutemov" To: Dave Hansen , Andy Lutomirski , Peter Zijlstra Cc: x86@kernel.org, Kostya Serebryany , Andrey Ryabinin , Andrey Konovalov , Alexander Potapenko , Dmitry Vyukov , "H . J . Lu" , Andi Kleen , Rick Edgecombe , linux-mm@kvack.org, linux-kernel@vger.kernel.org, "Kirill A. Shutemov" Subject: [PATCHv3 1/8] x86/mm: Fix CR3_ADDR_MASK Date: Fri, 10 Jun 2022 17:35:20 +0300 Message-Id: <20220610143527.22974-2-kirill.shutemov@linux.intel.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220610143527.22974-1-kirill.shutemov@linux.intel.com> References: <20220610143527.22974-1-kirill.shutemov@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-5.5 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,T_SCC_BODY_TEXT_LINE,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: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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) -- 2.35.1