ia64/xen-unstable

changeset 2923:5eaad90b54c0

bitkeeper revision 1.1159.1.397 (4190c242En4S9vFQxE-5236TUXMRkA)

Cleanup pagetables for all exec_domains.
author cl349@freefall.cl.cam.ac.uk
date Tue Nov 09 13:12:34 2004 +0000 (2004-11-09)
parents ac42e731eebc
children 7ed93ab784b6
files xen/arch/x86/domain.c
line diff
     1.1 --- a/xen/arch/x86/domain.c	Tue Nov 09 11:57:13 2004 +0000
     1.2 +++ b/xen/arch/x86/domain.c	Tue Nov 09 13:12:34 2004 +0000
     1.3 @@ -529,6 +529,8 @@ static void relinquish_list(struct domai
     1.4  
     1.5  void domain_relinquish_memory(struct domain *d)
     1.6  {
     1.7 +    struct exec_domain *ed;
     1.8 +
     1.9      audit_domain(d);
    1.10  
    1.11      /* Ensure that noone is running over the dead domain's page tables. */
    1.12 @@ -538,9 +540,11 @@ void domain_relinquish_memory(struct dom
    1.13      shadow_mode_disable(d);
    1.14  
    1.15      /* Drop the in-use reference to the page-table base. */
    1.16 -    if ( pagetable_val(d->exec_domain[0]->mm.pagetable) != 0 )
    1.17 -        put_page_and_type(&frame_table[pagetable_val(d->exec_domain[0]->mm.pagetable) >>
    1.18 -                                      PAGE_SHIFT]);
    1.19 +    for_each_exec_domain(d, ed) {
    1.20 +        if ( pagetable_val(ed->mm.pagetable) != 0 )
    1.21 +            put_page_and_type(&frame_table[pagetable_val(ed->mm.pagetable) >>
    1.22 +                                           PAGE_SHIFT]);
    1.23 +    }
    1.24  
    1.25      /*
    1.26       * Relinquish GDT mappings. No need for explicit unmapping of the LDT as