]> Pileus Git - ~andy/linux/commitdiff
Merge branch 'stable/bug.fixes' of git://oss.oracle.com/git/kwilk/xen
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 16 Sep 2011 18:28:11 +0000 (11:28 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 16 Sep 2011 18:28:11 +0000 (11:28 -0700)
* 'stable/bug.fixes' of git://oss.oracle.com/git/kwilk/xen:
  xen/i386: follow-up to "replace order-based range checking of M2P table by linear one"
  xen/irq: Alter the locking to use a mutex instead of a spinlock.
  xen/e820: if there is no dom0_mem=, don't tweak extra_pages.
  xen: disable PV spinlocks on HVM

1  2 
arch/x86/xen/mmu.c
arch/x86/xen/setup.c

diff --combined arch/x86/xen/mmu.c
index 20a6142750644442492dabdbbd6a55aaa75244a5,a3872f7632e880fb0a7e6312f5781e1df6ae1423..3dd53f997b11e768b72f11819c25d04ff39ff639
@@@ -1721,10 -1721,8 +1721,8 @@@ void __init xen_setup_machphys_mapping(
                machine_to_phys_nr = MACH2PHYS_NR_ENTRIES;
        }
  #ifdef CONFIG_X86_32
-       if ((machine_to_phys_mapping + machine_to_phys_nr)
-           < machine_to_phys_mapping)
-               machine_to_phys_nr = (unsigned long *)NULL
-                                    - machine_to_phys_mapping;
+       WARN_ON((machine_to_phys_mapping + (machine_to_phys_nr - 1))
+               < machine_to_phys_mapping);
  #endif
  }
  
@@@ -1920,7 -1918,6 +1918,7 @@@ static void xen_set_fixmap(unsigned idx
  # endif
  #else
        case VSYSCALL_LAST_PAGE ... VSYSCALL_FIRST_PAGE:
 +      case VVAR_PAGE:
  #endif
        case FIX_TEXT_POKE0:
        case FIX_TEXT_POKE1:
  #ifdef CONFIG_X86_64
        /* Replicate changes to map the vsyscall page into the user
           pagetable vsyscall mapping. */
 -      if (idx >= VSYSCALL_LAST_PAGE && idx <= VSYSCALL_FIRST_PAGE) {
 +      if ((idx >= VSYSCALL_LAST_PAGE && idx <= VSYSCALL_FIRST_PAGE) ||
 +          idx == VVAR_PAGE) {
                unsigned long vaddr = __fix_to_virt(idx);
                set_pte_vaddr_pud(level3_user_vsyscall, vaddr, pte);
        }
diff --combined arch/x86/xen/setup.c
index c3b8d440873caa2986b623d329fec8d88c111435,09688eb4a899b8bd64e28b4dd4142e851dbc70bb..46d6d21dbdbec60800e38f996c7a89ebad2f1ae2
@@@ -9,7 -9,6 +9,7 @@@
  #include <linux/mm.h>
  #include <linux/pm.h>
  #include <linux/memblock.h>
 +#include <linux/cpuidle.h>
  
  #include <asm/elf.h>
  #include <asm/vdso.h>
@@@ -306,10 -305,12 +306,12 @@@ char * __init xen_memory_setup(void
        sanitize_e820_map(e820.map, ARRAY_SIZE(e820.map), &e820.nr_map);
  
        extra_limit = xen_get_max_pages();
-       if (extra_limit >= max_pfn)
-               extra_pages = extra_limit - max_pfn;
-       else
-               extra_pages = 0;
+       if (max_pfn + extra_pages > extra_limit) {
+               if (extra_limit > max_pfn)
+                       extra_pages = extra_limit - max_pfn;
+               else
+                       extra_pages = 0;
+       }
  
        extra_pages += xen_return_unused_memory(xen_start_info->nr_pages, &e820);
  
@@@ -444,7 -445,7 +446,7 @@@ void __init xen_arch_setup(void
  #ifdef CONFIG_X86_32
        boot_cpu_data.hlt_works_ok = 1;
  #endif
 -      pm_idle = default_idle;
 +      disable_cpuidle();
        boot_option_idle_override = IDLE_HALT;
  
        fiddle_vdso();