Skip to content

x86/entry: simplify RESTORE_CR3

Lai Jiangshan lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2x86/entry: Don't write to CR3 when restoring to kernel CR3arch/x86/entry/calling.h+4 -90 replies
2/2x86/entry: always flush user CR3 in RESTORE_CR3arch/x86/entry/calling.h arch/x86/entry/entry_64.S+9 -240 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] x86/entry: simplify RESTORE_CR3

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.

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(-)
Signature · 1 line
2.20.1