ia64/xen-unstable

changeset 2551:14dd430a2130

bitkeeper revision 1.1159.1.179 (41544e90TdScOJohltIwLUX24JdH6A)

Merge freefall.cl.cam.ac.uk:/auto/groups/xeno/BK/xeno.bk
into freefall.cl.cam.ac.uk:/local/scratch/kaf24/xeno
author kaf24@freefall.cl.cam.ac.uk
date Fri Sep 24 16:42:56 2004 +0000 (2004-09-24)
parents fb36d761997f 91847d36b1db
children b3e98ee24986 c1e127be2529
files xen/arch/x86/memory.c
line diff
     1.1 --- a/xen/arch/x86/memory.c	Fri Sep 24 16:39:07 2004 +0000
     1.2 +++ b/xen/arch/x86/memory.c	Fri Sep 24 16:42:56 2004 +0000
     1.3 @@ -820,14 +820,23 @@ void put_page_type(struct pfn_info *page
     1.4          nx = x - 1;
     1.5  
     1.6          ASSERT((x & PGT_count_mask) != 0);
     1.7 -        ASSERT(x & PGT_validated);
     1.8 +
     1.9 +        /*
    1.10 +         * The page should always be validated while a reference is held. The 
    1.11 +         * exception is during domain destruction, when we forcibly invalidate 
    1.12 +         * page-table pages if we detect a referential loop.
    1.13 +         * See domain.c:relinquish_list().
    1.14 +         */
    1.15 +        ASSERT((x & PGT_validated) || 
    1.16 +               test_bit(DF_DYING, &page->u.inuse.domain->flags));
    1.17  
    1.18          if ( unlikely((nx & PGT_count_mask) == 0) )
    1.19          {
    1.20              /* Record TLB information for flush later. Races are harmless. */
    1.21              page->tlbflush_timestamp = tlbflush_clock;
    1.22              
    1.23 -            if ( unlikely((nx & PGT_type_mask) <= PGT_l4_page_table) )
    1.24 +            if ( unlikely((nx & PGT_type_mask) <= PGT_l4_page_table) &&
    1.25 +                 likely(nx & PGT_validated) )
    1.26              {
    1.27                  /*
    1.28                   * Page-table pages must be unvalidated when count is zero. The