ia64/xen-unstable

changeset 10216:0b98fcb98889

Fix PAE debug builds to avoid shadowing shadow-mode pgdirs below 4GB.
The current shadow mode is not aware of this extra level of shadowing
and gets rather confused. Furthermore it *always* ensures that its
PAE pgdirs are below 4GB so there is no need for the extra shadowing
logic to be invoked.

This fixes a bug introduced in changeset 10177:d5f98d23427a0d256b896fc63ccfd2c1f79e55ba

Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Tue May 30 18:47:37 2006 +0100 (2006-05-30)
parents c43080e63545
children ac3a4fc11e3e
files xen/arch/x86/mm.c
line diff
     1.1 --- a/xen/arch/x86/mm.c	Tue May 30 18:11:34 2006 +0100
     1.2 +++ b/xen/arch/x86/mm.c	Tue May 30 18:47:37 2006 +0100
     1.3 @@ -266,8 +266,15 @@ void share_xen_page_with_privileged_gues
     1.4  /* Only PDPTs above 4GB boundary need to be shadowed in low memory. */
     1.5  #define l3tab_needs_shadow(mfn) (mfn >= 0x100000)
     1.6  #else
     1.7 -/* In debug builds we aggressively shadow PDPTs to exercise code paths. */
     1.8 -#define l3tab_needs_shadow(mfn) ((mfn << PAGE_SHIFT) != __pa(idle_pg_table))
     1.9 +/*
    1.10 + * In debug builds we aggressively shadow PDPTs to exercise code paths.
    1.11 + * We cannot safely shadow the idle page table, nor shadow-mode page tables
    1.12 + * (detected by lack of an owning domain). Always shadow PDPTs above 4GB.
    1.13 + */
    1.14 +#define l3tab_needs_shadow(mfn)                         \
    1.15 +    ((((mfn << PAGE_SHIFT) != __pa(idle_pg_table)) &&   \
    1.16 +      (page_get_owner(mfn_to_page(mfn)) != NULL)) ||    \
    1.17 +     (mfn >= 0x100000))
    1.18  #endif
    1.19  
    1.20  static l1_pgentry_t *fix_pae_highmem_pl1e;