Commit b51cc5d0 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'x86-cleanups-2024-01-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 cleanups from Ingo Molnar:

 - Change global variables to local

 - Add missing kernel-doc function parameter descriptions

 - Remove unused parameter from a macro

 - Remove obsolete Kconfig entry

 - Fix comments

 - Fix typos, mostly scripted, manually reviewed

and a micro-optimization got misplaced as a cleanup:

 - Micro-optimize the asm code in secondary_startup_64_no_verify()

* tag 'x86-cleanups-2024-01-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  arch/x86: Fix typos
  x86/head_64: Use TESTB instead of TESTL in secondary_startup_64_no_verify()
  x86/docs: Remove reference to syscall trampoline in PTI
  x86/Kconfig: Remove obsolete config X86_32_SMP
  x86/io: Remove the unused 'bw' parameter from the BUILDIO() macro
  x86/mtrr: Document missing function parameters in kernel-doc
  x86/setup: Make relocated_ramdisk a local variable of relocate_initrd()
parents 42c371f8 54aa699e
Loading
Loading
Loading
Loading
+4 −6
Original line number Diff line number Diff line
@@ -81,11 +81,9 @@ this protection comes at a cost:
     and exit (it can be skipped when the kernel is interrupted,
     though.)  Moves to CR3 are on the order of a hundred
     cycles, and are required at every entry and exit.
  b. A "trampoline" must be used for SYSCALL entry.  This
     trampoline depends on a smaller set of resources than the
     non-PTI SYSCALL entry code, so requires mapping fewer
     things into the userspace page tables.  The downside is
     that stacks must be switched at entry time.
  b. Percpu TSS is mapped into the user page tables to allow SYSCALL64 path
     to work under PTI. This doesn't have a direct runtime cost but it can
     be argued it opens certain timing attack scenarios.
  c. Global pages are disabled for all kernel structures not
     mapped into both kernel and userspace page tables.  This
     feature of the MMU allows different processes to share TLB
@@ -167,7 +165,7 @@ that are worth noting here.
 * Failures of the selftests/x86 code.  Usually a bug in one of the
   more obscure corners of entry_64.S
 * Crashes in early boot, especially around CPU bringup.  Bugs
   in the trampoline code or mappings cause these.
   in the mappings cause these.
 * Crashes at the first interrupt.  Caused by bugs in entry_64.S,
   like screwing up a page table switch.  Also caused by
   incorrectly mapping the IRQ handler entry code.
+0 −4
Original line number Diff line number Diff line
@@ -384,10 +384,6 @@ config HAVE_INTEL_TXT
	def_bool y
	depends on INTEL_IOMMU && ACPI

config X86_32_SMP
	def_bool y
	depends on X86_32 && SMP

config X86_64_SMP
	def_bool y
	depends on X86_64 && SMP
+1 −1
Original line number Diff line number Diff line
@@ -53,7 +53,7 @@ KBUILD_CFLAGS += -D__DISABLE_EXPORTS
KBUILD_CFLAGS += $(call cc-option,-Wa$(comma)-mrelax-relocations=no)
KBUILD_CFLAGS += -include $(srctree)/include/linux/hidden.h

# sev.c indirectly inludes inat-table.h which is generated during
# sev.c indirectly includes inat-table.h which is generated during
# compilation and stored in $(objtree). Add the directory to the includes so
# that the compiler finds it even with out-of-tree builds (make O=/some/path).
CFLAGS_sev.o += -I$(objtree)/arch/x86/lib/
+1 −1
Original line number Diff line number Diff line
@@ -8,7 +8,7 @@

/*
 * accept_memory() and process_unaccepted_memory() called from EFI stub which
 * runs before decompresser and its early_tdx_detect().
 * runs before decompressor and its early_tdx_detect().
 *
 * Enumerate TDX directly from the early users.
 */
+1 −1
Original line number Diff line number Diff line
@@ -887,7 +887,7 @@ void __init tdx_early_init(void)
	 * there.
	 *
	 * Intel-TDX has a secure RDMSR hypercall, but that needs to be
	 * implemented seperately in the low level startup ASM code.
	 * implemented separately in the low level startup ASM code.
	 * Until that is in place, disable parallel bringup for TDX.
	 */
	x86_cpuinit.parallel_bringup = false;
Loading