Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp699265pxb; Wed, 29 Sep 2021 07:57:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzS9f68txNvMLJpfsEXPP552eLuV1+JyRtg737pOk1oTHUu2M+7DFNEMMM4F/5fTGACQs1C X-Received: by 2002:a17:907:7f8e:: with SMTP id qk14mr158242ejc.91.1632927474592; Wed, 29 Sep 2021 07:57:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632927474; cv=none; d=google.com; s=arc-20160816; b=qWKWda7aUZADd+eST1eF5mtUXKbWsPJVAnKdez0zuTpn+yVV3hDROSiYhu+EmsBRyx O+Jt82ZjY7gebzAn/UYVHf51QKGbY4XC4i3ccc4oiUk8SDiCabKSOZtM6AryX3ehl30b RA1uld0yblT1GYFIDKBKQBPpXj4akylL9BULpZxmyptgwhdsiyNn0KEeGMsvReWyJZj3 IC08hVb5X5TGGCGyxB6xS31YFi+NJnuohS4UOIkSffTEQrh5ZzOJ2TbRwrt3dmI0NBXv oPrnH0a+aFzYUzCPwrS5aW+494tbEdwPP+xFGyww109b395MECFH6KI+y1p4cuWywqtg i1HQ== 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; bh=0vzXRH4w2Fm+jqFY6CRYL48upRBrohyl0To3YQJq3lI=; b=HTQZA5akm91oQaKCuneEDr0+BE3WMWMPOsZwoiyLIwLrQmeFZrftoS777URYEeeaZT nwXQ50pfEeSMR1SRDec94uFr6b1NpgDyql8gEBbB3jInELqp6lUK1NVx/vr4urnhjv/r lXCKWVI+GxjUqLWaKUKg+FBa1a1mrL71PJEq+3HFzHbl5B3aPVoYUFVMwm5wCQQtWzk6 M0dGrsENDzxcAbjt/26TB0PkaEakMqgDQQL6A9BYRTJ1Hx2Er2CGk+MHe95IccWX/kOf FmBE/VjsDMzgfz1b3rTpKv9gFJjKLzXjsDp/sWk7FsHKDg6wIafF1ivJvIqQeYW8RDQw EkfQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=8bytes.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r9si148413eds.91.2021.09.29.07.57.30; Wed, 29 Sep 2021 07:57:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=8bytes.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344815AbhI2O5O (ORCPT + 99 others); Wed, 29 Sep 2021 10:57:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49524 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344810AbhI2O5L (ORCPT ); Wed, 29 Sep 2021 10:57:11 -0400 Received: from theia.8bytes.org (8bytes.org [IPv6:2a01:238:4383:600:38bc:a715:4b6d:a889]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C36FDC06161C for ; Wed, 29 Sep 2021 07:55:30 -0700 (PDT) Received: from cap.home.8bytes.org (p4ff2b5b0.dip0.t-ipconnect.de [79.242.181.176]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by theia.8bytes.org (Postfix) with ESMTPSA id BFBA91014; Wed, 29 Sep 2021 16:55:22 +0200 (CEST) From: Joerg Roedel To: x86@kernel.org Cc: Thomas Gleixner , Ingo Molnar , Borislav Petkov , hpa@zytor.com, Dave Hansen , Andy Lutomirski , Peter Zijlstra , Joerg Roedel , Mike Rapoport , Andrew Morton , Brijesh Singh , linux-kernel@vger.kernel.org Subject: [PATCH v2 1/4] x86/realmode: Add comment for Global bit usage in trampline_pgd Date: Wed, 29 Sep 2021 16:54:58 +0200 Message-Id: <20210929145501.4612-2-joro@8bytes.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210929145501.4612-1-joro@8bytes.org> References: <20210929145501.4612-1-joro@8bytes.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Joerg Roedel Document the fact that using the trampoline_pgd will result in the creation of global TLB entries in the user range of the address space. Signed-off-by: Joerg Roedel --- arch/x86/mm/init.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/x86/mm/init.c b/arch/x86/mm/init.c index 23a14d82e783..accd702d4253 100644 --- a/arch/x86/mm/init.c +++ b/arch/x86/mm/init.c @@ -714,6 +714,11 @@ static void __init memory_map_bottom_up(unsigned long map_start, static void __init init_trampoline(void) { #ifdef CONFIG_X86_64 + /* + * The code below will alias kernel page-tables in the user-range of the + * address space, including the Global bit. So global TLB entries will + * be created when using the trampoline page-table. + */ if (!kaslr_memory_enabled()) trampoline_pgd_entry = init_top_pgt[pgd_index(__PAGE_OFFSET)]; else -- 2.33.0