ia64/xen-unstable

changeset 9694:a9ae49b52c28

Unmap shadow vtable when freeing shadow table in free_shadow_pages().

Signed-off-by: Xin Li <xin.b.li@intel.com>
author kaf24@firebug.cl.cam.ac.uk
date Thu Apr 13 10:12:16 2006 +0100 (2006-04-13)
parents 268f2b85f313
children c3bb51c443a7
files xen/arch/x86/shadow32.c xen/arch/x86/shadow_public.c
line diff
     1.1 --- a/xen/arch/x86/shadow32.c	Thu Apr 13 10:10:19 2006 +0100
     1.2 +++ b/xen/arch/x86/shadow32.c	Thu Apr 13 10:12:16 2006 +0100
     1.3 @@ -583,6 +583,13 @@ static void free_shadow_pages(struct dom
     1.4          {
     1.5              put_shadow_ref(pagetable_get_pfn(v->arch.shadow_table));
     1.6              v->arch.shadow_table = mk_pagetable(0);
     1.7 +
     1.8 +            if ( shadow_mode_external(d) )
     1.9 +            {
    1.10 +                if ( v->arch.shadow_vtable )
    1.11 +                    unmap_domain_page_global(v->arch.shadow_vtable);
    1.12 +                v->arch.shadow_vtable = NULL;
    1.13 +            }
    1.14          }
    1.15  
    1.16          if ( v->arch.monitor_shadow_ref )
     2.1 --- a/xen/arch/x86/shadow_public.c	Thu Apr 13 10:10:19 2006 +0100
     2.2 +++ b/xen/arch/x86/shadow_public.c	Thu Apr 13 10:12:16 2006 +0100
     2.3 @@ -898,6 +898,13 @@ void free_shadow_pages(struct domain *d)
     2.4          {
     2.5              put_shadow_ref(pagetable_get_pfn(v->arch.shadow_table));
     2.6              v->arch.shadow_table = mk_pagetable(0);
     2.7 +
     2.8 +            if ( shadow_mode_external(d) )
     2.9 +            {
    2.10 +                if ( v->arch.shadow_vtable )
    2.11 +                    unmap_domain_page_global(v->arch.shadow_vtable);
    2.12 +                v->arch.shadow_vtable = NULL;
    2.13 +            }
    2.14          }
    2.15  
    2.16          if ( v->arch.monitor_shadow_ref )