From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) by kanga.kvack.org (Postfix) with ESMTP id AF2EB6B027C for ; Sat, 14 Jul 2018 01:08:31 -0400 (EDT) Received: by mail-ed1-f69.google.com with SMTP id s3-v6so2648916eds.15 for ; Fri, 13 Jul 2018 22:08:31 -0700 (PDT) Received: from mx1.suse.de (mx2.suse.de. [195.135.220.15]) by mx.google.com with ESMTPS id m46-v6si1815308edm.387.2018.07.13.22.08.30 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 13 Jul 2018 22:08:30 -0700 (PDT) Date: Sat, 14 Jul 2018 07:08:28 +0200 From: Joerg Roedel Subject: Re: [PATCH 38/39] x86/mm/pti: Add Warning when booting on a PCID capable CPU Message-ID: <20180714050828.wl44vgwa7kzptsws@suse.de> References: <1531308586-29340-1-git-send-email-joro@8bytes.org> <1531308586-29340-39-git-send-email-joro@8bytes.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: owner-linux-mm@kvack.org List-ID: To: Andy Lutomirski Cc: Joerg Roedel , Borislav Petkov , Thomas Gleixner , Ingo Molnar , "H . Peter Anvin" , X86 ML , LKML , Linux-MM , Linus Torvalds , 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" On Fri, Jul 13, 2018 at 11:59:44AM -0700, Andy Lutomirski wrote: > 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? Right you are, I don't have a PCID capable system at hand for testing, so I didn't catch this... > 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"? I guess we need to call cpuid again. Regards, Joerg