From mboxrd@z Thu Jan 1 00:00:00 1970 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6B132C4332F for ; Fri, 11 Nov 2022 21:59:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234507AbiKKV7b (ORCPT ); Fri, 11 Nov 2022 16:59:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33542 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234312AbiKKV6z (ORCPT ); Fri, 11 Nov 2022 16:58:55 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BCEAC26AFA; Fri, 11 Nov 2022 13:58:37 -0800 (PST) Date: Fri, 11 Nov 2022 21:58:35 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1668203916; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Dm3F/pc3L7kD0HxaMff9m19vgp7Mx8YPppLwcgrMjtA=; b=KlTKIKdt46pFlP1c1wmV/+z3amYeYYaRGCKGpG1f64hFvvFcwrPkDVgXDKOlznPPrSNaL+ PVaJm37E526nhCumfg2UbktKfpeACFmF8g6Z7t/VfkIRU1P791PyuAUpCiIO/p5qVLqJLH Awr1rI+c/ZA04QUcFSUSl/W55ABHFU/OGiy2RC20Rz6BKzrqdyp9Up7lcCcDIVC6pxhqCg Nid5xKw4Lk+CE7aaT1qIxJH2q3S6j9lsJspk3YCdm1X6pi1242pDrAU3dx4ip+k1GXXl1O ebNw8Y7o1sddp+iGMkpq6bmXYSJ9kqa2pP4W24/OKpZupulLSnELNc7H88t6yw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1668203916; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Dm3F/pc3L7kD0HxaMff9m19vgp7Mx8YPppLwcgrMjtA=; b=4nYdnUz/HrQP2rwxZcZmYvd3dpRFcLKjTctwU+QyU4J8khxb1AOZzVJV2eSMDNGqIpAgD8 B7+Bq6ZcuL7AeRCA== From: "tip-bot2 for Kirill A. Shutemov" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/mm] x86/mm: Fix CR3_ADDR_MASK Cc: "Kirill A. Shutemov" , Dave Hansen , Rick Edgecombe , Alexander Potapenko , "Peter Zijlstra (Intel)" , x86@kernel.org, linux-kernel@vger.kernel.org MIME-Version: 1.0 Message-ID: <166820391515.4906.8308006042078958731.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the x86/mm branch of tip: Commit-ID: 4cb94f188d3a0bc0c6e72c07ce2fe304611ebcf4 Gitweb: https://git.kernel.org/tip/4cb94f188d3a0bc0c6e72c07ce2fe304611ebcf4 Author: Kirill A. Shutemov AuthorDate: Wed, 09 Nov 2022 19:51:25 +03:00 Committer: Dave Hansen CommitterDate: Fri, 11 Nov 2022 13:28:06 -08:00 x86/mm: Fix CR3_ADDR_MASK 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 Signed-off-by: Dave Hansen Reviewed-by: Rick Edgecombe Reviewed-by: Alexander Potapenko Acked-by: Peter Zijlstra (Intel) Tested-by: Alexander Potapenko Link: https://lore.kernel.org/all/20221109165140.9137-2-kirill.shutemov%40linux.intel.com --- 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 02c2cbd..a7f3d91 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)