Received: by 10.192.165.148 with SMTP id m20csp566691imm; Wed, 2 May 2018 05:22:02 -0700 (PDT) X-Google-Smtp-Source: AB8JxZr+oMWl2WT0FfyRkGZwIXlwGOvkxJDFRc9kOluLxoRXIIjh/XjOl+NN4tVdXciuJF1ZtfGp X-Received: by 2002:a17:902:70c9:: with SMTP id l9-v6mr17694657plt.382.1525263722386; Wed, 02 May 2018 05:22:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525263722; cv=none; d=google.com; s=arc-20160816; b=VcgH95plnTVG1jfCHf1NhXp4vtrnfLiTl99iPMRlr7Nmd75yVr6oNtWAdcxlufTfLZ tPc2Z7DTmq1tYei1hPGtagBnPxuElttATT6Noc2dqsNUFAkG7iaQDoJ8AqHQe6dMVUQ/ B/aWw/lzjVbLiX9pX7No8qMDiTCLb8G4TIHX6axzO0Etgacy+3t1doPUsmlfTwTmvAPY ZpMKqhTMTv4W4ZnYr6c095RERMRSPotPjoqn3gljmw87qlFcMki3rtMNneXGxpSYrLLx +I+RAJZyaI/KinjtfOG3OaVIU3xmJ6z4nOFyVWMTtGOQpPTSN/yGMDyJa3Xfke/7kpC6 n57Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date :arc-authentication-results; bh=UXzcbxRA9awiZ0k3PPk8AR6w3P8I/9sAFaGalgLQQQU=; b=XEsvKMEDcG0l2FhSN+Y4MBWi0jVdCobDnRcdXqzx/NJ8Jwr1cnlShgaqCWA7eypIje neANdQQ25XdQFUsT+4b19k+uCb2SPG/SCpodZNkFVDahUq2/7KGpf2msLQW62Si2Ogx7 ypYAE+tywomyYGV8Bn7CsYsxSZgKAJyBTbuVjjNtEsKdRDdzB5i/G2j6l8AROQxyOjdZ 4ttGgV3yhFsvtrxDA8uhFKGRswbNGUZMpSkquKuyMHBHjmoZMfwdMRZz59DIy7rbj0OX fDJrU04etWTIq5Q5m8D4ozjAZY5Pjrl+OGpVS7RxhHo4r0teWf0Rez+M7wdMuHJMPG2a QPtQ== 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 p16-v6si4504300pgc.427.2018.05.02.05.21.47; Wed, 02 May 2018 05:22:02 -0700 (PDT) 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 S1751461AbeEBMVB (ORCPT + 99 others); Wed, 2 May 2018 08:21:01 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:53579 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750999AbeEBMU4 (ORCPT ); Wed, 2 May 2018 08:20:56 -0400 Received: from hsi-kbw-5-158-153-52.hsi19.kabel-badenwuerttemberg.de ([5.158.153.52] helo=nanos.tec.linutronix.de) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1fDqke-0001ng-GM; Wed, 02 May 2018 14:20:52 +0200 Date: Wed, 2 May 2018 14:20:52 +0200 (CEST) From: Thomas Gleixner To: =?ISO-8859-15?Q?J=F6rg_Otte?= cc: Linus Torvalds , "Kirill A. Shutemov" , Linux Kernel Mailing List , Borislav Petkov Subject: Re: [v4.17-rcx] Lost IBPB, IBRS_FW support for spectre_v2 mitigation. In-Reply-To: Message-ID: References: User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="8323329-528394742-1525263652=:1560" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323329-528394742-1525263652=:1560 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT On Wed, 2 May 2018, Jörg Otte wrote: > 2018-05-02 11:02 GMT+02:00 Thomas Gleixner : > > Ok, I think I know what's going wrong in that steaming pile of horrors of > > CPUID detection. I need to analyze it down to the roots, but if you have > > cycles, can you please test the patch below? > > > > It's a hack and even if it fixes the problem I'm going to do it differently. > > > > Thanks, > > > > tglx > > > > 8<------------------- > > --- a/arch/x86/kernel/cpu/common.c > > +++ b/arch/x86/kernel/cpu/common.c > > @@ -848,6 +848,11 @@ void get_cpu_cap(struct cpuinfo_x86 *c) > > c->x86_power = edx; > > } > > > > + if (c->extended_cpuid_level >= 0x80000008) { > > + cpuid(0x80000008, &eax, &ebx, &ecx, &edx); > > + c->x86_capability[CPUID_8000_0008_EBX] = ebx; > > + } > > + > > if (c->extended_cpuid_level >= 0x8000000a) > > c->x86_capability[CPUID_8000_000A_EDX] = cpuid_edx(0x8000000a); > > > > @@ -871,7 +876,6 @@ static void get_cpu_address_sizes(struct > > > > c->x86_virt_bits = (eax >> 8) & 0xff; > > c->x86_phys_bits = eax & 0xff; > > - c->x86_capability[CPUID_8000_0008_EBX] = ebx; > > } > > #ifdef CONFIG_X86_32 > > else if (cpu_has(c, X86_FEATURE_PAE) || cpu_has(c, X86_FEATURE_PSE36)) > > > > OK, that patch works for me! Thanks for confirming. Still need to find a way which is less fragile, but that's probably too much of churn for rc4.... At least I know exactly what's happening, so I can write a better changelog. Thanks for testing! tglx --8323329-528394742-1525263652=:1560--