From: Peter Zijlstra <peterz@infradead.org>
To: Fenghua Yu <fenghua.yu@intel.com>
Cc: Thomas Gleixner <tglx@linutronix.de>,
Borislav Petkov <bp@alien8.de>, Ingo Molnar <mingo@redhat.com>,
Tony Luck <tony.luck@intel.com>,
Randy Dunlap <rdunlap@infradead.org>,
Xiaoyao Li <xiaoyao.li@intel.com>,
Ravi V Shankar <ravi.v.shankar@intel.com>,
linux-kernel <linux-kernel@vger.kernel.org>, x86 <x86@kernel.org>
Subject: Re: [PATCH v2 2/4] x86/bus_lock: Handle warn and fatal in #DB for bus lock
Date: Tue, 17 Nov 2020 13:24:55 +0100 [thread overview]
Message-ID: <20201117122455.GG3121406@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <20201111192048.2602065-3-fenghua.yu@intel.com>
On Wed, Nov 11, 2020 at 07:20:46PM +0000, Fenghua Yu wrote:
> #DB for bus lock is enabled by bus lock detection bit 2 in DEBUGCTL MSR
> while #AC for split lock is enabled by split lock detection bit 29 in
> TEST_CTRL MSR.
>
> Delivery of #DB for bus lock in userspace clears DR6[11]. To avoid
> confusion in identifying #DB, #DB handler sets the bit to 1 before
> returning to the interrupted task.
>
> Use the existing kernel command line option "split_lock_detect=" to handle
> #DB for bus lock:
>
> split_lock_detect=
> #AC for split lock #DB for bus lock
>
> off Do nothing Do nothing
>
> warn Kernel OOPs Warn once per task and
> Warn once per task and and continues to run.
> disable future checking When both features are
> supported, warn in #DB
>
> fatal Kernel OOPs Send SIGBUS to user
> Send SIGBUS to user
> When both features are
> supported, fatal in #AC.
>
> Default option is "warn".
>
> Hardware only generates #DB for bus lock detect when CPL>0 to avoid
> nested #DB from multiple bus locks while the first #DB is being handled.
> So no need to handle #DB for bus lock detected in the kernel.
>
> Signed-off-by: Fenghua Yu <fenghua.yu@intel.com>
> Reviewed-by: Tony Luck <tony.luck@intel.com>
Sane enough I suppose,
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
The one thing I found still missing is a better description of the
things tickling SLD vs BLD. IIRC BLD detects a wider range of issues.
Therefore it _might_ make sense to allow SLD && BLD when fatal, instead
of only SLD.
Still, that's nitpicking.
next prev parent reply other threads:[~2020-11-17 12:25 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-11 19:20 [PATCH v2 0/4] x86/bus_lock: Enable bus lock detection Fenghua Yu
2020-11-11 19:20 ` [PATCH v2 1/4] x86/cpufeatures: Enumerate #DB for " Fenghua Yu
2020-11-11 19:20 ` [PATCH v2 2/4] x86/bus_lock: Handle warn and fatal in #DB for bus lock Fenghua Yu
2020-11-17 12:24 ` Peter Zijlstra [this message]
2020-11-19 22:23 ` Yu, Fenghua
2020-11-11 19:20 ` [PATCH v2 3/4] x86/bus_lock: Set rate limit " Fenghua Yu
2020-11-11 19:20 ` [PATCH v2 4/4] Documentation/admin-guide: Change doc for split_lock_detect parameter Fenghua Yu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201117122455.GG3121406@hirez.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=bp@alien8.de \
--cc=fenghua.yu@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=ravi.v.shankar@intel.com \
--cc=rdunlap@infradead.org \
--cc=tglx@linutronix.de \
--cc=tony.luck@intel.com \
--cc=x86@kernel.org \
--cc=xiaoyao.li@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®