Merge tag 'libnvdimm-for-4.3' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm...
[cascardo/linux.git] / arch / x86 / Kconfig
index ef4c6bb..cc0d73e 100644 (file)
@@ -42,6 +42,7 @@ config X86
        select ARCH_USE_CMPXCHG_LOCKREF         if X86_64
        select ARCH_USE_QUEUED_RWLOCKS
        select ARCH_USE_QUEUED_SPINLOCKS
+       select ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH if SMP
        select ARCH_WANTS_DYNAMIC_TASK_STRUCT
        select ARCH_WANT_FRAME_POINTERS
        select ARCH_WANT_IPC_PARSE_VERSION      if X86_32
@@ -134,7 +135,7 @@ config X86
        select HAVE_PERF_USER_STACK_DUMP
        select HAVE_REGS_AND_STACK_ACCESS_API
        select HAVE_SYSCALL_TRACEPOINTS
-       select HAVE_UID16                       if X86_32
+       select HAVE_UID16                       if X86_32 || IA32_EMULATION
        select HAVE_UNSTABLE_SCHED_CLOCK
        select HAVE_USER_RETURN_NOTIFIER
        select IRQ_FORCED_THREADING
@@ -956,6 +957,7 @@ config X86_REROUTE_FOR_BROKEN_BOOT_IRQS
 
 config X86_MCE
        bool "Machine Check / overheating reporting"
+       select GENERIC_ALLOCATOR
        default y
        ---help---
          Machine Check support allows the processor to notify the
@@ -1003,19 +1005,41 @@ config X86_THERMAL_VECTOR
        def_bool y
        depends on X86_MCE_INTEL
 
-config VM86
-       bool "Enable VM86 support" if EXPERT
-       default y
+config X86_LEGACY_VM86
+       bool "Legacy VM86 support (obsolete)"
+       default n
        depends on X86_32
        ---help---
-         This option is required by programs like DOSEMU to run
-         16-bit real mode legacy code on x86 processors. It also may
-         be needed by software like XFree86 to initialize some video
-         cards via BIOS. Disabling this option saves about 6K.
+         This option allows user programs to put the CPU into V8086
+         mode, which is an 80286-era approximation of 16-bit real mode.
+
+         Some very old versions of X and/or vbetool require this option
+         for user mode setting.  Similarly, DOSEMU will use it if
+         available to accelerate real mode DOS programs.  However, any
+         recent version of DOSEMU, X, or vbetool should be fully
+         functional even without kernel VM86 support, as they will all
+         fall back to (pretty well performing) software emulation.
+
+         Anything that works on a 64-bit kernel is unlikely to need
+         this option, as 64-bit kernels don't, and can't, support V8086
+         mode.  This option is also unrelated to 16-bit protected mode
+         and is not needed to run most 16-bit programs under Wine.
+
+         Enabling this option adds considerable attack surface to the
+         kernel and slows down system calls and exception handling.
+
+         Unless you use very old userspace or need the last drop of
+         performance in your real mode DOS games and can't use KVM,
+         say N here.
+
+config VM86
+       bool
+       default X86_LEGACY_VM86
 
 config X86_16BIT
        bool "Enable support for 16-bit segments" if EXPERT
        default y
+       depends on MODIFY_LDT_SYSCALL
        ---help---
          This option is required by programs like Wine to run 16-bit
          protected mode legacy code on x86 processors.  Disabling
@@ -1514,6 +1538,7 @@ config X86_RESERVE_LOW
 
 config MATH_EMULATION
        bool
+       depends on MODIFY_LDT_SYSCALL
        prompt "Math emulation" if X86_32
        ---help---
          Linux can emulate a math coprocessor (used for floating point
@@ -2058,6 +2083,22 @@ config CMDLINE_OVERRIDE
          This is used to work around broken boot loaders.  This should
          be set to 'N' under normal conditions.
 
+config MODIFY_LDT_SYSCALL
+       bool "Enable the LDT (local descriptor table)" if EXPERT
+       default y
+       ---help---
+         Linux can allow user programs to install a per-process x86
+         Local Descriptor Table (LDT) using the modify_ldt(2) system
+         call.  This is required to run 16-bit or segmented code such as
+         DOSEMU or some Wine programs.  It is also used by some very old
+         threading libraries.
+
+         Enabling this feature adds a small amount of overhead to
+         context switches and increases the low-level kernel attack
+         surface.  Disabling it removes the modify_ldt(2) system call.
+
+         Saying 'N' here may make sense for embedded or server kernels.
+
 source "kernel/livepatch/Kconfig"
 
 endmenu
@@ -2527,7 +2568,7 @@ config IA32_EMULATION
        depends on X86_64
        select BINFMT_ELF
        select COMPAT_BINFMT_ELF
-       select HAVE_UID16
+       select ARCH_WANT_OLD_COMPAT_IPC
        ---help---
          Include code to run legacy 32-bit programs under a
          64-bit kernel. You should likely turn this on, unless you're
@@ -2541,7 +2582,7 @@ config IA32_AOUT
 
 config X86_X32
        bool "x32 ABI for 64-bit mode"
-       depends on X86_64 && IA32_EMULATION
+       depends on X86_64
        ---help---
          Include code to run binaries for the x32 native 32-bit ABI
          for 64-bit processors.  An x32 process gets access to the
@@ -2555,7 +2596,6 @@ config X86_X32
 config COMPAT
        def_bool y
        depends on IA32_EMULATION || X86_X32
-       select ARCH_WANT_OLD_COMPAT_IPC
 
 if COMPAT
 config COMPAT_FOR_U64_ALIGNMENT