1. 11 10月, 2007 1 次提交
  2. 03 5月, 2007 2 次提交
    • J
      [PATCH] i386: Fix UP gdt bugs · c5413fbe
      Jeremy Fitzhardinge 提交于
      Fixes two problems with the GDT when compiling for uniprocessor:
       - There's no percpu segment, so trying to load its selector into %fs fails.
         Use a null selector instead.
       - The real gdt needs to be loaded at some point.  Do it in cpu_init().
      Signed-off-by: NChris Wright <chrisw@sous-sol.org>
      Signed-off-by: NJeremy Fitzhardinge <jeremy@xensource.com>
      Signed-off-by: NAndi Kleen <ak@suse.de>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      c5413fbe
    • J
      [PATCH] i386: Convert PDA into the percpu section · 7c3576d2
      Jeremy Fitzhardinge 提交于
      Currently x86 (similar to x84-64) has a special per-cpu structure
      called "i386_pda" which can be easily and efficiently referenced via
      the %fs register.  An ELF section is more flexible than a structure,
      allowing any piece of code to use this area.  Indeed, such a section
      already exists: the per-cpu area.
      
      So this patch:
      (1) Removes the PDA and uses per-cpu variables for each current member.
      (2) Replaces the __KERNEL_PDA segment with __KERNEL_PERCPU.
      (3) Creates a per-cpu mirror of __per_cpu_offset called this_cpu_off, which
          can be used to calculate addresses for this CPU's variables.
      (4) Simplifies startup, because %fs doesn't need to be loaded with a
          special segment at early boot; it can be deferred until the first
          percpu area is allocated (or never for UP).
      
      The result is less code and one less x86-specific concept.
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: NJeremy Fitzhardinge <jeremy@xensource.com>
      Signed-off-by: NAndi Kleen <ak@suse.de>
      Cc: Andi Kleen <ak@suse.de>
      7c3576d2
  3. 13 2月, 2007 1 次提交
    • Z
      [PATCH] i386: Profile pc badness · 7b355202
      Zachary Amsden 提交于
      Profile_pc was broken when using paravirtualization because the
      assumption the kernel was running at CPL 0 was violated, causing
      bad logic to read a random value off the stack.
      
      The only way to be in kernel lock functions is to be in kernel
      code, so validate that assumption explicitly by checking the CS
      value.  We don't want to be fooled by BIOS / APM segments and
      try to read those stacks, so only match KERNEL_CS.
      
      I moved some stuff in segment.h to make it prettier.
      Signed-off-by: NZachary Amsden <zach@vmware.com>
      Signed-off-by: NAndi Kleen <ak@suse.de>
      7b355202
  4. 07 12月, 2006 2 次提交
    • R
      [PATCH] paravirt: header and stubs for paravirtualisation · d3561b7f
      Rusty Russell 提交于
      Create a paravirt.h header for all the critical operations which need to be
      replaced with hypervisor calls, and include that instead of defining native
      operations, when CONFIG_PARAVIRT.
      
      This patch does the dumbest possible replacement of paravirtualized
      instructions: calls through a "paravirt_ops" structure.  Currently these are
      function implementations of native hardware: hypervisors will override the ops
      structure with their own variants.
      
      All the pv-ops functions are declared "fastcall" so that a specific
      register-based ABI is used, to make inlining assember easier.
      
      And:
      
      +From: Andy Whitcroft <apw@shadowen.org>
      
      The paravirt ops introduce a 'weak' attribute onto memory_setup().
      Code ordering leads to the following warnings on x86:
      
          arch/i386/kernel/setup.c:651: warning: weak declaration of
                      `memory_setup' after first use results in unspecified behavior
      
      Move memory_setup() to avoid this.
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: NChris Wright <chrisw@sous-sol.org>
      Signed-off-by: NAndi Kleen <ak@suse.de>
      Cc: Jeremy Fitzhardinge <jeremy@goop.org>
      Cc: Zachary Amsden <zach@vmware.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NAndy Whitcroft <apw@shadowen.org>
      d3561b7f
    • J
      [PATCH] i386: Basic definitions for i386-pda · 9ca36101
      Jeremy Fitzhardinge 提交于
      This patch has the basic definitions of struct i386_pda, and the segment
      selector in the GDT.
      
      asm-i386/pda.h is more or less a direct copy of asm-x86_64/pda.h.  The most
      interesting difference is the use of _proxy_pda, which is used to give gcc a
      model for the actual memory operations on the real pda structure.  No actual
      reference is ever made to _proxy_pda, so it is never defined.
      Signed-off-by: NJeremy Fitzhardinge <jeremy@xensource.com>
      Signed-off-by: NAndi Kleen <ak@suse.de>
      Cc: Chuck Ebbert <76306.1226@compuserve.com>
      Cc: Zachary Amsden <zach@vmware.com>
      Cc: Jan Beulich <jbeulich@novell.com>
      Cc: Andi Kleen <ak@suse.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      9ca36101
  5. 26 9月, 2006 1 次提交
    • R
      [PATCH] i386: Allow a kernel not to be in ring 0 · 78be3706
      Rusty Russell 提交于
      We allow for the fact that the guest kernel may not run in ring 0.  This
      requires some abstraction in a few places when setting %cs or checking
      privilege level (user vs kernel).
      
      This is Chris' [RFC PATCH 15/33] move segment checks to subarch, except rather
      than using #define USER_MODE_MASK which depends on a config option, we use
      Zach's more flexible approach of assuming ring 3 == userspace.  I also used
      "get_kernel_rpl()" over "get_kernel_cs()" because I think it reads better in
      the code...
      
      1) Remove the hardcoded 3 and introduce #define SEGMENT_RPL_MASK 3 2) Add a
      get_kernel_rpl() macro, and don't assume it's zero.
      
      And:
      
      Clean up of patch for letting kernel run other than ring 0:
      
      a. Add some comments about the SEGMENT_IS_*_CODE() macros.
      b. Add a USER_RPL macro.  (Code was comparing a value to a mask
         in some places and to the magic number 3 in other places.)
      c. Add macros for table indicator field and use them.
      d. Change the entry.S tests for LDT stack segment to use the macros
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: NZachary Amsden <zach@vmware.com>
      Signed-off-by: NJeremy Fitzhardinge <jeremy@xensource.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NAndi Kleen <ak@suse.de>
      78be3706
  6. 07 1月, 2006 1 次提交
  7. 17 4月, 2005 1 次提交
    • L
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds 提交于
      Initial git repository build. I'm not bothering with the full history,
      even though we have it. We can create a separate "historical" git
      archive of that later if we want to, and in the meantime it's about
      3.2GB when imported into git - space that would just make the early
      git days unnecessarily complicated, when we don't have a lot of good
      infrastructure for it.
      
      Let it rip!
      1da177e4