x86/idt: Split idt_data setup out of set_intr_gate()
authorJoerg Roedel <jroedel@suse.de>
Mon, 7 Sep 2020 13:15:29 +0000 (15:15 +0200)
committerBorislav Petkov <bp@suse.de>
Mon, 7 Sep 2020 19:30:38 +0000 (21:30 +0200)
commit4bed2266cc6f9c3f6cd91378ea4fc76edde674cf
tree29522821292e9162d96f8c9112deab9205f606f4
parenta7de15d489d956217b47671705ac2218ca50eaae
x86/idt: Split idt_data setup out of set_intr_gate()

The code to setup idt_data is needed for early exception handling, but
set_intr_gate() can't be used that early because it has pv-ops in its
code path which don't work that early.

Split out the idt_data initialization part from set_intr_gate() so
that it can be used separately.

Signed-off-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Kees Cook <keescook@chromium.org>
Link: https://lkml.kernel.org/r/20200907131613.12703-29-joro@8bytes.org
arch/x86/kernel/idt.c