ia64/xen-unstable

changeset 11146:f43729552603

[HVM] Ensure the read-only M2P table is mapped without _PAGE_GLOBAL
otherwise context switch to shadow-mode-translate guests does not
work properly (they reuse that area of virtual address space).
Signed-off-by: Keir Fraser <keir@xensource.com>
author kfraser@localhost.localdomain
date Tue Aug 15 16:21:12 2006 +0100 (2006-08-15)
parents b26bf72514aa
children 59adc1f7dfca
files xen/arch/x86/x86_32/mm.c xen/arch/x86/x86_64/mm.c
line diff
     1.1 --- a/xen/arch/x86/x86_32/mm.c	Tue Aug 15 16:17:24 2006 +0100
     1.2 +++ b/xen/arch/x86/x86_32/mm.c	Tue Aug 15 16:21:12 2006 +0100
     1.3 @@ -104,6 +104,7 @@ void __init paging_init(void)
     1.4              panic("Not enough memory to bootstrap Xen.\n");
     1.5          idle_pg_table_l2[l2_linear_offset(RDWR_MPT_VIRT_START) + i] =
     1.6              l2e_from_page(pg, PAGE_HYPERVISOR | _PAGE_PSE);
     1.7 +        /* NB. Cannot be GLOBAL as shadow_mode_translate reuses this area. */
     1.8          idle_pg_table_l2[l2_linear_offset(RO_MPT_VIRT_START) + i] =
     1.9              l2e_from_page(pg, (__PAGE_HYPERVISOR | _PAGE_PSE) & ~_PAGE_RW);
    1.10      }
     2.1 --- a/xen/arch/x86/x86_64/mm.c	Tue Aug 15 16:17:24 2006 +0100
     2.2 +++ b/xen/arch/x86/x86_64/mm.c	Tue Aug 15 16:21:12 2006 +0100
     2.3 @@ -113,8 +113,9 @@ void __init paging_init(void)
     2.4              PAGE_HYPERVISOR);
     2.5          memset((void *)(RDWR_MPT_VIRT_START + (i << L2_PAGETABLE_SHIFT)), 0x55,
     2.6                 1UL << L2_PAGETABLE_SHIFT);
     2.7 +        /* NB. Cannot be GLOBAL as shadow_mode_translate reuses this area. */
     2.8          *l2_ro_mpt++ = l2e_from_page(
     2.9 -            pg, _PAGE_GLOBAL|_PAGE_PSE|_PAGE_USER|_PAGE_PRESENT);
    2.10 +            pg, /*_PAGE_GLOBAL|*/_PAGE_PSE|_PAGE_USER|_PAGE_PRESENT);
    2.11          BUG_ON(((unsigned long)l2_ro_mpt & ~PAGE_MASK) == 0);
    2.12      }
    2.13