Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752291AbeANLjS (ORCPT + 1 other); Sun, 14 Jan 2018 06:39:18 -0500 Received: from Galois.linutronix.de ([146.0.238.70]:37587 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751287AbeANLjR (ORCPT ); Sun, 14 Jan 2018 06:39:17 -0500 Date: Sun, 14 Jan 2018 12:39:14 +0100 (CET) From: Thomas Gleixner To: David Woodhouse cc: Andi Kleen , Paul Turner , LKML , Linus Torvalds , Greg Kroah-Hartman , Tim Chen , Dave Hansen , Kees Cook , Rik van Riel , Peter Zijlstra , Andy Lutomirski , Jiri Kosina , gnomes@lxorguk.ukuu.org.uk, x86@kernel.org, thomas.lendacky@amd.com, Josh Poimboeuf Subject: Re: [PATCH] x86/retpoline: Fill RSB on context switch for affected CPUs In-Reply-To: <1515779365-9032-1-git-send-email-dwmw@amazon.co.uk> Message-ID: References: <1515779365-9032-1-git-send-email-dwmw@amazon.co.uk> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On Fri, 12 Jan 2018, David Woodhouse wrote: > +/* Check for Skylake-like CPUs (for RSB handling) */ > +static bool __init is_skylake_era(void) > +{ > + if (boot_cpu_data.x86 == 6) { This wants a checkfor vendor = intel > + switch (boot_cpu_data.x86_model) { > + case INTEL_FAM6_SKYLAKE_MOBILE: > + case INTEL_FAM6_SKYLAKE_DESKTOP: > + case INTEL_FAM6_SKYLAKE_X: > + case INTEL_FAM6_KABYLAKE_MOBILE: > + case INTEL_FAM6_KABYLAKE_DESKTOP: > + return true; > + } > + } Thanks, tglx