lkml.org 
[lkml]   [2020]   [Feb]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subject[patch 00/10] x86/entry: Consolidation - Part I
Hi!

This is the first batch of a 73 patches series which consolidates the x86
entry code.

This work started off as a trivial 5 patches series moving the heavy
lifting of POSIX CPU timers out of interrupt context into thread/process
context. This discovered that KVM is lacking to handle pending work items
before entering guest mode and added the handling to the x86 KVM
code. Review requested to make this a generic infrastructure.

The next series grew to 25 patches implementing the generic infrastructure,
converting x86 (and as a POC ARM64) over, but it turned out that this was
slightly incomplete and still had some entanglement with the rest of the
x86 entry code as some of that functionality is shared between syscall and
interrupt entry/exit. And it also unearthed the nastyness of IOPL which got
already addressed in mainline.

This series addresses these issues in order to prepare for making the entry
from userspace and exit to userspace (and it's counterpart enter guest) a
generic infrastructure in order to restrict the necessary ASM work to the
bare minimum.

The series is split into 5 parts:

- General cleanups and bugfixes

- Consolidation of the syscall entry/exit code

- Autogenerate simple exception/trap code and reduce the difference
between 32 and 64 bit

- Autogenerate complex exception/trap code and provide different entry
points for #DB and #MC exceptions which allows to address the
recently discovered RCU vs. world issues in a more structured way

- Convert the device interrupt entry code to use the same mechanism as
exceptions and traps and finally convert the system vectors over as
well. The last step after all those cleanups is to move the return
from exception/interrupt logic (user mode work, kernel preemption)
completely from ASM into C-code, so the ASM code just has to take
care about returning from the exception, which is horrible and
convoluted enough already.

At the end the x86 entry code is ready to move the syscall parts out into
generic code and finally tackle the initial problem which started all of
this.

The complete series is available from git:

git://git.kernel.org/pub/scm/linux/kernel/git/tglx/devel.git x86/entry

which contains all 73 patches. The individual parts are tagged, so this
part can be retrieved via:

git://git.kernel.org/pub/scm/linux/kernel/git/tglx/devel.git entry-v1-part1

Thanks,

tglx

8<---------------
entry/entry_32.S | 19 +++++++------------
include/asm/irq.h | 2 +-
include/asm/mce.h | 3 ---
include/asm/traps.h | 17 +++++++----------
kernel/cpu/mce/core.c | 12 ++++++++++--
kernel/cpu/mce/internal.h | 3 +++
kernel/irq.c | 3 +--
kernel/traps.c | 41 ++++++++++++++++++++++++++++++++++-------
8 files changed, 63 insertions(+), 37 deletions(-)

\
 
 \ /
  Last update: 2020-02-26 00:31    [W:0.165 / U:0.976 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site