Received: by 10.223.185.116 with SMTP id b49csp2632431wrg; Mon, 5 Mar 2018 06:19:36 -0800 (PST) X-Google-Smtp-Source: AG47ELviRzylW72ceuRsi6axsfCWs7yjNiMG9o4nyxGBalqFrtqqrQVBlltbzKfm5fSkDPH/JuKX X-Received: by 2002:a17:902:149:: with SMTP id 67-v6mr13175715plb.73.1520259576554; Mon, 05 Mar 2018 06:19:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520259576; cv=none; d=google.com; s=arc-20160816; b=cdBLNoND2eacjfYcZmvQbpreBRfJ6eqY5zRlyWksXxgKkJXXrPpos1YZoG0I+7zaaz 3FdtgxjsEcv8IyTTYjFrwpXCnmyYqOsT1I+xy9L6ctK+UHKcRu21UASk+ab2cVpYgsOK plZJxxsPqbakPkBTrQGoVy8w3P2zcph28dOmY1Uc3tPYfoO/BPaISuz/RJjLWoZXO/Py hP0z+XUVNY1hKFirJn82BN1pEDGHoL8LhFHY6LH92bMZIN5I4UqYkGGjrW1lidxHrhqT f2OZZg3iZtGnejo6WtNrd+u1JsN2s7SyUmulwMfkgG7JuLaYXXNTLDqtVr0kWkaxfRWE wYKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:organization:from:references:cc:to:subject :arc-authentication-results; bh=oleO6uIqKRxgciax9wsNzwK6Jl4Sl9EveCSbxNpaUq4=; b=q2ukY0Zkkehrc+oOr4/TKHHzkRH1Q2YUbD9NK+K46qjO+ow3u4Xyf2SO6tlXNBOGFL mC1sSW8BOZzprRFynskRmag7McHqwuphPDzLMlMcfR6AnDhkX0YRAdhTXi297bCw3L79 kD6b70H2Q2ffycnfClOBCDtgt736aiHV/wes9nByfKsiaoKiCEHiLWnCRUKxi8GdJzO7 3NMbUYao3sqEcswg8ntXxPVxForK15wnV3Wz/lEpIHESAxjXwpdFKqNbpFx/2eqlnthO KwqkR83sR0IXAl2rGeMMdJ7Ta3A/kYqRgkQZXmuXLtv7FsjCthvgvaqFBFK4mc0gi7UG H3Rw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x4si10253629pfx.114.2018.03.05.06.19.21; Mon, 05 Mar 2018 06:19:36 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935215AbeCENjh (ORCPT + 99 others); Mon, 5 Mar 2018 08:39:37 -0500 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:33454 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933511AbeCENje (ORCPT ); Mon, 5 Mar 2018 08:39:34 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 55A3284256; Mon, 5 Mar 2018 13:39:33 +0000 (UTC) Received: from llong.remote.csb (dhcp-17-5.bos.redhat.com [10.18.17.5]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3E63D202660C; Mon, 5 Mar 2018 13:39:28 +0000 (UTC) Subject: Re: [PATCH 34/34] x86/mm/pti: Add Warning when booting on a PCIE capable CPU To: Joerg Roedel , Thomas Gleixner , Ingo Molnar , "H . Peter Anvin" Cc: x86@kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Linus Torvalds , Andy Lutomirski , Dave Hansen , Josh Poimboeuf , Juergen Gross , Peter Zijlstra , Borislav Petkov , Jiri Kosina , Boris Ostrovsky , Brian Gerst , David Laight , Denys Vlasenko , Eduardo Valentin , Greg KH , Will Deacon , aliguori@amazon.com, daniel.gruss@iaik.tugraz.at, hughd@google.com, keescook@google.com, Andrea Arcangeli , Waiman Long , Pavel Machek , jroedel@suse.de References: <1520245563-8444-1-git-send-email-joro@8bytes.org> <1520245563-8444-35-git-send-email-joro@8bytes.org> From: Waiman Long Organization: Red Hat Message-ID: Date: Mon, 5 Mar 2018 08:39:28 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 In-Reply-To: <1520245563-8444-35-git-send-email-joro@8bytes.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Mon, 05 Mar 2018 13:39:33 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Mon, 05 Mar 2018 13:39:33 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'longman@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/05/2018 05:26 AM, Joerg Roedel wrote: > From: Joerg Roedel > > Warn the user in case the performance can be significantly > improved by switching to a 64-bit kernel. > > Suggested-by: Andy Lutomirski > Signed-off-by: Joerg Roedel > --- > arch/x86/mm/pti.c | 16 ++++++++++++++++ > 1 file changed, 16 insertions(+) > > diff --git a/arch/x86/mm/pti.c b/arch/x86/mm/pti.c > index 3ffd923..8f5aa0d 100644 > --- a/arch/x86/mm/pti.c > +++ b/arch/x86/mm/pti.c > @@ -385,6 +385,22 @@ void __init pti_init(void) > > pr_info("enabled\n"); > > +#ifdef CONFIG_X86_32 > + if (boot_cpu_has(X86_FEATURE_PCID)) { > + /* Use printk to work around pr_fmt() */ > + printk(KERN_WARNING "\n"); > + printk(KERN_WARNING "************************************************************\n"); > + printk(KERN_WARNING "** WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! **\n"); > + printk(KERN_WARNING "** **\n"); > + printk(KERN_WARNING "** You are using 32-bit PTI on a 64-bit PCID-capable CPU. **\n"); > + printk(KERN_WARNING "** Your performance will increase dramatically if you **\n"); > + printk(KERN_WARNING "** switch to a 64-bit kernel! **\n"); > + printk(KERN_WARNING "** **\n"); > + printk(KERN_WARNING "** WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! **\n"); > + printk(KERN_WARNING "************************************************************\n"); > + } > +#endif > + > pti_clone_user_shared(); > pti_clone_entry_text(); > pti_setup_espfix64(); Typo in the patch title: PCIE => PCID. -Longman