Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp7672imm; Thu, 12 Jul 2018 13:03:59 -0700 (PDT) X-Google-Smtp-Source: AAOMgpd4U7nudqOP6GauMlFErLO0lDFtkWc3bCj9Rn89XDsW+/6LvMyxX9lRoi5sPQ+H9jdIRo5+ X-Received: by 2002:a62:c0a:: with SMTP id u10-v6mr3826314pfi.43.1531425838965; Thu, 12 Jul 2018 13:03:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531425838; cv=none; d=google.com; s=arc-20160816; b=E6fBqatz1weiaEepmgawMU2OOdRzbQIhkwWL6MOgDOK0lTDZVDWf95ms1mNdTNnCj4 iRL5recO97cSETsXnGkh2vuYvKX+QU2wiB6JuPvFycrDjJ0gbaEeNWH13GNmhcYiqj9o MXPPYya2h1k7Um/DGHfGu3PivM5BnurFXehQKv2OjVb279p217RVqa3emPNSmbiakl8R H45/02280YATk5G61iOvVFHWOoQAMpW3ofALS8RMGITysXq4Ordc0Lwv0PDV7KKItiW2 LiKJ7nUEd12CMgALoWXeOWTy5yg6slTDisioc8pTvWMHDlYeUDgno3meZ/MQomtN3syK DaDw== 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=fIjra1bJxHVLJ5I/ajWP4KeupE/sqr/AoenpE7mcBes=; b=b5y+E/OF6D8GmMqIf4O8h6s39IBUkOjR+DhykZ64aHo96RfoFo2A1K0r5US7kUzlm7 raCakWePWHojlLzIIvPTJPg3mvTMjdHfyfnBmUEoDxZdL7ivuf/6Kk3V/Qm7LuMU8lcD 7uOs9JAMTppuCRRw/s8QVBaenHA/sa0CNq3jbkCbBU2BLOsAMvD+hm/ZbzLJr31auprR bBVLXDX7+GvCm36EReZPN7RsyBKNoBncQ6TN0mMLCYL2PJ8Ht7A+ZMoxUO9W3kAzped+ k8iwAWv/QKoYQcsZlDU+st1Z3qnS7gQfjjvErIiSMefZKg+HUQHo9OmQrDKQtBXUpCsr p0sg== 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 m24-v6si17713782pfk.56.2018.07.12.13.03.20; Thu, 12 Jul 2018 13:03:58 -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 S1732453AbeGLULp (ORCPT + 99 others); Thu, 12 Jul 2018 16:11:45 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:45877 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732235AbeGLULp (ORCPT ); Thu, 12 Jul 2018 16:11:45 -0400 Received: from p4fea482e.dip0.t-ipconnect.de ([79.234.72.46] helo=nanos.glx-home) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1fdhlB-0004mm-Vd; Thu, 12 Jul 2018 22:00:18 +0200 Date: Thu, 12 Jul 2018 22:00:17 +0200 (CEST) From: Thomas Gleixner To: Dave Hansen cc: Fenghua Yu , Eduardo Habkost , Ingo Molnar , H Peter Anvin , Ashok Raj , Alan Cox , Peter Zijlstra , Rafael Wysocki , Tony Luck , Ravi V Shankar , linux-kernel , x86 , Vedvyas Shanbhogue Subject: Re: [PATCH v2 1/4] x86/split_lock: Enumerate #AC exception for split locked access feature In-Reply-To: Message-ID: References: <1530282807-66555-1-git-send-email-fenghua.yu@intel.com> <1530282807-66555-2-git-send-email-fenghua.yu@intel.com> <20180704200742.GD7451@localhost.localdomain> <20180710184506.GA37857@romley-ivt3.sc.intel.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 11 Jul 2018, Dave Hansen wrote: > On 07/10/2018 12:47 PM, Thomas Gleixner wrote: > > And please tell your hardware people that they should stop creating > > features which are not enumerated in one way or the other. That's just a > > pain all over the place. Boot code, kernel, virt, tools .... > > Assuming it's too late to get CPUID or MSR enumeration... (I haven't > given up on this yet, btw) Given the fact that they can add cpuid bits and msr and msr bits within no time via ucode, assuming too late is the wrong approach. As this is not yet existing silicon, the ucode patch space should be more than sufficient for that. Or is it already reserved for the next speculation disaster? Btw, when is this going to be real silicon? > How about we #define a Linux-defined X86_FEATURE_SPLIT_LOCK_AC (or > whatever) for now. When the hardware that has this bit for real shows > up, we move the #define to the "correct" place, like if it is a part of > an existing cpufeature leaf. > > We also do a new setcpuid= boot option that behaves like the existing > clearcpuid=. That option is used by the obscure, specialized split lock > detectino users to set the software cpufeature bit. > > That way, we can merged this code *with* CPUID detection, and the only > thing we have to do in the future is move the X86_FEATURE_SPLIT_LOCK_AC > define to a better place. > > It might be nice to make the setcpuid= thing use strings instead of > numbers that _can_ change from kernel-to-kernel, but that's kinda an > implementation detail. If we have strings, maybe we can start using > clearcpuid=pku instead of our endless list of (new) boot parameters like > nopku, nosmap, nosmep, etc... I might be persuaded to accept the setcpuid= magic if, and only if the CPUID leaf and bit is documented upfront and going to stay the same. If that's not the case we just open the door for the HW folks to ignore proper enumeration forever. Thanks, tglx