ia64/xen-unstable

changeset 1568:eb20b819c82a

bitkeeper revision 1.1014 (40daed7e9y-gp5z9q05byc8SDgQ1Mg)

manual merge
author iap10@labyrinth.cl.cam.ac.uk
date Thu Jun 24 15:04:30 2004 +0000 (2004-06-24)
parents 8ce3066ba3ec
children 815e840634fb
files tools/xc/lib/xc_domain.c tools/xc/lib/xc_linux_save.c xen/common/shadow.c xen/include/hypervisor-ifs/dom0_ops.h
line diff
     1.1 --- a/tools/xc/lib/xc_domain.c	Thu Jun 24 15:03:50 2004 +0000
     1.2 +++ b/tools/xc/lib/xc_domain.c	Thu Jun 24 15:04:30 2004 +0000
     1.3 @@ -117,6 +117,24 @@ int xc_domain_getinfo(int xc_handle,
     1.4      return nr_doms;
     1.5  }
     1.6  
     1.7 +int xc_domain_getfullinfo(int xc_handle,
     1.8 +		       u32 domid,
     1.9 +		       dom0_op_t *op,
    1.10 +		       full_execution_context_t *ctxt )
    1.11 +{
    1.12 +    int rc;
    1.13 +    op->cmd = DOM0_GETDOMAININFO;
    1.14 +    op->u.getdomaininfo.domain = (domid_t)domid;
    1.15 +    op->u.getdomaininfo.ctxt = ctxt;
    1.16 +
    1.17 +    rc = do_dom0_op(xc_handle, op);
    1.18 +    if ( ((u32)op->u.getdomaininfo.domain != domid) && rc > 0 )
    1.19 +	return -ESRCH;
    1.20 +    else
    1.21 +	return rc;
    1.22 +}
    1.23 +
    1.24 +
    1.25  int xc_shadow_control(int xc_handle,
    1.26                        u32 domid, 
    1.27                        unsigned int sop,
     2.1 --- a/tools/xc/lib/xc_linux_save.c	Thu Jun 24 15:03:50 2004 +0000
     2.2 +++ b/tools/xc/lib/xc_linux_save.c	Thu Jun 24 15:04:30 2004 +0000
     2.3 @@ -319,12 +319,17 @@ int xc_linux_save(int xc_handle,
     2.4  
     2.5      /* Ensure that the domain exists, and that it is stopped. */
     2.6  
     2.7 -    if ( xc_domain_pause( xc_handle, domid, &op, &ctxt ) )
     2.8 +    if ( xc_domain_pause( xc_handle, domid ) )
     2.9      {
    2.10  	PERROR("Could not pause domain");
    2.11  	goto out;
    2.12      }
    2.13  
    2.14 +    if ( xc_domain_getfullinfo( xc_handle, domid, &op, &ctxt) )
    2.15 +    {
    2.16 +	PERROR("Could not get full domain info");
    2.17 +	goto out;
    2.18 +    }
    2.19      memcpy(name, op.u.getdomaininfo.name, sizeof(name));
    2.20      shared_info_frame = op.u.getdomaininfo.shared_info_frame;
    2.21  
    2.22 @@ -381,7 +386,7 @@ int xc_linux_save(int xc_handle,
    2.23  	    pgd[HYPERVISOR_VIRT_START>>L2_PAGETABLE_SHIFT]>>PAGE_SHIFT;
    2.24  
    2.25  	live_mfn_to_pfn_table = 
    2.26 -	    mfn_mapper_map_single(xc_handle, ~0ULL, 
    2.27 +	    mfn_mapper_map_single(xc_handle, ~0UL, 
    2.28  				  PAGE_SIZE*1024, PROT_READ, 
    2.29  				  mfn_to_pfn_table_start_mfn );
    2.30      }
    2.31 @@ -805,7 +810,7 @@ int xc_linux_save(int xc_handle,
    2.32  		DPRINTF("Start last iteration\n");
    2.33  		last_iter = 1;
    2.34  
    2.35 -		xc_domain_pause( xc_handle, domid, &op, NULL );
    2.36 +		xc_domain_pause( xc_handle, domid );
    2.37  
    2.38  	    } 
    2.39  
    2.40 @@ -839,13 +844,9 @@ int xc_linux_save(int xc_handle,
    2.41      }
    2.42  
    2.43      /* Get the final execution context */
    2.44 -    op.cmd = DOM0_GETDOMAININFO;
    2.45 -    op.u.getdomaininfo.domain = (domid_t)domid;
    2.46 -    op.u.getdomaininfo.ctxt = &ctxt;
    2.47 -    if ( (do_dom0_op(xc_handle, &op) < 0) || 
    2.48 -	 ((u32)op.u.getdomaininfo.domain != domid) )
    2.49 +    if ( xc_domain_getfullinfo( xc_handle, domid, &op, &ctxt) )
    2.50      {
    2.51 -	PERROR("Could not get info on domain");
    2.52 +	PERROR("Could not get full domain info");
    2.53  	goto out;
    2.54      }
    2.55  
     3.1 --- a/xen/common/shadow.c	Thu Jun 24 15:03:50 2004 +0000
     3.2 +++ b/xen/common/shadow.c	Thu Jun 24 15:04:30 2004 +0000
     3.3 @@ -426,10 +426,10 @@ static int shadow_mode_table_op(struct d
     3.4      {
     3.5  		int i;
     3.6  
     3.7 -		sc->stats.fault_count       = p->mm.shadow_fault_count;
     3.8 -		sc->stats.dirty_count       = p->mm.shadow_dirty_count;
     3.9 -		sc->stats.dirty_net_count   = p->mm.shadow_dirty_net_count;
    3.10 -		sc->stats.dirty_block_count = p->mm.shadow_dirty_block_count;
    3.11 +		sc->stats.fault_count       = d->mm.shadow_fault_count;
    3.12 +		sc->stats.dirty_count       = d->mm.shadow_dirty_count;
    3.13 +		sc->stats.dirty_net_count   = d->mm.shadow_dirty_net_count;
    3.14 +		sc->stats.dirty_block_count = d->mm.shadow_dirty_block_count;
    3.15  	
    3.16  		if( d->tot_pages > sc->pages || 
    3.17  			!sc->dirty_bitmap || !d->mm.shadow_dirty_bitmap )
     4.1 --- a/xen/include/hypervisor-ifs/dom0_ops.h	Thu Jun 24 15:03:50 2004 +0000
     4.2 +++ b/xen/include/hypervisor-ifs/dom0_ops.h	Thu Jun 24 15:04:30 2004 +0000
     4.3 @@ -279,7 +279,7 @@ typedef struct {
     4.4      memory_t       pages;  /* 16: size of buffer, updated with actual size */
     4.5      MEMORY_PADDING;
     4.6      /* OUT variables. */
     4.7 -    dom0_shadow_control_stats_t;
     4.8 +    dom0_shadow_control_stats_t stats;
     4.9  } PACKED dom0_shadow_control_t;
    4.10  
    4.11