From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 941C7C282E1 for ; Thu, 25 Apr 2019 10:58:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6867B214AE for ; Thu, 25 Apr 2019 10:58:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730609AbfDYK6o (ORCPT ); Thu, 25 Apr 2019 06:58:44 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:58526 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727668AbfDYK6n (ORCPT ); Thu, 25 Apr 2019 06:58:43 -0400 Received: from [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 1hJc5I-0003Mo-SB; Thu, 25 Apr 2019 12:58:33 +0200 Date: Thu, 25 Apr 2019 12:58:32 +0200 (CEST) From: Thomas Gleixner To: David Laight cc: 'Fenghua Yu' , Ingo Molnar , Borislav Petkov , H Peter Anvin , Paolo Bonzini , Dave Hansen , Ashok Raj , Peter Zijlstra , Ravi V Shankar , Xiaoyao Li , Christopherson Sean J , Kalle Valo , Michael Chan , linux-kernel , x86 , "kvm@vger.kernel.org" , "netdev@vger.kernel.org" , "linux-wireless@vger.kernel.org" Subject: RE: [PATCH v8 13/15] x86/split_lock: Enable split lock detection by default In-Reply-To: <762682ba43a0468897ff5ddbf6633d58@AcuMS.aculab.com> Message-ID: References: <1556134382-58814-1-git-send-email-fenghua.yu@intel.com> <1556134382-58814-14-git-send-email-fenghua.yu@intel.com> <762682ba43a0468897ff5ddbf6633d58@AcuMS.aculab.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Thu, 25 Apr 2019, David Laight wrote: > From: Fenghua Yu > > Sent: 24 April 2019 20:33 > > A split locked access locks bus and degrades overall memory access > > performance. When split lock detection feature is enumerated, enable > > the feature by default by writing 1 to bit 29 in MSR TEST_CTL to find > > any split lock issue. > > You can't enable this by default until ALL the known potentially > misaligned locked memory operations have been fixed. Errm? The result will be a WARN_ON() printed and no further damage. It's not making anything worse than it is now. In fact we just should add a WARN_ON_ONCE(!aligned_to_long(p)) to all the xxx_bit() operations. so we catch them even when they do not trigger that #AC thingy. Thanks, tglx