ia64/xen-unstable

changeset 12321:5e0fb830a53c

[XEN] Do not print grant-table warning if a page cannot be pinned
because the (previous) owner is dying. This quietens down domain
destruction quite a bit.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kfraser@localhost.localdomain
date Wed Nov 08 17:31:25 2006 +0000 (2006-11-08)
parents 9f9f569b0a1d
children 3280d6211213
files xen/common/grant_table.c
line diff
     1.1 --- a/xen/common/grant_table.c	Wed Nov 08 16:43:50 2006 +0000
     1.2 +++ b/xen/common/grant_table.c	Wed Nov 08 17:31:25 2006 +0000
     1.3 @@ -253,8 +253,12 @@ static void
     1.4                      get_page(mfn_to_page(frame), rd) :
     1.5                      get_page_and_type(mfn_to_page(frame), rd,
     1.6                                        PGT_writable_page))) )
     1.7 -        PIN_FAIL(undo_out, GNTST_general_error,
     1.8 -                 "Could not pin the granted frame (%lx)!\n", frame);
     1.9 +    {
    1.10 +        if ( !test_bit(_DOMF_dying, &rd->domain_flags) )
    1.11 +            gdprintk(XENLOG_WARNING, "Could not pin grant frame %lx\n", frame);
    1.12 +        rc = GNTST_general_error;
    1.13 +        goto undo_out;
    1.14 +    }
    1.15  
    1.16      if ( op->flags & GNTMAP_host_map )
    1.17      {
    1.18 @@ -893,8 +897,12 @@ static void
    1.19          PIN_FAIL(error_out, GNTST_general_error,
    1.20                   "source frame %lx invalid.\n", s_frame);
    1.21      if ( !get_page(mfn_to_page(s_frame), sd) )
    1.22 -        PIN_FAIL(error_out, GNTST_general_error,
    1.23 -                 "could not get source frame %lx.\n", s_frame);
    1.24 +    {
    1.25 +        if ( !test_bit(_DOMF_dying, &sd->domain_flags) )
    1.26 +            gdprintk(XENLOG_WARNING, "Could not get src frame %lx\n", s_frame);
    1.27 +        rc = GNTST_general_error;
    1.28 +        goto error_out;
    1.29 +    }
    1.30      have_s_ref = 1;
    1.31  
    1.32      if ( dest_is_gref )
    1.33 @@ -912,8 +920,12 @@ static void
    1.34          PIN_FAIL(error_out, GNTST_general_error,
    1.35                   "destination frame %lx invalid.\n", d_frame);
    1.36      if ( !get_page_and_type(mfn_to_page(d_frame), dd, PGT_writable_page) )
    1.37 -        PIN_FAIL(error_out, GNTST_general_error,
    1.38 -                 "could not get destination frame %lx.\n", d_frame);
    1.39 +    {
    1.40 +        if ( !test_bit(_DOMF_dying, &dd->domain_flags) )
    1.41 +            gdprintk(XENLOG_WARNING, "Could not get dst frame %lx\n", d_frame);
    1.42 +        rc = GNTST_general_error;
    1.43 +        goto error_out;
    1.44 +    }
    1.45  
    1.46      sp = map_domain_page(s_frame);
    1.47      dp = map_domain_page(d_frame);