ia64/xen-unstable

changeset 10059:d20a2a971103

Fix the performance issues of 2-level paging HVM guests on the PAE
Xen. With this, the performance will be basically same as 2-on-2.

Signed-off-by: Jun Nakajima <jun.nakajima@intel.com>
author kaf24@firebug.cl.cam.ac.uk
date Mon May 15 07:46:57 2006 +0100 (2006-05-15)
parents 79d28e3505c2
children cb70d4f8d718
files xen/arch/x86/shadow.c
line diff
     1.1 --- a/xen/arch/x86/shadow.c	Mon May 15 07:44:12 2006 +0100
     1.2 +++ b/xen/arch/x86/shadow.c	Mon May 15 07:46:57 2006 +0100
     1.3 @@ -347,6 +347,13 @@ alloc_shadow_page(struct domain *d,
     1.4          d->arch.shadow_page_count++;
     1.5          if ( PGT_l4_page_table == PGT_root_page_table )
     1.6              pin = 1;
     1.7 +#if CONFIG_PAGING_LEVELS == 3 & defined (GUEST_PGENTRY_32)
     1.8 +        /*
     1.9 +         * We use PGT_l4_shadow for 2-level paging guests on PAE
    1.10 +         */
    1.11 +        if ( d->arch.ops->guest_paging_levels == PAGING_L2 )
    1.12 +            pin = 1;
    1.13 +#endif
    1.14          break;
    1.15  
    1.16  #if CONFIG_PAGING_LEVELS >= 4
    1.17 @@ -2425,6 +2432,17 @@ static void shadow_update_pagetables(str
    1.18      /*
    1.19       *  arch.shadow_table
    1.20       */
    1.21 +#if CONFIG_PAGING_LEVELS == 3 & defined (GUEST_PGENTRY_32)
    1.22 +    /*
    1.23 +     * We use PGT_l4_shadow for 2-level paging guests on PAE
    1.24 +     */
    1.25 +    if ( d->arch.ops->guest_paging_levels == PAGING_L2 )
    1.26 +    { 
    1.27 +        if ( unlikely(!(smfn = __shadow_status(d, gpfn, PGT_l4_shadow))) )
    1.28 +            smfn = shadow_l3_table(v, gpfn, gmfn);
    1.29 +    } 
    1.30 +    else
    1.31 +#endif
    1.32      if ( unlikely(!(smfn = __shadow_status(d, gpfn, PGT_base_page_table))) ) 
    1.33      {
    1.34  #if CONFIG_PAGING_LEVELS == 2