ia64/xen-unstable

changeset 16090:8d51b80fcb6f

Shadow code printing adjustments.

Messages prior to BUG() should always be displayed, not just when
DEBUG_TRACE_DUMP is defined (which by default it isn't). Convert them
from SHADOW_PRINTK() to SHADOW_ERROR().

Signed-off-by: Jan Beulich <jbeulich@novell.com>
author Keir Fraser <keir@xensource.com>
date Thu Oct 11 10:20:45 2007 +0100 (2007-10-11)
parents ab5b615867ee
children 19a843def5fd
files xen/arch/x86/mm/shadow/common.c xen/arch/x86/mm/shadow/multi.c
line diff
     1.1 --- a/xen/arch/x86/mm/shadow/common.c	Thu Oct 11 10:02:07 2007 +0100
     1.2 +++ b/xen/arch/x86/mm/shadow/common.c	Thu Oct 11 10:20:45 2007 +0100
     1.3 @@ -746,7 +746,7 @@ void shadow_unhook_mappings(struct vcpu 
     1.4          break;
     1.5  #endif
     1.6      default:
     1.7 -        SHADOW_PRINTK("top-level shadow has bad type %08x\n", sp->type);
     1.8 +        SHADOW_ERROR("top-level shadow has bad type %08x\n", sp->type);
     1.9          BUG();
    1.10      }
    1.11  }
    1.12 @@ -814,12 +814,12 @@ void shadow_prealloc(struct domain *d, u
    1.13      
    1.14      /* Nothing more we can do: all remaining shadows are of pages that
    1.15       * hold Xen mappings for some vcpu.  This can never happen. */
    1.16 -    SHADOW_PRINTK("Can't pre-allocate %i shadow pages!\n"
    1.17 -                   "  shadow pages total = %u, free = %u, p2m=%u\n",
    1.18 -                   1 << order, 
    1.19 -                   d->arch.paging.shadow.total_pages, 
    1.20 -                   d->arch.paging.shadow.free_pages, 
    1.21 -                   d->arch.paging.shadow.p2m_pages);
    1.22 +    SHADOW_ERROR("Can't pre-allocate %i shadow pages!\n"
    1.23 +                 "  shadow pages total = %u, free = %u, p2m=%u\n",
    1.24 +                 1 << order,
    1.25 +                 d->arch.paging.shadow.total_pages,
    1.26 +                 d->arch.paging.shadow.free_pages,
    1.27 +                 d->arch.paging.shadow.p2m_pages);
    1.28      BUG();
    1.29  }
    1.30  
    1.31 @@ -912,7 +912,7 @@ mfn_t shadow_alloc(struct domain *d,
    1.32       * It means that we didn't call shadow_prealloc() correctly before
    1.33       * we allocated.  We can't recover by calling prealloc here, because
    1.34       * we might free up higher-level pages that the caller is working on. */
    1.35 -    SHADOW_PRINTK("Can't allocate %i shadow pages!\n", 1 << order);
    1.36 +    SHADOW_ERROR("Can't allocate %i shadow pages!\n", 1 << order);
    1.37      BUG();
    1.38  
    1.39   found:
    1.40 @@ -1605,8 +1605,8 @@ void sh_destroy_shadow(struct vcpu *v, m
    1.41          break;
    1.42  #endif
    1.43      default:
    1.44 -        SHADOW_PRINTK("tried to destroy shadow of bad type %08lx\n", 
    1.45 -                       (unsigned long)t);
    1.46 +        SHADOW_ERROR("tried to destroy shadow of bad type %08lx\n",
    1.47 +                     (unsigned long)t);
    1.48          BUG();
    1.49      }    
    1.50  }
     2.1 --- a/xen/arch/x86/mm/shadow/multi.c	Thu Oct 11 10:02:07 2007 +0100
     2.2 +++ b/xen/arch/x86/mm/shadow/multi.c	Thu Oct 11 10:20:45 2007 +0100
     2.3 @@ -2472,7 +2472,7 @@ sh_map_and_validate_gl4e(struct vcpu *v,
     2.4                                  shadow_l4_index, 
     2.5                                  validate_gl4e);
     2.6  #else // ! GUEST_PAGING_LEVELS >= 4
     2.7 -    SHADOW_PRINTK("called in wrong paging mode!\n");
     2.8 +    SHADOW_ERROR("called in wrong paging mode!\n");
     2.9      BUG();
    2.10      return 0;
    2.11  #endif 
    2.12 @@ -2488,7 +2488,7 @@ sh_map_and_validate_gl3e(struct vcpu *v,
    2.13                                  shadow_l3_index, 
    2.14                                  validate_gl3e);
    2.15  #else // ! GUEST_PAGING_LEVELS >= 4
    2.16 -    SHADOW_PRINTK("called in wrong paging mode!\n");
    2.17 +    SHADOW_ERROR("called in wrong paging mode!\n");
    2.18      BUG();
    2.19      return 0;
    2.20  #endif
    2.21 @@ -2514,7 +2514,7 @@ sh_map_and_validate_gl2he(struct vcpu *v
    2.22                                  shadow_l2_index, 
    2.23                                  validate_gl2e);
    2.24  #else /* Non-PAE guests don't have different kinds of l2 table */
    2.25 -    SHADOW_PRINTK("called in wrong paging mode!\n");
    2.26 +    SHADOW_ERROR("called in wrong paging mode!\n");
    2.27      BUG();
    2.28      return 0;
    2.29  #endif