ia64/xen-unstable

changeset 9458:4840c3da2521

Allow 64-bit Xen to run 64-bit hvm SMP guests.

Signed-off-by: Jun Nakajima <jun.nakajima@intel.com>
author kaf24@firebug.cl.cam.ac.uk
date Sun Mar 26 11:45:35 2006 +0100 (2006-03-26)
parents beb37b340903
children 30ae67d6e5f0
files xen/arch/x86/shadow.c
line diff
     1.1 --- a/xen/arch/x86/shadow.c	Sun Mar 26 11:43:53 2006 +0100
     1.2 +++ b/xen/arch/x86/shadow.c	Sun Mar 26 11:45:35 2006 +0100
     1.3 @@ -1807,6 +1807,16 @@ static int resync_all(struct domain *d, 
     1.4                    entry_has_changed(
     1.5                        guest_pt[i], snapshot_pt[i], PAGE_FLAG_MASK) )
     1.6                  {
     1.7 +
     1.8 +                    unsigned long gpfn;
     1.9 +
    1.10 +                    gpfn = entry_get_pfn(guest_pt[i]);
    1.11 +                    /*
    1.12 +                     * Looks like it's longer a page table.
    1.13 +                     */
    1.14 +                    if ( unlikely(gpfn != (gpfn & PGT_mfn_mask)) )
    1.15 +                        continue;
    1.16 +
    1.17                      need_flush |= validate_entry_change(
    1.18                          d, &guest_pt[i], &shadow_pt[i],
    1.19                          shadow_type_to_level(stype));
    1.20 @@ -1851,6 +1861,14 @@ static int resync_all(struct domain *d, 
    1.21                  {
    1.22  #ifndef GUEST_PGENTRY_32
    1.23                      l4_pgentry_t *shadow4 = shadow;
    1.24 +                    unsigned long gpfn;
    1.25 +
    1.26 +                    gpfn = l4e_get_pfn(new_root_e);
    1.27 +                    /*
    1.28 +                     * Looks like it's longer a page table.
    1.29 +                     */
    1.30 +                    if ( unlikely(gpfn != (gpfn & PGT_mfn_mask)) )
    1.31 +                        continue;
    1.32  
    1.33                      if ( d->arch.ops->guest_paging_levels == PAGING_L4 ) 
    1.34                      {
    1.35 @@ -1894,7 +1912,7 @@ static int resync_all(struct domain *d, 
    1.36          unmap_domain_page(snapshot);
    1.37          unmap_domain_page(guest);
    1.38  
    1.39 -        if ( unlikely(unshadow) )
    1.40 +        if ( unlikely(unshadow && stype == PGT_root_page_table) )
    1.41          {
    1.42              for_each_vcpu(d, v)
    1.43                  if(smfn == pagetable_get_pfn(v->arch.shadow_table))