From: Lai Jiangshan <laijs@linux.alibaba.com>
To: linux-kernel@vger.kernel.org
Cc: Lai Jiangshan <laijs@linux.alibaba.com>,
Andy Lutomirski <luto@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Thomas Gleixner <tglx@linutronix.de>,
x86@kernel.org
Subject: [PATCH 0/2] x86/entry: simplify RESTORE_CR3
Date: Tue, 26 May 2020 04:35:05 +0000 [thread overview]
Message-ID: <20200526043507.51977-1-laijs@linux.alibaba.com> (raw)
When I searched percpu data touched by entry code for #DB
protection[1], it seems to me RESTORE_CR3() does too much work,
this patchset simplifies it.
Patch 1 enhances 21e944591102("x86/mm: Optimize RESTORE_CR3") for
kernel CR3.
Patch 2 *reverts* 21e944591102("x86/mm: Optimize RESTORE_CR3") for
User CR3.
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: x86@kernel.org
Link: https://lore.kernel.org/lkml/20200525145102.122557-1-laijs@linux.alibaba.com
Lai Jiangshan (2):
x86/entry: Don't write to CR3 when restoring to kernel CR3
x86/entry: always flush user CR3 in RESTORE_CR3
arch/x86/entry/calling.h | 36 ++++++++----------------------------
arch/x86/entry/entry_64.S | 6 +++---
2 files changed, 11 insertions(+), 31 deletions(-)
--
2.20.1
next reply other threads:[~2020-05-26 4:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-26 4:35 Lai Jiangshan [this message]
2020-05-26 4:35 ` [PATCH 1/2] x86/entry: Don't write to CR3 when restoring to kernel CR3 Lai Jiangshan
2020-05-26 4:35 ` [PATCH 2/2] x86/entry: always flush user CR3 in RESTORE_CR3 Lai Jiangshan
2020-05-29 18:17 ` [PATCH 0/2] x86/entry: simplify RESTORE_CR3 Andy Lutomirski
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=20200526043507.51977-1-laijs@linux.alibaba.com \
--to=laijs@linux.alibaba.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.