Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp1365568pxb; Fri, 1 Oct 2021 09:08:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyIuNb+rot6oIUrCOH5Jiwt8NbBY7Ch7rYkQu1KbTNqXQKuGr6haY6W0HWOJiuDOGKvThjt X-Received: by 2002:a17:906:24c1:: with SMTP id f1mr7448174ejb.314.1633104480069; Fri, 01 Oct 2021 09:08:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633104480; cv=none; d=google.com; s=arc-20160816; b=MFTao+Mwwf0u1nigSI8Xrrj80imhtd9WKF28Sie4enpaHbh0QhxppFmyM6SPAleGbc TOs5CNUw/t4htP9dJvmr+wRwTTNyVmWfzWg9tKo88rE5lWiO2fZhvZaEYV/liy7KE1Xg 4aaekuU6pGOy2mcGomShp3s7nhoKuFDyl/YeLPmkIa+YHRNjOj2X5TXN1OJN7zzGVqRG UBy6pv9XE5uTIoFrzUYB1Cp03kQYFUUZaeF+rzFg+ti2XjHUcjrEDC/+ahYR+K6B2xNE DEd3cfE5oBJhV2m9lldMl5fTVomBgxvP2n+Ix3Cg67PsM3/+JMe3GpRSLGBTDQ/2uJ9C gC/w== 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=cFzYf8Q3a8bTeTl43+YC9BCC2cJQl1Vz8LzK7LvXK6yQCe4MzrHCviQ1BgCkc9CE0z JyPJEfjUg+WPCr49uDggs70dYBh4f/J93DnJPAH3ZvzHEYAMBpYisv4eBqWnUBKY9iDb RoFmU5mGbJ5/diK7dd6EgHItYFF3Egopwue7j8V1OpW574BGwr+pADD7WLRCkkOm9EmI +VZgf+UUxWIxLu3Eowotz+1UpUJUtNX+h8EzVF44XzGuHwdtMgWbu7dH/FmsZCClXxeQ Gtj8LEJtYF/9PjytM9FuT4rcgoUAiENdI3Xaco7wAeZWnpDZl3gYwNEiAlDWWB1WR9/g p8Wg== 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 v8si6787477ejv.118.2021.10.01.09.07.35; Fri, 01 Oct 2021 09:08:00 -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 S1355125AbhJAPue (ORCPT + 99 others); Fri, 1 Oct 2021 11:50:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44426 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353716AbhJAPuN (ORCPT ); Fri, 1 Oct 2021 11:50:13 -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 1C5AEC061775 for ; Fri, 1 Oct 2021 08:48:28 -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 8317D25C; Fri, 1 Oct 2021 17:48:26 +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 v3 1/4] x86/realmode: Add comment for Global bit usage in trampline_pgd Date: Fri, 1 Oct 2021 17:48:14 +0200 Message-Id: <20211001154817.29225-2-joro@8bytes.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211001154817.29225-1-joro@8bytes.org> References: <20211001154817.29225-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