ia64/xen-unstable

changeset 4052:a38777f9f099

bitkeeper revision 1.1236.12.26 (422f4105wE_lbhdvI9pHdsnkR93-iw)

Merge freefall.cl.cam.ac.uk:/auto/groups/xeno-xenod/BK/xen-unstable.bk
into freefall.cl.cam.ac.uk:/auto/groups/xeno/users/iap10/xeno-clone/xen-unstable.bk
author iap10@freefall.cl.cam.ac.uk
date Wed Mar 09 18:31:33 2005 +0000 (2005-03-09)
parents 176d6d355157 e61e2c666c53
children fc3672e12015 a13b9052d91d 68c92c165159
files linux-2.6.10-xen-sparse/arch/xen/kernel/ctrl_if.c xen/arch/x86/mm.c
line diff
     1.1 --- a/linux-2.6.10-xen-sparse/arch/xen/kernel/ctrl_if.c	Wed Mar 09 16:45:29 2005 +0000
     1.2 +++ b/linux-2.6.10-xen-sparse/arch/xen/kernel/ctrl_if.c	Wed Mar 09 18:31:33 2005 +0000
     1.3 @@ -481,6 +481,8 @@ void ctrl_if_suspend(void)
     1.4  
     1.5  void ctrl_if_resume(void)
     1.6  {
     1.7 +    control_if_t *ctrl_if = get_ctrl_if();
     1.8 +
     1.9      if ( xen_start_info.flags & SIF_INITDOMAIN )
    1.10      {
    1.11          /*
    1.12 @@ -501,8 +503,8 @@ void ctrl_if_resume(void)
    1.13      }
    1.14  
    1.15      /* Sync up with shared indexes. */
    1.16 -    RING_DROP_PENDING_RESPONSES(&ctrl_if_tx_ring);
    1.17 -    RING_DROP_PENDING_REQUESTS(&ctrl_if_rx_ring);
    1.18 +    FRONT_RING_ATTACH(&ctrl_if_tx_ring, &ctrl_if->tx_ring);
    1.19 +    BACK_RING_ATTACH(&ctrl_if_rx_ring, &ctrl_if->rx_ring);
    1.20  
    1.21      ctrl_if_evtchn = xen_start_info.domain_controller_evtchn;
    1.22      ctrl_if_irq    = bind_evtchn_to_irq(ctrl_if_evtchn);
     2.1 --- a/xen/arch/x86/mm.c	Wed Mar 09 16:45:29 2005 +0000
     2.2 +++ b/xen/arch/x86/mm.c	Wed Mar 09 18:31:33 2005 +0000
     2.3 @@ -104,7 +104,7 @@
     2.4  
     2.5  #ifdef VERBOSE
     2.6  #define MEM_LOG(_f, _a...)                           \
     2.7 -  printk("DOM%u: (file=memory.c, line=%d) " _f "\n", \
     2.8 +  printk("DOM%u: (file=mm.c, line=%d) " _f "\n", \
     2.9           current->domain->id , __LINE__ , ## _a )
    2.10  #else
    2.11  #define MEM_LOG(_f, _a...) ((void)0)
    2.12 @@ -2634,6 +2634,31 @@ void ptwr_status(void)
    2.13      page = &frame_table[pfn];
    2.14  }
    2.15  
    2.16 +void audit_pagelist(struct domain *d)
    2.17 +{
    2.18 +    struct list_head *list_ent;
    2.19 +    int xenpages, totpages;
    2.20 +
    2.21 +    list_ent = d->xenpage_list.next;
    2.22 +    for ( xenpages = 0; (list_ent != &d->xenpage_list); xenpages++ )
    2.23 +    {
    2.24 +        list_ent = list_ent->next;
    2.25 +    }
    2.26 +    list_ent = d->page_list.next;
    2.27 +    for ( totpages = 0; (list_ent != &d->page_list); totpages++ )
    2.28 +    {
    2.29 +        list_ent = list_ent->next;
    2.30 +    }
    2.31 +
    2.32 +    if ( xenpages != d->xenheap_pages ||
    2.33 +         totpages != d->tot_pages )
    2.34 +    {
    2.35 +        printk("ARGH! dom %d: xen=%d %d, pages=%d %d\n",
    2.36 +               xenpages, d->xenheap_pages, 
    2.37 +               totpages, d->tot_pages );
    2.38 +    }
    2.39 +}
    2.40 +
    2.41  void audit_domain(struct domain *d)
    2.42  {
    2.43      int ttot=0, ctot=0, io_mappings=0, lowmem_mappings=0;
    2.44 @@ -2737,6 +2762,8 @@ void audit_domain(struct domain *d)
    2.45             
    2.46      spin_lock(&d->page_alloc_lock);
    2.47  
    2.48 +    audit_pagelist(d);
    2.49 +
    2.50      /* PHASE 0 */
    2.51  
    2.52      list_ent = d->page_list.next;
    2.53 @@ -3037,13 +3064,13 @@ void audit_domain(struct domain *d)
    2.54          list_ent = frame_table[pfn].list.next;
    2.55      }
    2.56  
    2.57 -    spin_unlock(&d->page_alloc_lock);
    2.58  
    2.59      if ( pagetable_val(d->exec_domain[0]->arch.guest_table) )
    2.60          adjust(&frame_table[pagetable_val(
    2.61              d->exec_domain[0]->arch.guest_table)>>PAGE_SHIFT], 1, 1);
    2.62  
    2.63 -    printk("Audit %d: Done. pages=%d l1=%d l2=%d ctot=%d ttot=%d\n", d->id, i, l1, l2, ctot, ttot );
    2.64 +    spin_unlock(&d->page_alloc_lock);
    2.65 +    printk("Audit %d: Done. ref=%d xenpages=%d pages=%d l1=%d l2=%d ctot=%d ttot=%d\n", d->id, atomic_read(&d->refcnt), d->xenheap_pages, d->tot_pages, l1, l2, ctot, ttot );
    2.66  
    2.67      if ( d != current->domain )
    2.68          domain_unpause(d);