1. 15 11月, 2012 1 次提交
  2. 09 5月, 2012 1 次提交
  3. 20 4月, 2012 3 次提交
  4. 22 12月, 2011 1 次提交
    • S
      x86: Keep current stack in NMI breakpoints · 228bdaa9
      Steven Rostedt 提交于
      We want to allow NMI handlers to have breakpoints to be able to
      remove stop_machine from ftrace, kprobes and jump_labels. But if
      an NMI interrupts a current breakpoint, and then it triggers a
      breakpoint itself, it will switch to the breakpoint stack and
      corrupt the data on it for the breakpoint processing that it
      interrupted.
      
      Instead, have the NMI check if it interrupted breakpoint processing
      by checking if the stack that is currently used is a breakpoint
      stack. If it is, then load a special IDT that changes the IST
      for the debug exception to keep the same stack in kernel context.
      When the NMI is done, it puts it back.
      
      This way, if the NMI does trigger a breakpoint, it will keep
      using the same stack and not stomp on the breakpoint data for
      the breakpoint it interrupted.
      Suggested-by: NPeter Zijlstra <peterz@infradead.org>
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      228bdaa9
  5. 18 2月, 2011 1 次提交
    • H
      x86, trampoline: Common infrastructure for low memory trampolines · 4822b7fc
      H. Peter Anvin 提交于
      Common infrastructure for low memory trampolines.  This code installs
      the trampolines permanently in low memory very early.  It also permits
      multiple pieces of code to be used for this purpose.
      
      This code also introduces a standard infrastructure for computing
      symbol addresses in the trampoline code.
      
      The only change to the actual SMP trampolines themselves is that the
      64-bit trampoline has been made reusable -- the previous version would
      overwrite the code with a status variable; this moves the status
      variable to a separate location.
      Signed-off-by: NH. Peter Anvin <hpa@linux.intel.com>
      LKML-Reference: <4D5DFBE4.7090104@intel.com>
      Cc: Rafael J. Wysocki <rjw@sisk.pl>
      Cc: Matthieu Castet <castet.matthieu@free.fr>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      4822b7fc
  6. 22 7月, 2010 1 次提交
  7. 09 2月, 2010 1 次提交
  8. 26 11月, 2009 1 次提交
  9. 20 10月, 2009 1 次提交
    • S
      x86-64: preserve large page mapping for 1st 2MB kernel txt with CONFIG_DEBUG_RODATA · b9af7c0d
      Suresh Siddha 提交于
      In the first 2MB, kernel text is co-located with kernel static
      page tables setup by head_64.S.  CONFIG_DEBUG_RODATA chops this
      2MB large page mapping to small 4KB pages as we mark the kernel text as RO,
      leaving the static page tables as RW.
      
      With CONFIG_DEBUG_RODATA disabled, OLTP run on NHM-EP shows 1% improvement
      with 2% reduction in system time and 1% improvement in iowait idle time.
      
      To recover this, move the kernel static page tables to .data section, so that
      we don't have to break the first 2MB of kernel text to small pages with
      CONFIG_DEBUG_RODATA.
      Signed-off-by: NSuresh Siddha <suresh.b.siddha@intel.com>
      LKML-Reference: <20091014220254.063193621@sbs-t61.sc.intel.com>
      Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
      b9af7c0d
  10. 21 9月, 2009 1 次提交
  11. 19 9月, 2009 1 次提交
    • T
      x86: convert to use __HEAD and HEAD_TEXT macros. · 4ae59b91
      Tim Abbott 提交于
      This has the consequence of changing the section name use for head
      code from ".text.head" to ".head.text".  It also eliminates the
      ".text.head" output section (instead placing head code at the start of
      the .text output section), which should be harmless.
      
      This patch only changes the sections in the actual kernel, not those
      in the compressed boot loader.
      Signed-off-by: NTim Abbott <tabbott@ksplice.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
      4ae59b91
  12. 18 6月, 2009 1 次提交
  13. 25 2月, 2009 2 次提交
  14. 09 2月, 2009 1 次提交
  15. 20 1月, 2009 2 次提交
  16. 16 1月, 2009 4 次提交
    • T
      x86: make pda a percpu variable · b12d8db8
      Tejun Heo 提交于
      [ Based on original patch from Christoph Lameter and Mike Travis. ]
      
      As pda is now allocated in percpu area, it can easily be made a proper
      percpu variable.  Make it so by defining per cpu symbol from linker
      script and declaring it in C code for SMP and simply defining it for
      UP.  This change cleans up code and brings SMP and UP closer a bit.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      b12d8db8
    • T
      x86: fold pda into percpu area on SMP · 1a51e3a0
      Tejun Heo 提交于
      [ Based on original patch from Christoph Lameter and Mike Travis. ]
      
      Currently pdas and percpu areas are allocated separately.  %gs points
      to local pda and percpu area can be reached using pda->data_offset.
      This patch folds pda into percpu area.
      
      Due to strange gcc requirement, pda needs to be at the beginning of
      the percpu area so that pda->stack_canary is at %gs:40.  To achieve
      this, a new percpu output section macro - PERCPU_VADDR_PREALLOC() - is
      added and used to reserve pda sized chunk at the start of the percpu
      area.
      
      After this change, for boot cpu, %gs first points to pda in the
      data.init area and later during setup_per_cpu_areas() gets updated to
      point to the actual pda.  This means that setup_per_cpu_areas() need
      to reload %gs for CPU0 while clearing pda area for other cpus as cpu0
      already has modified it when control reaches setup_per_cpu_areas().
      
      This patch also removes now unnecessary get_local_pda() and its call
      sites.
      
      A lot of this patch is taken from Mike Travis' "x86_64: Fold pda into
      per cpu area" patch.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      1a51e3a0
    • T
      x86: load pointer to pda into %gs while brining up a CPU · f32ff538
      Tejun Heo 提交于
      [ Based on original patch from Christoph Lameter and Mike Travis. ]
      
      CPU startup code in head_64.S loaded address of a zero page into %gs
      for temporary use till pda is loaded but address to the actual pda is
      available at the point.  Load the real address directly instead.
      
      This will help unifying percpu and pda handling later on.
      
      This patch is mostly taken from Mike Travis' "x86_64: Fold pda into
      per cpu area" patch.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      f32ff538
    • T
      x86: make percpu symbols zerobased on SMP · 3e5d8f97
      Tejun Heo 提交于
      [ Based on original patch from Christoph Lameter and Mike Travis. ]
      
      This patch makes percpu symbols zerobased on x86_64 SMP by adding
      PERCPU_VADDR() to vmlinux.lds.h which helps setting explicit vaddr on
      the percpu output section and using it in vmlinux_64.lds.S.  A new
      PHDR is added as existing ones cannot contain sections near address
      zero.  PERCPU_VADDR() also adds a new symbol __per_cpu_load which
      always points to the vaddr of the loaded percpu data.init region.
      
      The following adjustments have been made to accomodate the address
      change.
      
      * code to locate percpu gdt_page in head_64.S is updated to add the
        load address to the gdt_page offset.
      
      * __per_cpu_load is used in places where access to the init data area
        is necessary.
      
      * pda->data_offset is initialized soon after C code is entered as zero
        value doesn't work anymore.
      
      This patch is mostly taken from Mike Travis' "x86_64: Base percpu
      variables at zero" patch.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      3e5d8f97
  17. 04 1月, 2009 1 次提交
  18. 11 10月, 2008 1 次提交
  19. 16 7月, 2008 3 次提交
  20. 08 7月, 2008 5 次提交
    • J
      x86: always set _PAGE_GLOBAL in _PAGE_KERNEL* flags · 8490638c
      Jeremy Fitzhardinge 提交于
      Consistently set _PAGE_GLOBAL in _PAGE_KERNEL flags.  This makes 32-
      and 64-bit code consistent, and removes some special cases where
      __PAGE_KERNEL* did not have _PAGE_GLOBAL set, causing confusion as a
      result of the inconsistencies.
      
      This patch only affects x86-64, which generally always supports PGD.
      The x86-32 patch is next.
      Signed-off-by: NJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
      Cc: Stephen Tweedie <sct@redhat.com>
      Cc: Eduardo Habkost <ehabkost@redhat.com>
      Cc: Mark McLoughlin <markmc@redhat.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      8490638c
    • J
      x86: fix CPA self-test for "x86/paravirt: groundwork for 64-bit Xen support" · cd5dce2f
      Jeremy Fitzhardinge 提交于
      Ingo Molnar wrote:
      > -tip auto-testing found pagetable corruption (CPA self-test failure):
      >
      > [   32.956015] CPA self-test:
      > [   32.958822]  4k 2048 large 508 gb 0 x 2556[ffff880000000000-ffff88003fe00000] miss 0
      > [   32.964000] CPA ffff88001d54e000: bad pte 1d4000e3
      > [   32.968000] CPA ffff88001d54e000: unexpected level 2
      > [   32.972000] CPA ffff880022c5d000: bad pte 22c000e3
      > [   32.976000] CPA ffff880022c5d000: unexpected level 2
      > [   32.980000] CPA ffff8800200ce000: bad pte 200000e3
      > [   32.984000] CPA ffff8800200ce000: unexpected level 2
      > [   32.988000] CPA ffff8800210f0000: bad pte 210000e3
      >
      > config and full log can be found at:
      >
      >  http://redhat.com/~mingo/misc/config-Mon_Jun_30_11_11_51_CEST_2008.bad
      >  http://redhat.com/~mingo/misc/log-Mon_Jun_30_11_11_51_CEST_2008.bad
      
      Phew.  OK, I've worked this out.  Short version is that's it's a false
      alarm, and there was no real failure here.  Long version:
      
          * I changed the code to create the physical mapping pagetables to
            reuse any existing mapping rather than replace it.   Specifically,
            reusing an pud pointed to by the pgd caused this symptom to appear.
          * The specific PUD being reused is the one created statically in
            head_64.S, which creates an initial 1GB mapping.
          * That mapping doesn't have _PAGE_GLOBAL set on it, due to the
            inconsistency between __PAGE_* and PAGE_*.
          * The CPA test attempts to clear _PAGE_GLOBAL, and then checks to
            see that the resulting range is 1) shattered into 4k pages, and 2)
            has no _PAGE_GLOBAL.
          * However, since it didn't have _PAGE_GLOBAL on that range to start
            with, change_page_attr_clear() had nothing to do, and didn't
            bother shattering the range,
          * resulting in the reported messages
      
      The simple fix is to set _PAGE_GLOBAL in level2_ident_pgt.
      
      An additional fix to make CPA testing more robust by using some other
      pagetable bit (one of the unused available-to-software ones).  This
      would solve spurious CPA test warnings under Xen which uses _PAGE_GLOBAL
      for its own purposes (ie, not under guest control).
      
      Also, we should revisit the use of _PAGE_GLOBAL in asm-x86/pgtable.h,
      and use it consistently, and drop MAKE_GLOBAL.  The first time I
      proposed it it caused breakages in the very early CPA code; with luck
      that's all fixed now.
      Signed-off-by: NJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
      Cc: Nick Piggin <npiggin@suse.de>
      Cc: Mark McLoughlin <markmc@redhat.com>
      Cc: xen-devel <xen-devel@lists.xensource.com>
      Cc: Eduardo Habkost <ehabkost@redhat.com>
      Cc: Vegard Nossum <vegard.nossum@gmail.com>
      Cc: Stephen Tweedie <sct@redhat.com>
      Cc: Yinghai Lu <yhlu.kernel@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      cd5dce2f
    • E
      paravirt/x86, 64-bit: move __PAGE_OFFSET to leave a space for hypervisor · a6523748
      Eduardo Habkost 提交于
      Set __PAGE_OFFSET to the most negative possible address +
      16*PGDIR_SIZE.  The gap is to allow a space for a hypervisor to fit.
      The gap is more or less arbitrary, but it's what Xen needs.
      
      When booting native, kernel/head_64.S has a set of compile-time
      generated pagetables used at boot time.  This patch removes their
      absolutely hard-coded layout, and makes it parameterised on
      __PAGE_OFFSET (and __START_KERNEL_map).
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      Signed-off-by: NJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
      Cc: xen-devel <xen-devel@lists.xensource.com>
      Cc: Stephen Tweedie <sct@redhat.com>
      Cc: Eduardo Habkost <ehabkost@redhat.com>
      Cc: Mark McLoughlin <markmc@redhat.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      a6523748
    • G
      x86: move x86_64 gdt closer to i386 · a939098a
      Glauber Costa 提交于
      i386 and x86_64 used two different schemes for maintaining the gdt.
      With this patch, x86_64 initial gdt table is defined in a .c file,
      same way as i386 is now. Also, we call it "gdt_page", and the descriptor,
      "early_gdt_descr". This way we achieve common naming, which can allow for
      more code integration.
      Signed-off-by: NGlauber Costa <gcosta@redhat.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      a939098a
    • G
      x86: use stack_start in x86_64 · 9cf4f298
      Glauber Costa 提交于
      call x86_64's init_rsp stack_start, just as i386 does.
      Put a zeroed stack segment for consistency. With this,
      we can eliminate one ugly ifdef in smpboot.c.
      Signed-off-by: NGlauber Costa <gcosta@redhat.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      9cf4f298
  21. 05 7月, 2008 1 次提交
  22. 25 5月, 2008 3 次提交
  23. 17 4月, 2008 3 次提交