Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp1548703pxb; Fri, 6 Nov 2020 12:36:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJxJtDkBEU59BeeNjMIDi3ZOyxodSRIMwEWwwvaN3vl262/EMdlctASwsKPnP1dAfa5DuXrL X-Received: by 2002:a17:906:52d5:: with SMTP id w21mr3696373ejn.464.1604694974750; Fri, 06 Nov 2020 12:36:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604694974; cv=none; d=google.com; s=arc-20160816; b=BfrciWKptqapomwbPXolqztBaZ+PCXRkRJ4uvN3QCMntqfYIYnH332to1PyGgjiIxo xuA/QHLdGXByU1rnG4sbHyTJScBvrgkl6OCwgRI0PLGaKeskTVgsJi7iwXP9TfQ9jZLd AAOpdROiMW5akTO1nmlbqo3g7cDhJ0GoOgk7U9KY8Cvzoj0oKIxpuQ4pEIhY7NVpJ83B i1rBvfVk36r4MMZ7pJxr2cfLH4RyQogkrl22T19RENHNDBFL+Kz6xF+RYXGrWxLeizOr xgt/jPeTPiyi63ejuahaYP8Tmv4RhFuC4El9ShIUTp+zDUWSAMglsc6Lc2D8N7F2FFeU nbFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:ironport-sdr :ironport-sdr; bh=WIBd+sRqcszNH24vmTLz/Rb9L1KQVmRt87fSpMHGZ2o=; b=V2csij8th0qisiLQ38OQgnuRFAHmLg+rlMew9IJx+apmjzbWJ+eZZGL7BY0tRiEGos Q72qDXl97pla0BfVu0aWXgttQ/7EdctRJub9w0J2SYdPUPBZiq24tDGhIk9yGVFU4LEo 6NLkPalu6LnachMVr5t2Ssc4PV2YyO9y2ohQl9j0J8tOUvOikzwPXXJxFBcyzQZog64x dRSYSqkPS41tQJIuuCVeJasK+1RB8CPVLQbkFPMyplIN8PRJ4XhChSKGb8jgEUCzE/ah us35g9j7oM2kblLPmEw7mXwzHa5NPcBtd3aJ7rnjqp1gxMkIjtBkJafbrGNKzS+ftsh+ oQ5g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id nw19si1631803ejb.586.2020.11.06.12.35.50; Fri, 06 Nov 2020 12:36:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728374AbgKFUbu (ORCPT + 99 others); Fri, 6 Nov 2020 15:31:50 -0500 Received: from mga02.intel.com ([134.134.136.20]:28719 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728343AbgKFUbu (ORCPT ); Fri, 6 Nov 2020 15:31:50 -0500 IronPort-SDR: CrL1qW8QXV5OYjXf+OT3cQ10CkNnUgdD0FnMpy19vP3JRrlLM9P/exKqwn+IB3/VpUXocybT7p UfU73kWyIYBQ== X-IronPort-AV: E=McAfee;i="6000,8403,9797"; a="156598889" X-IronPort-AV: E=Sophos;i="5.77,457,1596524400"; d="scan'208";a="156598889" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Nov 2020 12:31:49 -0800 IronPort-SDR: /JA9U5PSw7i9DRVQWtgfeKWF9CEinqTxMQFDQDLt/eU3JnhtwYfpFZcdPDlOa56UoknaQ/9esC ODJH/rcloQZg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,457,1596524400"; d="scan'208";a="306958458" Received: from otcwcpicx6.sc.intel.com ([172.25.55.29]) by fmsmga008.fm.intel.com with ESMTP; 06 Nov 2020 12:31:49 -0800 Date: Fri, 6 Nov 2020 20:31:49 +0000 From: Fenghua Yu To: Xiaoyao Li Cc: Thomas Gleixner , Borislav Petkov , Ingo Molnar , Peter Zijlstra , Randy Dunlap , Tony Luck , Christopherson Sean J , Ashok Raj , Ravi V Shankar , linux-kernel , x86 Subject: Re: [PATCH RFC v3 2/4] x86/bus_lock: Handle warn and fatal in #DB for bus lock Message-ID: <20201106203149.GA4097366@otcwcpicx6.sc.intel.com> References: <20201031002714.3649728-1-fenghua.yu@intel.com> <20201031002714.3649728-3-fenghua.yu@intel.com> <21d0415c-9af4-db18-8e65-410f6ab5ec68@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <21d0415c-9af4-db18-8e65-410f6ab5ec68@linux.intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Xiaoyao, On Tue, Nov 03, 2020 at 08:15:27PM +0800, Xiaoyao Li wrote: > On 10/31/2020 8:27 AM, Fenghua Yu wrote: > > diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c > > index 3c70fb34028b..1c3442000972 100644 > > --- a/arch/x86/kernel/traps.c > > +++ b/arch/x86/kernel/traps.c > > @@ -953,6 +953,13 @@ static __always_inline void exc_debug_user(struct pt_regs *regs, > > goto out_irq; > > } > > + /* > > + * Handle bus lock. #DB for bus lock can only be triggered from > > + * userspace. > > + */ > > + if (!(dr6 & DR_BUS_LOCK)) > > it should be > > if (dr6 & DR_BUS_LOCK) > > since you keep DR6.[bit 11] reserved in this version. bit 11 of > debug_read_clear_dr6() being set to 1 means bus lock detected. You are right. Will fix it in the next version. Thank you very much! -Fenghua