From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linutronix.de (146.0.238.70:993) by crypto-ml.lab.linutronix.de with IMAP4-SSL for ; 23 Feb 2019 01:29:14 -0000 Received: from mail-lj1-x243.google.com ([2a00:1450:4864:20::243]) by Galois.linutronix.de with esmtps (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1gxM7s-00016I-KP for speck@linutronix.de; Sat, 23 Feb 2019 02:29:12 +0100 Received: by mail-lj1-x243.google.com with SMTP id z7so2928421lji.0 for ; Fri, 22 Feb 2019 17:29:12 -0800 (PST) Received: from mail-lj1-f179.google.com (mail-lj1-f179.google.com. [209.85.208.179]) by smtp.gmail.com with ESMTPSA id v1sm817102ljc.57.2019.02.22.17.29.05 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Feb 2019 17:29:05 -0800 (PST) Received: by mail-lj1-f179.google.com with SMTP id j19so3127031ljg.5 for ; Fri, 22 Feb 2019 17:29:05 -0800 (PST) MIME-Version: 1.0 References: <20190222222418.405369026@linutronix.de> <20190222224149.264062978@linutronix.de> In-Reply-To: <20190222224149.264062978@linutronix.de> From: Linus Torvalds Date: Fri, 22 Feb 2019 17:28:49 -0800 Message-ID: Subject: [MODERATED] Re: [patch V4 02/11] x86/speculation/mds: Add basic bug infrastructure for MDS Content-Type: text/plain; charset="UTF-8" To: speck@linutronix.de List-ID: Don't take this as a NAK on this patch, I just didn't react to it on earlier versions, and I wanted to just bring it up.. On Fri, Feb 22, 2019 at 4:04 PM speck for Thomas Gleixner wrote: > > +static const __initconst struct x86_cpu_id cpu_no_mds[] = { > + /* in addition to cpu_no_speculation */ > + { X86_VENDOR_INTEL, 6, INTEL_FAM6_ATOM_GOLDMONT }, ... That comment was what made me go look: we already have *four* of these tables in this file, and this is now the fifth. And that may be ok. Maybe we do want separate tables for separate quirks, even if there are patterns there. But I at least wanted to bring it up: maybe it would be more legible to have one table of CPU quirks, and have that table say "this CPU has / doesn't have this quirk". Looking at the existing tables, there's often commonalities. And the 'struct x86_cpu_id' does have that "driver_data" field that is meant to be able to describe particular issues, and could contain flags for "has bug X" or "doesn't have bug Y" quirks I dunno. I guess it depends on which way people prefer to thing about things. Do you want to have a "I wan to see which CPU's have bug X", or do you want to have a "I want to see what bugs CPU X has". Right now it's been driven by "quirk X" having a list of CPU's associated with that quirk. And maybe that's the right thing to do. But looking at those tables, I do wonder if maybe we should have instead a list of CPU's, and then associate the quirks with the CPU. Anyway, that was my aside. I don't think this patch series needs to worry about it, Linus