1. 31 10月, 2008 2 次提交
  2. 16 10月, 2008 1 次提交
    • Y
      x86: make 32bit support per_cpu vector · 497c9a19
      Yinghai Lu 提交于
      so we can merge io_apic_32.c and io_apic_64.c
      
      v2: Use cpu_online_map as target cpus for bigsmp, just like 64-bit is doing.
      
      Also remove some unused TARGET_CPUS macro.
      
      v3: need to check if desc is null in smp_irq_move_cleanup
      
      also migration needs to reset vector too, so copy __target_IO_APIC_irq
      from 64bit.
      
      (the duplication will go away once the two files are unified.)
      Signed-off-by: NYinghai Lu <yhlu.kernel@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      497c9a19
  3. 29 7月, 2008 1 次提交
  4. 20 7月, 2008 1 次提交
  5. 19 7月, 2008 1 次提交
  6. 18 7月, 2008 1 次提交
    • M
      x86: APIC: remove apic_write_around(); use alternatives · 593f4a78
      Maciej W. Rozycki 提交于
      Use alternatives to select the workaround for the 11AP Pentium erratum
      for the affected steppings on the fly rather than build time.  Remove the
      X86_GOOD_APIC configuration option and replace all the calls to
      apic_write_around() with plain apic_write(), protecting accesses to the
      ESR as appropriate due to the 3AP Pentium erratum.  Remove
      apic_read_around() and all its invocations altogether as not needed.
      Remove apic_write_atomic() and all its implementing backends.  The use of
      ASM_OUTPUT2() is not strictly needed for input constraints, but I have
      used it for readability's sake.
      
      I had the feeling no one else was brave enough to do it, so I went ahead
      and here it is.  Verified by checking the generated assembly and tested
      with both a 32-bit and a 64-bit configuration, also with the 11AP
      "feature" forced on and verified with gdb on /proc/kcore to work as
      expected (as an 11AP machines are quite hard to get hands on these days).
      Some script complained about the use of "volatile", but apic_write() needs
      it for the same reason and is effectively a replacement for writel(), so I
      have disregarded it.
      
      I am not sure what the policy wrt defconfig files is, they are generated
      and there is risk of a conflict resulting from an unrelated change, so I
      have left changes to them out.  The option will get removed from them at
      the next run.
      
      Some testing with machines other than mine will be needed to avoid some
      stupid mistake, but despite its volume, the change is not really that
      intrusive, so I am fairly confident that because it works for me, it will
      everywhere.
      Signed-off-by: NMaciej W. Rozycki <macro@linux-mips.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      593f4a78
  7. 12 7月, 2008 1 次提交
  8. 09 7月, 2008 1 次提交
  9. 08 7月, 2008 1 次提交
  10. 31 5月, 2008 1 次提交
  11. 30 5月, 2008 1 次提交
  12. 17 4月, 2008 1 次提交
  13. 28 3月, 2008 1 次提交
  14. 11 3月, 2008 2 次提交
    • R
      lguest: Revert 1ce70c4f, fix real problem. · 4357bd94
      Rusty Russell 提交于
      Ahmed managed to crash the Host in release_pgd(), which cannot be a Guest
      bug, and indeed it wasn't.
      
      The bug was that handing a 0 as the address of the toplevel page table
      being manipulated can cause the lookup code in find_pgdir() to return
      an uninitialized cache entry (we shadow up to 4 top level page tables
      for each Guest).
      
      Commit 37cc8d7f introduced this
      behaviour in the Guest, uncovering the bug.
      
      The patch which he submitted (which removed the /4 from the index
      calculation) simply ensured that these high-indexed entries hit the
      early exit path of guest_set_pmd().  But you get lots of segfaults in
      guest userspace as the PMDs aren't being updated.
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      4357bd94
    • R
      lguest: Sanitize the lguest clock. · 3fabc55f
      Rusty Russell 提交于
      Now the TSC code handles a zero return from calculate_cpu_khz(),
      lguest can simply pass through the value it gets from the Host: if
      non-zero, all the normal TSC code applies.
      
      Otherwise (or if the Host really doesn't support TSC), the clocksource
      code will fall back to the slower but reasonable lguest clock.
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      3fabc55f
  15. 26 2月, 2008 2 次提交
    • A
      x86/lguest: fix pgdir pmd index calculation · 1ce70c4f
      Ahmed S. Darwish 提交于
      Hi all,
      
      Beginning from commits close to v2.6.25-rc2, running lguest always oopses
      the host kernel. Oops is at [1].
      
      Bisection led to the following commit:
      
      commit 37cc8d7f
      
          x86/early_ioremap: don't assume we're using swapper_pg_dir
      
          At the early stages of boot, before the kernel pagetable has been
          fully initialized, a Xen kernel will still be running off the
          Xen-provided pagetables rather than swapper_pg_dir[].  Therefore,
          readback cr3 to determine the base of the pagetable rather than
          assuming swapper_pg_dir[].
      
       static inline pmd_t * __init early_ioremap_pmd(unsigned long addr)
       {
      -	pgd_t *pgd = &swapper_pg_dir[pgd_index(addr)];
      +	/* Don't assume we're using swapper_pg_dir at this point */
      +	pgd_t *base = __va(read_cr3());
      +	pgd_t *pgd = &base[pgd_index(addr)];
       	pud_t *pud = pud_offset(pgd, addr);
       	pmd_t *pmd = pmd_offset(pud, addr);
      
      Trying to analyze the problem, it seems on the guest side of lguest,
      %cr3 has a different value from &swapper_pg-dir (which
      is AFAIK fine on a pravirt guest):
      
      Putting some debugging messages in early_ioremap_pmd:
      
      /* Appears 3 times */
      [    0.000000] ***************************
      [    0.000000] __va(%cr3) = c0000000, &swapper_pg_dir = c02cc000
      [    0.000000] ***************************
      
      After 8 hours of debugging and staring on lguest code, I noticed something
      strange in paravirt_ops->set_pmd hypercall invocation:
      
      static void lguest_set_pmd(pmd_t *pmdp, pmd_t pmdval)
      {
      	*pmdp = pmdval;
      	lazy_hcall(LHCALL_SET_PMD, __pa(pmdp)&PAGE_MASK,
      		   (__pa(pmdp)&(PAGE_SIZE-1))/4, 0);
      }
      
      The first hcall parameter is global pgdir which looks fine. The second
      parameter is the pmd index in the pgdir which is suspectful.
      
      AFAIK, calculating the index of pmd does not need a divisoin over four.
      Removing the division made lguest work fine again . Patch is at [2].
      
      I am not sure why the division over four existed in the first place. It
      seems bogus, maybe the Xen patch just made the problem appear ?
      
      [2]: The patch:
      
      [PATCH] lguest: fix pgdir pmd index cacluation
      
      Remove an error in index calculation which leads to removing
      a not existing shadow page table (leading to a Null dereference).
      Signed-off-by: NAhmed S. Darwish <darwish.07@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      1ce70c4f
    • H
      lguest: include function prototypes · cbc34973
      Harvey Harrison 提交于
      Added a declaration to asm-x86/lguest.h and moved the extern arrays there
      as well.  As an alternative to including asm/lguest.h directly, an
      include could be put in linux/lguest.h
      Signed-off-by: NHarvey Harrison <harvey.harrison@gmail.com>
      Cc: "rusty@rustcorp.com.au" <rusty@rustcorp.com.au>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      cbc34973
  16. 30 1月, 2008 7 次提交
  17. 05 11月, 2007 2 次提交
  18. 25 10月, 2007 3 次提交
  19. 24 10月, 2007 1 次提交
  20. 23 10月, 2007 9 次提交