From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED,USER_AGENT_NEOMUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 12418ECDFAA for ; Sat, 14 Jul 2018 05:08:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A93472083C for ; Sat, 14 Jul 2018 05:08:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A93472083C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726083AbeGNF0N (ORCPT ); Sat, 14 Jul 2018 01:26:13 -0400 Received: from mx2.suse.de ([195.135.220.15]:34830 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725863AbeGNF0N (ORCPT ); Sat, 14 Jul 2018 01:26:13 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id B876CAEDB; Sat, 14 Jul 2018 05:08:29 +0000 (UTC) Date: Sat, 14 Jul 2018 07:08:28 +0200 From: Joerg Roedel 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" 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: User-Agent: NeoMutt/20170421 (1.8.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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