From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl0-f70.google.com (mail-pl0-f70.google.com [209.85.160.70]) by kanga.kvack.org (Postfix) with ESMTP id 77DA86B0003 for ; Fri, 13 Jul 2018 15:00:08 -0400 (EDT) Received: by mail-pl0-f70.google.com with SMTP id w1-v6so20015417plq.8 for ; Fri, 13 Jul 2018 12:00:08 -0700 (PDT) Received: from mail.kernel.org (mail.kernel.org. [198.145.29.99]) by mx.google.com with ESMTPS id l192-v6si7606351pge.81.2018.07.13.12.00.06 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 13 Jul 2018 12:00:06 -0700 (PDT) Received: from mail-wr1-f51.google.com (mail-wr1-f51.google.com [209.85.221.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 51A17208B0 for ; Fri, 13 Jul 2018 19:00:06 +0000 (UTC) Received: by mail-wr1-f51.google.com with SMTP id h9-v6so26086018wro.3 for ; Fri, 13 Jul 2018 12:00:06 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <1531308586-29340-39-git-send-email-joro@8bytes.org> References: <1531308586-29340-1-git-send-email-joro@8bytes.org> <1531308586-29340-39-git-send-email-joro@8bytes.org> From: Andy Lutomirski Date: Fri, 13 Jul 2018 11:59:44 -0700 Message-ID: Subject: Re: [PATCH 38/39] x86/mm/pti: Add Warning when booting on a PCID capable CPU Content-Type: text/plain; charset="UTF-8" Sender: owner-linux-mm@kvack.org List-ID: To: Joerg Roedel , Borislav Petkov Cc: Thomas Gleixner , Ingo Molnar , "H . Peter Anvin" , X86 ML , LKML , Linux-MM , Linus Torvalds , Andy Lutomirski , Dave Hansen , Josh Poimboeuf , Juergen Gross , Peter Zijlstra , Jiri Kosina , Boris Ostrovsky , Brian Gerst , David Laight , Denys Vlasenko , Eduardo Valentin , Greg KH , Will Deacon , "Liguori, Anthony" , Daniel Gruss , Hugh Dickins , Kees Cook , Andrea Arcangeli , Waiman Long , Pavel Machek , "David H . Gutteridge" , Joerg Roedel On Wed, Jul 11, 2018 at 4:29 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. ... > +#ifdef CONFIG_X86_32 > + if (boot_cpu_has(X86_FEATURE_PCID)) { I'm a bit confused. Wouldn't the setup_clear_cpu_cap() call in early_identify_cpu() prevent this from working? Boris, do we have a straightforward way to ask "does the CPU advertise this feature in CPUID regardless of whether we have it enabled right now"? --Andy