Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp1766610imm; Sat, 23 Jun 2018 02:09:58 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKrvTjUs4qN2euxFZhEwAOlfehWmg6nTpz5UVV8MVbC/oHOOleQzL2uzeQpj5cGOaMSwaVL X-Received: by 2002:a17:902:3303:: with SMTP id a3-v6mr4827892plc.209.1529744998878; Sat, 23 Jun 2018 02:09:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529744998; cv=none; d=google.com; s=arc-20160816; b=LIwBaTK1z1Xm3uKI0tUvatXn/q6LAtz/ENnkxCMZ0BzHRua/uK9PERWz26G+0iQPpt z2tVkt+nv1kKVme7Ip/dz+U4eQHkQJcRwAuu9cabAhMyOP8IJJJvYukuPOfX3qc4xqR5 clTIt1n87+rvVH+Zk3LOpN6skPsgih8GQeQBxCmU1ST68nxLqb0NS/zX6wvE1sV5NMN4 x3aspetOL5+WkiKpUjC50AAoy7YNSKe4SlBcBiz8Vo3xYA4msRiXgI6efpKIlOnQXoRA 4aBfmGj3E/6toMjLF5yaRHQ/FbnuYRVI4rjoBj4HsfRvWNpCDy7pwMjbXrBavo6JlQ2I eE0w== 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=yjEIlq9dNMQX50Pb3a+VshDCdJa0oXX7Nwa8Ko1ZKFc=; b=L6bpnrGDrlh8kivRp4pACi+klQBwHvGVG80zIO80wdXxMnif+s/mtS8Q4dlcZR2sUT aW9Qnf1yGktd4nwqWqZa/mwKPZ7uV86FM005iOuzsBgIJd0hHimxhCptXY0H7TtngTpU 9DrbNlncm1OwuDgZjuLr/XJYZos2/aICKMdvB9mKHb3LqTaR3tC6si3PMTeseE9mVu81 l3AH3qQJbw3H8DeJHn2O431In4GYbBy69/4ALkfZNntrNhKnVxw7FFVMXoCh+Ry4PFUu 4M5gg6nP6/a9E6my0LJF7s9N7t3twMwBYm503IM5Raownt2WcSuxStRlbg6ou9AiawRC t+vw== 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 s14-v6si7705145pgn.76.2018.06.23.02.09.44; Sat, 23 Jun 2018 02:09: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 S1751784AbeFWJJF (ORCPT + 99 others); Sat, 23 Jun 2018 05:09:05 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:43183 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751732AbeFWJJE (ORCPT ); Sat, 23 Jun 2018 05:09:04 -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 1fWeXH-0003f8-8r; Sat, 23 Jun 2018 11:08:47 +0200 Date: Sat, 23 Jun 2018 11:08:46 +0200 (CEST) From: Thomas Gleixner To: Fenghua Yu cc: Ingo Molnar , "H. Peter Anvin" , Ashok Raj , Dave Hansen , Rafael Wysocki , Tony Luck , Alan Cox , Ravi V Shankar , Arjan van de Ven , linux-kernel , x86 Subject: Re: [RFC PATCH 02/16] x86/split_lock: Handle #AC exception for split lock in kernel mode In-Reply-To: <20180622231813.GE18979@romley-ivt3.sc.intel.com> Message-ID: References: <1527435965-202085-1-git-send-email-fenghua.yu@intel.com> <1527435965-202085-3-git-send-email-fenghua.yu@intel.com> <20180622231813.GE18979@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 Fri, 22 Jun 2018, Fenghua Yu wrote: > On Fri, Jun 22, 2018 at 01:59:44PM +0200, Thomas Gleixner wrote: > > On Fri, 22 Jun 2018, Thomas Gleixner wrote: > > > The whole thing is simply: > > > > > > handle_ac() > > > { > > > if (user_mode(regs)) { > > > do_trap(AC, SIGBUS, ...); > > > } else { > > > disable_ac_on_local_cpu(); > > > WARN_ONCE(1); > > > } > > > } > > > > > > That wants #AC enabled as early as possible so the kernel gets as much > > > coverage as it can. If it trips in the kernel it's a bug and needs to be > > > fixed and we can them fix ONE by ONE. > > > > That said, #AC is just yet another badly defined and hastily bolted on > > (mis)feature. This should have been: > > > > Bit A: Enable #AC if CPL < 3 > > Bit B: Enable #AC if CPL == 3 > > > > But that would have been too useful and would allow sensible use of #AC > > without creating software trainwrecks. > > > > The two bits would be ideal. Correct. And if hardware people would not base their stuff on 'we expect' assumptions and talk to us _before_ casting half baken features into silicon, we would have two bits today. Thanks, tglx