ia64/xen-unstable

changeset 8174:43a1f899e302

More fixes for live migrate on PAE and 64-bit.

Signed-off-by: Jun Nakajima <jun.nakajima@intel.com>
Signed-off-by: Steven Hand <steven@xensource.com>
author smh22@firebug.cl.cam.ac.uk
date Fri Dec 02 09:54:09 2005 +0100 (2005-12-02)
parents 5d8a5e7187d5
children 106f258edf97
files xen/arch/x86/shadow.c xen/arch/x86/shadow_public.c xen/include/asm-x86/shadow.h
line diff
     1.1 --- a/xen/arch/x86/shadow.c	Fri Dec 02 01:04:09 2005 +0000
     1.2 +++ b/xen/arch/x86/shadow.c	Fri Dec 02 09:54:09 2005 +0100
     1.3 @@ -2750,10 +2750,10 @@ static unsigned long shadow_l3_table(
     1.4                      g2mfn, g2mfn);
     1.5                  BUG(); /* XXX Deal gracefully with failure. */
     1.6              }
     1.7 -
     1.8 -            if (!get_shadow_ref(s2mfn))
     1.9 -                BUG();
    1.10          } 
    1.11 +
    1.12 +        if (!get_shadow_ref(s2mfn))
    1.13 +            BUG();
    1.14              
    1.15          /* Map shadow L2 into shadow L3 */
    1.16          spl3e[L3_PAGETABLE_ENTRIES - 1] = l3e_from_pfn(s2mfn, _PAGE_PRESENT);
    1.17 @@ -3526,10 +3526,11 @@ static void shadow_invlpg_64(struct vcpu
    1.18  
    1.19      shadow_lock(d);
    1.20  
    1.21 +    __shadow_sync_va(v, va);
    1.22 +
    1.23      if ( __shadow_get_l1e(v, va, &old_sl1e) )
    1.24          if ( l1e_get_flags(old_sl1e) & _PAGE_PRESENT )
    1.25 -            put_page_from_l1e(old_sl1e, d);
    1.26 -
    1.27 +            shadow_put_page_from_l1e(old_sl1e, d);
    1.28  
    1.29      sl1e = l1e_empty();
    1.30      __shadow_set_l1e(v, va, &sl1e);
     2.1 --- a/xen/arch/x86/shadow_public.c	Fri Dec 02 01:04:09 2005 +0000
     2.2 +++ b/xen/arch/x86/shadow_public.c	Fri Dec 02 09:54:09 2005 +0100
     2.3 @@ -1425,7 +1425,7 @@ alloc_p2m_table(struct domain *d)
     2.4  
     2.5  void shadow_l1_normal_pt_update(
     2.6      struct domain *d,
     2.7 -    unsigned long pa, l1_pgentry_t gpte,
     2.8 +    physaddr_t pa, l1_pgentry_t gpte,
     2.9      struct domain_mmap_cache *cache)
    2.10  {
    2.11      unsigned long sl1mfn;    
    2.12 @@ -1450,7 +1450,7 @@ void shadow_l1_normal_pt_update(
    2.13  
    2.14  void shadow_l2_normal_pt_update(
    2.15      struct domain *d,
    2.16 -    unsigned long pa, l2_pgentry_t gpde,
    2.17 +    physaddr_t pa, l2_pgentry_t gpde,
    2.18      struct domain_mmap_cache *cache)
    2.19  {
    2.20      unsigned long sl2mfn;
    2.21 @@ -1475,7 +1475,7 @@ void shadow_l2_normal_pt_update(
    2.22  #if CONFIG_PAGING_LEVELS >= 3
    2.23  void shadow_l3_normal_pt_update(
    2.24      struct domain *d,
    2.25 -    unsigned long pa, l3_pgentry_t l3e,
    2.26 +    physaddr_t pa, l3_pgentry_t l3e,
    2.27      struct domain_mmap_cache *cache)
    2.28  {
    2.29      unsigned long sl3mfn;
    2.30 @@ -1502,7 +1502,7 @@ void shadow_l3_normal_pt_update(
    2.31  #if CONFIG_PAGING_LEVELS >= 4
    2.32  void shadow_l4_normal_pt_update(
    2.33      struct domain *d,
    2.34 -    unsigned long pa, l4_pgentry_t l4e,
    2.35 +    physaddr_t pa, l4_pgentry_t l4e,
    2.36      struct domain_mmap_cache *cache)
    2.37  {
    2.38      unsigned long sl4mfn;
     3.1 --- a/xen/include/asm-x86/shadow.h	Fri Dec 02 01:04:09 2005 +0000
     3.2 +++ b/xen/include/asm-x86/shadow.h	Fri Dec 02 09:54:09 2005 +0100
     3.3 @@ -131,10 +131,10 @@ extern int set_p2m_entry(
     3.4  extern void remove_shadow(struct domain *d, unsigned long gpfn, u32 stype);
     3.5  
     3.6  extern void shadow_l1_normal_pt_update(struct domain *d,
     3.7 -                                       unsigned long pa, l1_pgentry_t l1e,
     3.8 +                                       physaddr_t pa, l1_pgentry_t l1e,
     3.9                                         struct domain_mmap_cache *cache);
    3.10  extern void shadow_l2_normal_pt_update(struct domain *d,
    3.11 -                                       unsigned long pa, l2_pgentry_t l2e,
    3.12 +                                       physaddr_t pa, l2_pgentry_t l2e,
    3.13                                         struct domain_mmap_cache *cache);
    3.14  #if CONFIG_PAGING_LEVELS >= 3
    3.15  #include <asm/page-guest32.h>
    3.16 @@ -148,12 +148,12 @@ extern void shadow_l2_normal_pt_update(s
    3.17  
    3.18  extern unsigned long gva_to_gpa(unsigned long gva);
    3.19  extern void shadow_l3_normal_pt_update(struct domain *d,
    3.20 -                                       unsigned long pa, l3_pgentry_t l3e,
    3.21 +                                       physaddr_t pa, l3_pgentry_t l3e,
    3.22                                         struct domain_mmap_cache *cache);
    3.23  #endif
    3.24  #if CONFIG_PAGING_LEVELS >= 4
    3.25  extern void shadow_l4_normal_pt_update(struct domain *d,
    3.26 -                                       unsigned long pa, l4_pgentry_t l4e,
    3.27 +                                       physaddr_t pa, l4_pgentry_t l4e,
    3.28                                         struct domain_mmap_cache *cache);
    3.29  #endif
    3.30  extern int shadow_do_update_va_mapping(unsigned long va,