Commit 8653b3f1 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'stable/bug-fixes-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen

* 'stable/bug-fixes-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
  xen: mask_rw_pte: do not apply the early_ioremap checks on x86_32
  xen: do not create the extra e820 region at an addr lower than 4G
parents d0957105 ee176455
...@@ -1473,16 +1473,20 @@ static void xen_pgd_free(struct mm_struct *mm, pgd_t *pgd) ...@@ -1473,16 +1473,20 @@ static void xen_pgd_free(struct mm_struct *mm, pgd_t *pgd)
#endif #endif
} }
#ifdef CONFIG_X86_32
static __init pte_t mask_rw_pte(pte_t *ptep, pte_t pte) static __init pte_t mask_rw_pte(pte_t *ptep, pte_t pte)
{ {
unsigned long pfn = pte_pfn(pte);
#ifdef CONFIG_X86_32
/* If there's an existing pte, then don't allow _PAGE_RW to be set */ /* If there's an existing pte, then don't allow _PAGE_RW to be set */
if (pte_val_ma(*ptep) & _PAGE_PRESENT) if (pte_val_ma(*ptep) & _PAGE_PRESENT)
pte = __pte_ma(((pte_val_ma(*ptep) & _PAGE_RW) | ~_PAGE_RW) & pte = __pte_ma(((pte_val_ma(*ptep) & _PAGE_RW) | ~_PAGE_RW) &
pte_val_ma(pte)); pte_val_ma(pte));
#endif
return pte;
}
#else /* CONFIG_X86_64 */
static __init pte_t mask_rw_pte(pte_t *ptep, pte_t pte)
{
unsigned long pfn = pte_pfn(pte);
/* /*
* If the new pfn is within the range of the newly allocated * If the new pfn is within the range of the newly allocated
...@@ -1497,6 +1501,7 @@ static __init pte_t mask_rw_pte(pte_t *ptep, pte_t pte) ...@@ -1497,6 +1501,7 @@ static __init pte_t mask_rw_pte(pte_t *ptep, pte_t pte)
return pte; return pte;
} }
#endif /* CONFIG_X86_64 */
/* Init-time set_pte while constructing initial pagetables, which /* Init-time set_pte while constructing initial pagetables, which
doesn't allow RO pagetable pages to be remapped RW */ doesn't allow RO pagetable pages to be remapped RW */
......
...@@ -227,7 +227,7 @@ char * __init xen_memory_setup(void) ...@@ -227,7 +227,7 @@ char * __init xen_memory_setup(void)
memcpy(map_raw, map, sizeof(map)); memcpy(map_raw, map, sizeof(map));
e820.nr_map = 0; e820.nr_map = 0;
xen_extra_mem_start = mem_end; xen_extra_mem_start = max((1ULL << 32), mem_end);
for (i = 0; i < memmap.nr_entries; i++) { for (i = 0; i < memmap.nr_entries; i++) {
unsigned long long end; unsigned long long end;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment