Received: by 10.223.176.46 with SMTP id f43csp1838125wra; Sun, 21 Jan 2018 05:39:44 -0800 (PST) X-Google-Smtp-Source: AH8x226YFuntjX7B/lQu1Q2nvUujQ16qsVE9PD3xvvYnA6ZmLkV3hyJcw5VgOOsWWa3Lknc+QzvA X-Received: by 2002:a17:902:49:: with SMTP id 67-v6mr2008041pla.424.1516541984534; Sun, 21 Jan 2018 05:39:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516541984; cv=none; d=google.com; s=arc-20160816; b=mJ/l2krez+UUIAOKvU5H6l9QXhfStnzLVuE3//2UJFyGD34pIISzAh0Qx/Gla3KZX9 7qkcRpv5RQ+3lsGoGXtrIq8EsN/35foPYXvG0ZBStpuIWFwFH/U/loBaGl5ptaUeZyl3 1Ynr1sdfihoEv3f4/MnR/0achlzgcdz+QPd2f7f52QAENQuNktk5/qS8I0mIha25fP/P nxbkTme3gVK7l6Vyay9kJeGtA6fKcBkm0pR7eogvIhwCdZNMG8Tx1ar4QHCbwuTN4NlA QYtrplYVGd1YhqnpDbZgdvtnqyiZk0IumUCWM7kqZvOZBsox/hl8tjZfmhQCCPI6Mdej qf3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=75KX9t6YOxaiEZ2i5ypSsMPRz9fjapceTQe0pbxf9RE=; b=P9PczaXxNZkBtsBC/ZelF8ornSUiuNrppxDVhNQwEFYN3crFVvVS1LXCtiDy5mqxgt rwkS+aFYZi4+9KQtxCLEAeLR5uh6BLId76WwbnqvS3Qg494XAu/hF4rF7qZZsUyvlOdY 6WkJStur69p3KrJ2W9U9bXxPPI3brBP83QzeXgjFpnlLITX4OSIKgXWu7ZeJeCVTdz2Q Yag4PwWT6xC1yWLC1uAqFr6VgQ1q9+iRm/7WVvX3CWpG2iQfOAiPlqA74DUc2flrPacz jqNyvULqYScCv+u8TG9IOpOJ5AqupIDX/oAFLBsU7Lbp8fG9nh6zU81IsGUxfQqGXIRI v0Yw== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e83si11886793pfk.254.2018.01.21.05.39.28; Sun, 21 Jan 2018 05:39:44 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751229AbeAUNjI (ORCPT + 99 others); Sun, 21 Jan 2018 08:39:08 -0500 Received: from mail.skyhub.de ([5.9.137.197]:41358 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750766AbeAUNjH (ORCPT ); Sun, 21 Jan 2018 08:39:07 -0500 X-Virus-Scanned: Nedap ESD1 at mail.skyhub.de Received: from mail.skyhub.de ([127.0.0.1]) by localhost (blast.alien8.de [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id nAEfebt5zeou; Sun, 21 Jan 2018 14:39:06 +0100 (CET) Received: from pd.tnic (p200300EC2BEE1B001C757E499366AA02.dip0.t-ipconnect.de [IPv6:2003:ec:2bee:1b00:1c75:7e49:9366:aa02]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id E93011EC02F2; Sun, 21 Jan 2018 14:39:05 +0100 (CET) Date: Sun, 21 Jan 2018 14:38:56 +0100 From: Borislav Petkov To: David Woodhouse Cc: arjan@linux.intel.com, tglx@linutronix.de, karahmed@amazon.de, x86@kernel.org, linux-kernel@vger.kernel.org, tim.c.chen@linux.intel.com, peterz@infradead.org, pbonzini@redhat.com, ak@linux.intel.com, torvalds@linux-foundation.org, gregkh@linux-foundation.org Subject: Re: [PATCH v2 4/8] x86/pti: Do not enable PTI on fixed Intel processors Message-ID: <20180121133856.aznw4egqrvqxjnir@pd.tnic> References: <1516528149-9370-1-git-send-email-dwmw@amazon.co.uk> <1516528149-9370-5-git-send-email-dwmw@amazon.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1516528149-9370-5-git-send-email-dwmw@amazon.co.uk> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Jan 21, 2018 at 09:49:05AM +0000, David Woodhouse wrote: > When they advertise the IA32_ARCH_CAPABILITIES MSR and it has the RDCL_NO > bit set, they don't need KPTI either. > > Signed-off-by: David Woodhouse > --- > arch/x86/kernel/cpu/common.c | 9 +++++++-- > 1 file changed, 7 insertions(+), 2 deletions(-) > > diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c > index e5d66e9..80572ae 100644 > --- a/arch/x86/kernel/cpu/common.c > +++ b/arch/x86/kernel/cpu/common.c > @@ -900,8 +900,13 @@ static void __init early_identify_cpu(struct cpuinfo_x86 *c) > > setup_force_cpu_cap(X86_FEATURE_ALWAYS); > > - if (c->x86_vendor != X86_VENDOR_AMD) > - setup_force_cpu_bug(X86_BUG_CPU_MELTDOWN); > + if (c->x86_vendor != X86_VENDOR_AMD) { > + unsigned long ia32_cap = 0; WARNING: Missing a blank line after declarations #36: FILE: arch/x86/kernel/cpu/common.c:905: + unsigned long ia32_cap = 0; + if (cpu_has(c, X86_FEATURE_ARCH_CAPABILITIES)) Yap, that thing seldom is right but this time it makes some sense. Also, unsigned long long ia32_cap = 0; for 32-bit. -- Regards/Gruss, Boris. Good mailing practices for 400: avoid top-posting and trim the reply.