Merge branch 'x86-xsave-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 14 Aug 2014 00:20:04 +0000 (18:20 -0600)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 14 Aug 2014 00:20:04 +0000 (18:20 -0600)
Pull x86/xsave changes from Peter Anvin:
 "This is a patchset to support the XSAVES instruction required to
  support context switch of supervisor-only features in upcoming
  silicon.

  This patchset missed the 3.16 merge window, which is why it is based
  on 3.15-rc7"

* 'x86-xsave-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86, xsave: Add forgotten inline annotation
  x86/xsaves: Clean up code in xstate offsets computation in xsave area
  x86/xsave: Make it clear that the XSAVE macros use (%edi)/(%rdi)
  Define kernel API to get address of each state in xsave area
  x86/xsaves: Enable xsaves/xrstors
  x86/xsaves: Call booting time xsaves and xrstors in setup_init_fpu_buf
  x86/xsaves: Save xstate to task's xsave area in __save_fpu during booting time
  x86/xsaves: Add xsaves and xrstors support for booting time
  x86/xsaves: Clear reserved bits in xsave header
  x86/xsaves: Use xsave/xrstor for saving and restoring user space context
  x86/xsaves: Use xsaves/xrstors for context switch
  x86/xsaves: Use xsaves/xrstors to save and restore xsave area
  x86/xsaves: Define a macro for handling xsave/xrstor instruction fault
  x86/xsaves: Define macros for xsave instructions
  x86/xsaves: Change compacted format xsave area header
  x86/alternative: Add alternative_input_2 to support alternative with two features and input
  x86/xsaves: Add a kernel parameter noxsaves to disable xsaves/xrstors

1  2 
Documentation/kernel-parameters.txt
arch/x86/include/asm/fpu-internal.h
arch/x86/include/asm/processor.h
arch/x86/kernel/cpu/common.c

index a8eb6afce6a412a80ce576911bc17b20294891d6,0ebd95252c3f8263288c19f279d47cd59abe9cdc..5ae8608ca9f58a6331cae454ae7a0c84ab2f6c47
@@@ -1,37 -1,27 +1,37 @@@
                            Kernel Parameters
                            ~~~~~~~~~~~~~~~~~
  
 -The following is a consolidated list of the kernel parameters as implemented
 -(mostly) by the __setup() macro and sorted into English Dictionary order
 -(defined as ignoring all punctuation and sorting digits before letters in a
 -case insensitive manner), and with descriptions where known.
 -
 -Module parameters for loadable modules are specified only as the
 -parameter name with optional '=' and value as appropriate, such as:
 -
 -      modprobe usbcore blinkenlights=1
 -
 -Module parameters for modules that are built into the kernel image
 -are specified on the kernel command line with the module name plus
 -'.' plus parameter name, with '=' and value if appropriate, such as:
 -
 -      usbcore.blinkenlights=1
 +The following is a consolidated list of the kernel parameters as
 +implemented by the __setup(), core_param() and module_param() macros
 +and sorted into English Dictionary order (defined as ignoring all
 +punctuation and sorting digits before letters in a case insensitive
 +manner), and with descriptions where known.
 +
 +The kernel parses parameters from the kernel command line up to "--";
 +if it doesn't recognize a parameter and it doesn't contain a '.', the
 +parameter gets passed to init: parameters with '=' go into init's
 +environment, others are passed as command line arguments to init.
 +Everything after "--" is passed as an argument to init.
 +
 +Module parameters can be specified in two ways: via the kernel command
 +line with a module name prefix, or via modprobe, e.g.:
 +
 +      (kernel command line) usbcore.blinkenlights=1
 +      (modprobe command line) modprobe usbcore blinkenlights=1
 +
 +Parameters for modules which are built into the kernel need to be
 +specified on the kernel command line.  modprobe looks through the
 +kernel command line (/proc/cmdline) and collects module parameters
 +when it loads a module, so the kernel command line can be used for
 +loadable modules too.
  
  Hyphens (dashes) and underscores are equivalent in parameter names, so
        log_buf_len=1M print-fatal-signals=1
  can also be entered as
        log-buf-len=1M print_fatal_signals=1
  
 +Double-quotes can be used to protect spaces in values, e.g.:
 +      param="spaces in here"
  
  This document may not be entirely up to date and comprehensive. The command
  "modinfo -p ${modulename}" shows a current list of all parameters of a loadable
@@@ -224,11 -214,6 +224,11 @@@ bytes respectively. Such letter suffixe
                        unusable.  The "log_buf_len" parameter may be useful
                        if you need to capture more output.
  
 +      acpi_force_table_verification   [HW,ACPI]
 +                      Enable table checksum verification during early stage.
 +                      By default, this is disabled due to x86 early mapping
 +                      size limitation.
 +
        acpi_irq_balance [HW,ACPI]
                        ACPI will balance active IRQs
                        default in APIC mode
                        This feature is enabled by default.
                        This option allows to turn off the feature.
  
 -      acpi_no_auto_ssdt       [HW,ACPI] Disable automatic loading of SSDT
 +      acpi_no_static_ssdt     [HW,ACPI]
 +                      Disable installation of static SSDTs at early boot time
 +                      By default, SSDTs contained in the RSDT/XSDT will be
 +                      installed automatically and they will appear under
 +                      /sys/firmware/acpi/tables.
 +                      This option turns off this feature.
 +                      Note that specifying this option does not affect
 +                      dynamic table installation which will install SSDT
 +                      tables to /sys/firmware/acpi/tables/dynamic.
  
        acpica_no_return_repair [HW, ACPI]
                        Disable AML predefined validation mechanism
                        possible to determine what the correct size should be.
                        This option provides an override for these situations.
  
 +      ca_keys=        [KEYS] This parameter identifies a specific key(s) on
 +                      the system trusted keyring to be used for certificate
 +                      trust validation.
 +                      format: { id:<keyid> | builtin }
 +
 +      cca=            [MIPS] Override the kernel pages' cache coherency
 +                      algorithm.  Accepted values range from 0 to 7
 +                      inclusive. See arch/mips/include/asm/pgtable-bits.h
 +                      for platform specific values (SB1, Loongson3 and
 +                      others).
 +
        ccw_timeout_log [S390]
                        See Documentation/s390/CommonIO for details.
  
                        Also note the kernel might malfunction if you disable
                        some critical bits.
  
 -      cma=nn[MG]      [ARM,KNL]
 -                      Sets the size of kernel global memory area for contiguous
 +      cma=nn[MG]@[start[MG][-end[MG]]]
 +                      [ARM,X86,KNL]
 +                      Sets the size of kernel global memory area for
 +                      contiguous memory allocations and optionally the
 +                      placement constraint by the physical address range of
                        memory allocations. For more information, see
                        include/linux/dma-contiguous.h
  
                        which are not unmapped.
  
        earlycon=       [KNL] Output early console device and options.
 +
                uart[8250],io,<addr>[,options]
                uart[8250],mmio,<addr>[,options]
                uart[8250],mmio32,<addr>[,options]
                        (mmio) or 32-bit (mmio32).
                        The options are the same as for ttyS, above.
  
 -      earlyprintk=    [X86,SH,BLACKFIN,ARM]
 +              pl011,<addr>
 +                      Start an early, polled-mode console on a pl011 serial
 +                      port at the specified address. The pl011 serial port
 +                      must already be setup and configured. Options are not
 +                      yet supported.
 +
 +              smh     Use ARM semihosting calls for early console.
 +
 +      earlyprintk=    [X86,SH,BLACKFIN,ARM,M68k]
                        earlyprintk=vga
                        earlyprintk=efi
                        earlyprintk=xen
                        that can be changed at run time by the
                        set_graph_function file in the debugfs tracing directory.
  
 +      ftrace_graph_notrace=[function-list]
 +                      [FTRACE] Do not trace from the functions specified in
 +                      function-list.  This list is a comma separated list of
 +                      functions that can be changed at run time by the
 +                      set_graph_notrace file in the debugfs tracing directory.
 +
        gamecon.map[2|3]=
                        [HW,JOY] Multisystem joystick and NES/SNES/PSX pad
                        support via parallel port (up to 5 devices per port)
                        Formats: { "ima" | "ima-ng" }
                        Default: "ima-ng"
  
 +      ima.ahash_minsize= [IMA] Minimum file size for asynchronous hash usage
 +                      Format: <min_file_size>
 +                      Set the minimal file size for using asynchronous hash.
 +                      If left unspecified, ahash usage is disabled.
 +
 +                      ahash performance varies for different data sizes on
 +                      different crypto accelerators. This option can be used
 +                      to achieve the best performance for a particular HW.
 +
 +      ima.ahash_bufsize= [IMA] Asynchronous hash buffer size
 +                      Format: <bufsize>
 +                      Set hashing buffer size. Default: 4k.
 +
 +                      ahash performance varies for different chunk sizes on
 +                      different crypto accelerators. This option can be used
 +                      to achieve best performance for particular HW.
 +
        init=           [KNL]
                        Format: <full_path>
                        Run specified binary instead of /sbin/init as init
                        for working out where the kernel is dying during
                        startup.
  
 +      initcall_blacklist=  [KNL] Do not execute a comma-separated list of
 +                      initcall functions.  Useful for debugging built-in
 +                      modules and initcalls.
 +
        initrd=         [BOOT] Specify the location of the initial ramdisk
  
        inport.irq=     [HW] Inport (ATI XL and Microsoft) busmouse driver
        ip=             [IP_PNP]
                        See Documentation/filesystems/nfs/nfsroot.txt.
  
 -      ip2=            [HW] Set IO/IRQ pairs for up to 4 IntelliPort boards
 -                      See comment before ip2_setup() in
 -                      drivers/char/ip2/ip2base.c.
 -
        irqfixup        [HW]
                        When an interrupt is not handled search all handlers
                        for it. Intended to get systems with badly broken
        js=             [HW,JOY] Analog joystick
                        See Documentation/input/joystick.txt.
  
 +      kaslr/nokaslr   [X86]
 +                      Enable/disable kernel and module base offset ASLR
 +                      (Address Space Layout Randomization) if built into
 +                      the kernel. When CONFIG_HIBERNATION is selected,
 +                      kASLR is disabled by default. When kASLR is enabled,
 +                      hibernation will be disabled.
 +
        keepinitrd      [HW,ARM]
  
        kernelcore=nn[KMG]      [KNL,X86,IA-64,PPC] This parameter
                        7 (KERN_DEBUG)          debug-level messages
  
        log_buf_len=n[KMG]      Sets the size of the printk ring buffer,
 -                      in bytes.  n must be a power of two.  The default
 -                      size is set in the kernel config file.
 +                      in bytes.  n must be a power of two and greater
 +                      than the minimal size. The minimal size is defined
 +                      by LOG_BUF_SHIFT kernel config parameter. There is
 +                      also CONFIG_LOG_CPU_MAX_BUF_SHIFT config parameter
 +                      that allows to increase the default size depending on
 +                      the number of CPUs. See init/Kconfig for more details.
  
        logo.nologo     [FB] Disables display of the built-in Linux logo.
                        This may be used to provide more screen space for
        noapic          [SMP,APIC] Tells the kernel to not make use of any
                        IOAPICs that may be present in the system.
  
 -      nokaslr         [X86]
 -                      Disable kernel and module base offset ASLR (Address
 -                      Space Layout Randomization) if built into the kernel.
 -
        noautogroup     Disable scheduler automatic task group creation.
  
        nobats          [PPC] Do not use BATs for mapping kernel lowmem
                        and restore using xsave. The kernel will fallback to
                        enabling legacy floating-point and sse state.
  
+       noxsaveopt      [X86] Disables xsaveopt used in saving x86 extended
+                       register states. The kernel will fall back to use
+                       xsave to save the states. By using this parameter,
+                       performance of saving the states is degraded because
+                       xsave doesn't support modified optimization while
+                       xsaveopt supports it on xsaveopt enabled systems.
+       noxsaves        [X86] Disables xsaves and xrstors used in saving and
+                       restoring x86 extended register state in compacted
+                       form of xsave area. The kernel will fall back to use
+                       xsaveopt and xrstor to save and restore the states
+                       in standard form of xsave area. By using this
+                       parameter, xsave area per process might occupy more
+                       memory on xsaves enabled systems.
        eagerfpu=       [X86]
                        on      enable eager fpu restore
                        off     disable eager fpu restore
                        in certain environments such as networked servers or
                        real-time systems.
  
 +      nohibernate     [HIBERNATION] Disable hibernation and resume.
 +
        nohz=           [KNL] Boottime enable/disable dynamic ticks
                        Valid arguments: on, off
                        Default: on
                        timeout < 0: reboot immediately
                        Format: <timeout>
  
 +      crash_kexec_post_notifiers
 +                      Run kdump after running panic-notifiers and dumping
 +                      kmsg. This only for the users who doubt kdump always
 +                      succeeds in any situation.
 +                      Note that this also increases risks of kdump failure,
 +                      because some panic notifiers can make the crashed
 +                      kernel more unstable.
 +
        parkbd.port=    [HW] Parallel port number the keyboard adapter is
                        connected to, default is 0.
                        Format: <parport#>
                        leaf rcu_node structure.  Useful for very large
                        systems.
  
 +      rcutree.jiffies_till_sched_qs= [KNL]
 +                      Set required age in jiffies for a
 +                      given grace period before RCU starts
 +                      soliciting quiescent-state help from
 +                      rcu_note_context_switch().
 +
        rcutree.jiffies_till_first_fqs= [KNL]
                        Set delay from grace-period initialization to
                        first attempt to force quiescent states.
                        quiescent states.  Units are jiffies, minimum
                        value is one, and maximum value is HZ.
  
 +      rcutree.rcu_nocb_leader_stride= [KNL]
 +                      Set the number of NOCB kthread groups, which
 +                      defaults to the square root of the number of
 +                      CPUs.  Larger numbers reduces the wakeup overhead
 +                      on the per-CPU grace-period kthreads, but increases
 +                      that same overhead on each group's leader.
 +
        rcutree.qhimark= [KNL]
                        Set threshold of queued RCU callbacks beyond which
                        batch limiting is disabled.
                        [KNL, SMP] Set scheduler's default relax_domain_level.
                        See Documentation/cgroups/cpusets.txt.
  
 +      relative_sleep_states=
 +                      [SUSPEND] Use sleep state labeling where the deepest
 +                      state available other than hibernation is always "mem".
 +                      Format: { "0" | "1" }
 +                      0 -- Traditional sleep state labels.
 +                      1 -- Relative sleep state labels.
 +
        reserve=        [KNL,BUGS] Force the kernel to ignore some iomem area
  
        reservetop=     [X86-32]
                noresume        Don't check if there's a hibernation image
                                present during boot.
                nocompress      Don't compress/decompress hibernation images.
 +              no              Disable hibernation and resume.
  
        retain_initrd   [RAM] Keep initrd memory after extraction
  
  
        S               [KNL] Run init in single mode
  
 +      s390_iommu=     [HW,S390]
 +                      Set s390 IOTLB flushing mode
 +              strict
 +                      With strict flushing every unmap operation will result in
 +                      an IOTLB flush. Default is lazy flushing before reuse,
 +                      which is faster.
 +
        sa1100ir        [NET]
                        See drivers/net/irda/sa1100_ir.c.
  
                        [KNL] Should the soft-lockup detector generate panics.
                        Format: <integer>
  
 +      softlockup_all_cpu_backtrace=
 +                      [KNL] Should the soft-lockup detector generate
 +                      backtraces on all cpus.
 +                      Format: <integer>
 +
        sonypi.*=       [HW] Sony Programmable I/O Control Device driver
                        See Documentation/laptops/sonypi.txt
  
                        Disables the ticketlock slowpath using Xen PV
                        optimizations.
  
 +      xen_nopv        [X86]
 +                      Disables the PV optimizations forcing the HVM guest to
 +                      run as generic HVM guest with no PV drivers.
 +
        xirc2ps_cs=     [NET,PCMCIA]
                        Format:
                        <irq>,<irq_mask>,<io>,<full_duplex>,<do_sound>,<lockup_hack>[,<irq2>[,<irq3>[,<irq4>]]]
index e3b85422cf127d38806a903ba6c2d0e6f664bf2f,6099c0e5b62e91a71f8ff5334e5f2690c83f59e4..412ececa00b957014a535e0a36d15ae108a88ffa
@@@ -87,22 -87,22 +87,22 @@@ static inline int is_x32_frame(void
  
  static __always_inline __pure bool use_eager_fpu(void)
  {
 -      return static_cpu_has(X86_FEATURE_EAGER_FPU);
 +      return static_cpu_has_safe(X86_FEATURE_EAGER_FPU);
  }
  
  static __always_inline __pure bool use_xsaveopt(void)
  {
 -      return static_cpu_has(X86_FEATURE_XSAVEOPT);
 +      return static_cpu_has_safe(X86_FEATURE_XSAVEOPT);
  }
  
  static __always_inline __pure bool use_xsave(void)
  {
 -      return static_cpu_has(X86_FEATURE_XSAVE);
 +      return static_cpu_has_safe(X86_FEATURE_XSAVE);
  }
  
  static __always_inline __pure bool use_fxsr(void)
  {
 -        return static_cpu_has(X86_FEATURE_FXSR);
 +      return static_cpu_has_safe(X86_FEATURE_FXSR);
  }
  
  static inline void fx_finit(struct i387_fxsave_struct *fx)
@@@ -293,7 -293,7 +293,7 @@@ static inline int restore_fpu_checking(
        /* AMD K7/K8 CPUs don't save/restore FDP/FIP/FOP unless an exception
           is pending.  Clear the x87 state here by setting it to fixed
           values. "m" is a random variable that should be in L1 */
 -      if (unlikely(static_cpu_has(X86_FEATURE_FXSAVE_LEAK))) {
 +      if (unlikely(static_cpu_has_bug_safe(X86_BUG_FXSAVE_LEAK))) {
                asm volatile(
                        "fnclex\n\t"
                        "emms\n\t"
@@@ -508,9 -508,12 +508,12 @@@ static inline void user_fpu_begin(void
  
  static inline void __save_fpu(struct task_struct *tsk)
  {
-       if (use_xsave())
-               xsave_state(&tsk->thread.fpu.state->xsave, -1);
-       else
+       if (use_xsave()) {
+               if (unlikely(system_state == SYSTEM_BOOTING))
+                       xsave_state_booting(&tsk->thread.fpu.state->xsave, -1);
+               else
+                       xsave_state(&tsk->thread.fpu.state->xsave, -1);
+       } else
                fpu_fxsave(&tsk->thread.fpu);
  }
  
index ee30b9f0b91c9d36f04bb4b13200a5d675e8a873,2c8d3b8e7fcb5accf936bca133ea37d53e14f9d1..eb71ec794732b98f09531054c37ecc19c5d94f52
@@@ -72,6 -72,7 +72,6 @@@ extern u16 __read_mostly tlb_lld_4k[NR_
  extern u16 __read_mostly tlb_lld_2m[NR_INFO];
  extern u16 __read_mostly tlb_lld_4m[NR_INFO];
  extern u16 __read_mostly tlb_lld_1g[NR_INFO];
 -extern s8  __read_mostly tlb_flushall_shift;
  
  /*
   *  CPU type and hardware bug flags. Kept separately for each CPU.
@@@ -385,8 -386,8 +385,8 @@@ struct bndcsr_struct 
  
  struct xsave_hdr_struct {
        u64 xstate_bv;
-       u64 reserved1[2];
-       u64 reserved2[5];
+       u64 xcomp_bv;
+       u64 reserved[6];
  } __attribute__((packed));
  
  struct xsave_struct {
@@@ -695,8 -696,6 +695,8 @@@ static inline void cpu_relax(void
        rep_nop();
  }
  
 +#define cpu_relax_lowlatency() cpu_relax()
 +
  /* Stop speculative execution and prefetching of modified code. */
  static inline void sync_core(void)
  {
index 333fd5209336d3df51e8ed676e4aa4b937a48b6b,cdc95852532d39370b61fbb154c5087d4646d788..e4ab2b42bd6f469528c73cac4ac0fb186b5bdbd3
@@@ -8,7 -8,6 +8,7 @@@
  #include <linux/delay.h>
  #include <linux/sched.h>
  #include <linux/init.h>
 +#include <linux/kprobes.h>
  #include <linux/kgdb.h>
  #include <linux/smp.h>
  #include <linux/io.h>
@@@ -21,7 -20,6 +21,7 @@@
  #include <asm/processor.h>
  #include <asm/debugreg.h>
  #include <asm/sections.h>
 +#include <asm/vsyscall.h>
  #include <linux/topology.h>
  #include <linux/cpumask.h>
  #include <asm/pgtable.h>
@@@ -148,6 -146,7 +148,7 @@@ static int __init x86_xsave_setup(char 
  {
        setup_clear_cpu_cap(X86_FEATURE_XSAVE);
        setup_clear_cpu_cap(X86_FEATURE_XSAVEOPT);
+       setup_clear_cpu_cap(X86_FEATURE_XSAVES);
        setup_clear_cpu_cap(X86_FEATURE_AVX);
        setup_clear_cpu_cap(X86_FEATURE_AVX2);
        return 1;
@@@ -161,6 -160,13 +162,13 @@@ static int __init x86_xsaveopt_setup(ch
  }
  __setup("noxsaveopt", x86_xsaveopt_setup);
  
+ static int __init x86_xsaves_setup(char *s)
+ {
+       setup_clear_cpu_cap(X86_FEATURE_XSAVES);
+       return 1;
+ }
+ __setup("noxsaves", x86_xsaves_setup);
  #ifdef CONFIG_X86_32
  static int cachesize_override = -1;
  static int disable_x86_serial_nr = 1;
@@@ -481,17 -487,26 +489,17 @@@ u16 __read_mostly tlb_lld_2m[NR_INFO]
  u16 __read_mostly tlb_lld_4m[NR_INFO];
  u16 __read_mostly tlb_lld_1g[NR_INFO];
  
 -/*
 - * tlb_flushall_shift shows the balance point in replacing cr3 write
 - * with multiple 'invlpg'. It will do this replacement when
 - *   flush_tlb_lines <= active_lines/2^tlb_flushall_shift.
 - * If tlb_flushall_shift is -1, means the replacement will be disabled.
 - */
 -s8  __read_mostly tlb_flushall_shift = -1;
 -
  void cpu_detect_tlb(struct cpuinfo_x86 *c)
  {
        if (this_cpu->c_detect_tlb)
                this_cpu->c_detect_tlb(c);
  
        printk(KERN_INFO "Last level iTLB entries: 4KB %d, 2MB %d, 4MB %d\n"
 -              "Last level dTLB entries: 4KB %d, 2MB %d, 4MB %d, 1GB %d\n"
 -              "tlb_flushall_shift: %d\n",
 +              "Last level dTLB entries: 4KB %d, 2MB %d, 4MB %d, 1GB %d\n",
                tlb_lli_4k[ENTRIES], tlb_lli_2m[ENTRIES],
                tlb_lli_4m[ENTRIES], tlb_lld_4k[ENTRIES],
                tlb_lld_2m[ENTRIES], tlb_lld_4m[ENTRIES],
 -              tlb_lld_1g[ENTRIES], tlb_flushall_shift);
 +              tlb_lld_1g[ENTRIES]);
  }
  
  void detect_ht(struct cpuinfo_x86 *c)
@@@ -955,38 -970,6 +963,38 @@@ static void vgetcpu_set_mode(void
        else
                vgetcpu_mode = VGETCPU_LSL;
  }
 +
 +/* May not be __init: called during resume */
 +static void syscall32_cpu_init(void)
 +{
 +      /* Load these always in case some future AMD CPU supports
 +         SYSENTER from compat mode too. */
 +      wrmsrl_safe(MSR_IA32_SYSENTER_CS, (u64)__KERNEL_CS);
 +      wrmsrl_safe(MSR_IA32_SYSENTER_ESP, 0ULL);
 +      wrmsrl_safe(MSR_IA32_SYSENTER_EIP, (u64)ia32_sysenter_target);
 +
 +      wrmsrl(MSR_CSTAR, ia32_cstar_target);
 +}
 +#endif
 +
 +#ifdef CONFIG_X86_32
 +void enable_sep_cpu(void)
 +{
 +      int cpu = get_cpu();
 +      struct tss_struct *tss = &per_cpu(init_tss, cpu);
 +
 +      if (!boot_cpu_has(X86_FEATURE_SEP)) {
 +              put_cpu();
 +              return;
 +      }
 +
 +      tss->x86_tss.ss1 = __KERNEL_CS;
 +      tss->x86_tss.sp1 = sizeof(struct tss_struct) + (unsigned long) tss;
 +      wrmsr(MSR_IA32_SYSENTER_CS, __KERNEL_CS, 0);
 +      wrmsr(MSR_IA32_SYSENTER_ESP, tss->x86_tss.sp1, 0);
 +      wrmsr(MSR_IA32_SYSENTER_EIP, (unsigned long) ia32_sysenter_target, 0);
 +      put_cpu();
 +}
  #endif
  
  void __init identify_boot_cpu(void)
@@@ -1194,7 -1177,6 +1202,7 @@@ int is_debug_stack(unsigned long addr
                (addr <= __get_cpu_var(debug_stack_addr) &&
                 addr > (__get_cpu_var(debug_stack_addr) - DEBUG_STKSZ));
  }
 +NOKPROBE_SYMBOL(is_debug_stack);
  
  DEFINE_PER_CPU(u32, debug_idt_ctr);
  
@@@ -1203,7 -1185,6 +1211,7 @@@ void debug_stack_set_zero(void
        this_cpu_inc(debug_idt_ctr);
        load_current_idt();
  }
 +NOKPROBE_SYMBOL(debug_stack_set_zero);
  
  void debug_stack_reset(void)
  {
        if (this_cpu_dec_return(debug_idt_ctr) == 0)
                load_current_idt();
  }
 +NOKPROBE_SYMBOL(debug_stack_reset);
  
  #else /* CONFIG_X86_64 */