ia64/xen-unstable

changeset 1007:6e264d291aff

bitkeeper revision 1.653 (3fe37bb8JkaTBzrrWzReULGfBXkwYQ)

dom0_ops.c, Makefile:
Bug fixes to dom0 interface.
author kaf24@scramble.cl.cam.ac.uk
date Fri Dec 19 22:29:12 2003 +0000 (2003-12-19)
parents 60a3a567a347
children c83d5dd884ca 9be9350b3317
files tools/xc/lib/Makefile xen/common/dom0_ops.c
line diff
     1.1 --- a/tools/xc/lib/Makefile	Fri Dec 19 14:43:39 2003 +0000
     1.2 +++ b/tools/xc/lib/Makefile	Fri Dec 19 22:29:12 2003 +0000
     1.3 @@ -22,7 +22,7 @@ install: all
     1.4  	mkdir -p /usr/lib
     1.5  	mkdir -p /usr/include
     1.6  	cp -a $(LIB) /usr/lib
     1.7 -	chmod 755 /usr/bin/$(LIB)
     1.8 +	chmod 755 /usr/lib/$(LIB)
     1.9  	cp -a xc.h /usr/include
    1.10  	chmod 644 /usr/include/xc.h
    1.11  
    1.12 @@ -30,7 +30,7 @@ dist: all
    1.13  	mkdir -p ../../../../install/lib
    1.14  	mkdir -p ../../../../install/include
    1.15  	cp -a $(LIB) ../../../../install/lib
    1.16 -	chmod 755 ../../../../install/bin/$(LIB)
    1.17 +	chmod 755 ../../../../install/lib/$(LIB)
    1.18  	cp -a xc.h ../../../../install/include
    1.19  	chmod 644 ../../../../install/include/xc.h
    1.20  
     2.1 --- a/xen/common/dom0_ops.c	Fri Dec 19 14:43:39 2003 +0000
     2.2 +++ b/xen/common/dom0_ops.c	Fri Dec 19 22:29:12 2003 +0000
     2.3 @@ -104,8 +104,7 @@ long do_dom0_op(dom0_op_t *u_dom0_op)
     2.4          ret = -EINVAL;
     2.5          if ( p != NULL )
     2.6          {
     2.7 -            if ( (ret = final_setup_guestos(p, &op.u.builddomain)) == 0 )
     2.8 -                ret = p->domain;
     2.9 +            ret = final_setup_guestos(p, &op.u.builddomain);
    2.10              put_task_struct(p);
    2.11          }
    2.12      }
    2.13 @@ -121,7 +120,7 @@ long do_dom0_op(dom0_op_t *u_dom0_op)
    2.14              {
    2.15                  wake_up(p);
    2.16                  reschedule(p);
    2.17 -                ret = p->domain;
    2.18 +                ret = 0;
    2.19              }
    2.20              put_task_struct(p);
    2.21          }
    2.22 @@ -191,40 +190,42 @@ long do_dom0_op(dom0_op_t *u_dom0_op)
    2.23          ret = -EINVAL;
    2.24          if ( p != NULL )
    2.25          {
    2.26 -	    if( cpu == -1 )
    2.27 -	      p->cpupinned = 0;
    2.28 -	    else
    2.29 -	      {
    2.30 +	    if ( cpu == -1 )
    2.31 +            {
    2.32 +                p->cpupinned = 0;
    2.33 +                ret = 0;
    2.34 +	    }
    2.35 +            else
    2.36 +            {
    2.37  		/* For the moment, we are unable to move running
    2.38 -		domains between CPUs. (We need a way of synchronously
    2.39 -		stopping running domains). For now, if we discover the
    2.40 -		domain is not stopped already then cowardly bail out
    2.41 -		with ENOSYS */
    2.42 +                   domains between CPUs. (We need a way of synchronously
    2.43 +                   stopping running domains). For now, if we discover the
    2.44 +                   domain is not stopped already then cowardly bail out
    2.45 +                   with ENOSYS */
    2.46  
    2.47  		if( !(p->state & TASK_STOPPED) ) 
    2.48 -		  ret = -ENOSYS;
    2.49 -		else
    2.50 -		  {
    2.51 +                {
    2.52 +                    ret = -ENOSYS;
    2.53 +		}
    2.54 +                else
    2.55 +                {
    2.56  		    /* We need a task structure lock here!!! 
    2.57  		       FIX ME!! */
    2.58  		    cpu = cpu % smp_num_cpus;
    2.59  		    p->processor = cpu;
    2.60  		    p->cpupinned = 1;
    2.61 -		  }
    2.62 -	      }
    2.63 -
    2.64 -	    ret = 0;
    2.65 +                    ret = 0;
    2.66 +                }
    2.67 +            }
    2.68              put_task_struct(p);
    2.69 -        }
    2.70 -     	
    2.71 +        }     	
    2.72      }
    2.73      break;
    2.74  
    2.75      case DOM0_BVTCTL:
    2.76      {
    2.77          unsigned long  ctx_allow = op.u.bvtctl.ctx_allow;
    2.78 -        ret = sched_bvtctl(ctx_allow);
    2.79 -        
    2.80 +        ret = sched_bvtctl(ctx_allow);        
    2.81      }
    2.82      break;
    2.83  
    2.84 @@ -407,7 +408,7 @@ long do_dom0_op(dom0_op_t *u_dom0_op)
    2.85  
    2.86      case DOM0_MSR:
    2.87      {
    2.88 -        if (op.u.msr.write)
    2.89 +        if ( op.u.msr.write )
    2.90  	{
    2.91              msr_cpu_mask = op.u.msr.cpu_mask;
    2.92              msr_addr = op.u.msr.msr;