Merge branch 'stable/bug.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git...
authorLinus Torvalds <torvalds@linux-foundation.org>
Mon, 22 Aug 2011 18:25:44 +0000 (11:25 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 22 Aug 2011 18:25:44 +0000 (11:25 -0700)
* 'stable/bug.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
  xen/tracing: Fix tracing config option properly
  xen: Do not enable PV IPIs when vector callback not present
  xen/x86: replace order-based range checking of M2P table by linear one
  xen: xen-selfballoon.c needs more header files

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

diff --combined arch/x86/xen/enlighten.c
index e2345af01af0aeeeef02c6306f50ba984c2f9c29,b960429d5b65d9e024adbe8655d556071f45bc2d..2d69617950f7c94a8e14c7e5fe7ad8730aa26eeb
@@@ -77,8 -77,8 +77,8 @@@ EXPORT_SYMBOL_GPL(xen_domain_type)
  
  unsigned long *machine_to_phys_mapping = (void *)MACH2PHYS_VIRT_START;
  EXPORT_SYMBOL(machine_to_phys_mapping);
- unsigned int   machine_to_phys_order;
- EXPORT_SYMBOL(machine_to_phys_order);
+ unsigned long  machine_to_phys_nr;
+ EXPORT_SYMBOL(machine_to_phys_nr);
  
  struct start_info *xen_start_info;
  EXPORT_SYMBOL_GPL(xen_start_info);
@@@ -951,10 -951,6 +951,10 @@@ static const struct pv_info xen_info __
        .paravirt_enabled = 1,
        .shared_kernel_pmd = 0,
  
 +#ifdef CONFIG_X86_64
 +      .extra_user_64bit_cs = FLAT_USER_CS64,
 +#endif
 +
        .name = "Xen",
  };
  
diff --combined arch/x86/xen/mmu.c
index 8cce339db5e7e00e436a2c10b16eadefb8a8ff34,24abc1f50dc5c671ae2e4a9973efd1d9762472a4..20a6142750644442492dabdbbd6a55aaa75244a5
@@@ -1713,15 -1713,19 +1713,19 @@@ static void __init xen_map_identity_ear
  void __init xen_setup_machphys_mapping(void)
  {
        struct xen_machphys_mapping mapping;
-       unsigned long machine_to_phys_nr_ents;
  
        if (HYPERVISOR_memory_op(XENMEM_machphys_mapping, &mapping) == 0) {
                machine_to_phys_mapping = (unsigned long *)mapping.v_start;
-               machine_to_phys_nr_ents = mapping.max_mfn + 1;
+               machine_to_phys_nr = mapping.max_mfn + 1;
        } else {
-               machine_to_phys_nr_ents = MACH2PHYS_NR_ENTRIES;
+               machine_to_phys_nr = MACH2PHYS_NR_ENTRIES;
        }
-       machine_to_phys_order = fls(machine_to_phys_nr_ents - 1);
+ #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;
+ #endif
  }
  
  #ifdef CONFIG_X86_64
@@@ -1916,7 -1920,6 +1920,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);
        }