ia64/xen-unstable

changeset 8508:dd5649730b32

Fix a couple of bogus dom0_op names:
setdomaininfo -> setvcpucontext
pincpudomain -> setvcpuaffinity

Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Fri Jan 06 12:53:19 2006 +0100 (2006-01-06)
parents 84cf56328ce0
children ba4d42f18661
files tools/debugger/libxendebug/xendebug.c tools/libxc/xc_core.c tools/libxc/xc_domain.c tools/libxc/xc_ia64_stubs.c tools/libxc/xc_linux_build.c tools/libxc/xc_linux_restore.c tools/libxc/xc_linux_save.c tools/libxc/xc_pagetab.c tools/libxc/xc_ptrace.c tools/libxc/xc_vmx_build.c tools/libxc/xenctrl.h tools/python/xen/lowlevel/xc/xc.c tools/python/xen/xend/XendDomain.py tools/python/xen/xend/XendDomainInfo.py tools/xentrace/xenctx.c xen/common/dom0_ops.c xen/common/domain.c xen/include/public/dom0_ops.h xen/include/xen/sched.h
line diff
     1.1 --- a/tools/debugger/libxendebug/xendebug.c	Fri Jan 06 12:25:47 2006 +0100
     1.2 +++ b/tools/debugger/libxendebug/xendebug.c	Fri Jan 06 12:53:19 2006 +0100
     1.3 @@ -119,8 +119,8 @@ xendebug_get_context (int xc_handle, uin
     1.4  
     1.5      if ( !ctxt->valid[vcpu] )
     1.6      {
     1.7 -        if ( (rc = xc_domain_get_vcpu_context(xc_handle, domid, vcpu, 
     1.8 -                                              &ctxt->context[vcpu])) )
     1.9 +        if ( (rc = xc_vcpu_getcontext(xc_handle, domid, vcpu, 
    1.10 +                                      &ctxt->context[vcpu])) )
    1.11              return NULL;
    1.12  
    1.13          ctxt->valid[vcpu] = true;
    1.14 @@ -139,10 +139,10 @@ xendebug_set_context (int xc_handle, dom
    1.15          return -EINVAL;
    1.16  
    1.17      op.interface_version = DOM0_INTERFACE_VERSION;
    1.18 -    op.cmd = DOM0_SETDOMAININFO;
    1.19 -    op.u.setdomaininfo.domain = ctxt->domid;
    1.20 -    op.u.setdomaininfo.vcpu = vcpu;
    1.21 -    op.u.setdomaininfo.ctxt = &ctxt->context[vcpu];
    1.22 +    op.cmd = DOM0_SETVCPUCONTEXT;
    1.23 +    op.u.setvcpucontext.domain = ctxt->domid;
    1.24 +    op.u.setvcpucontext.vcpu = vcpu;
    1.25 +    op.u.setvcpucontext.ctxt = &ctxt->context[vcpu];
    1.26  
    1.27      if ( (rc = mlock(&ctxt->context[vcpu], sizeof(vcpu_guest_context_t))) )
    1.28          return rc;
     2.1 --- a/tools/libxc/xc_core.c	Fri Jan 06 12:25:47 2006 +0100
     2.2 +++ b/tools/libxc/xc_core.c	Fri Jan 06 12:53:19 2006 +0100
     2.3 @@ -55,7 +55,7 @@ xc_domain_dumpcore(int xc_handle,
     2.4      }
     2.5   
     2.6      for (i = 0; i < info.max_vcpu_id; i++)
     2.7 -        if (xc_domain_get_vcpu_context(xc_handle, domid,
     2.8 +        if (xc_vcpu_getcontext(xc_handle, domid,
     2.9                                         i, &ctxt[nr_vcpus]) == 0)
    2.10              nr_vcpus++;
    2.11   
     3.1 --- a/tools/libxc/xc_domain.c	Fri Jan 06 12:25:47 2006 +0100
     3.2 +++ b/tools/libxc/xc_domain.c	Fri Jan 06 12:53:19 2006 +0100
     3.3 @@ -58,16 +58,16 @@ int xc_domain_destroy(int xc_handle,
     3.4      return do_dom0_op(xc_handle, &op);
     3.5  }
     3.6  
     3.7 -int xc_domain_pincpu(int xc_handle,
     3.8 -                     uint32_t domid, 
     3.9 -                     int vcpu,
    3.10 -                     cpumap_t cpumap)
    3.11 +int xc_vcpu_setaffinity(int xc_handle,
    3.12 +                        uint32_t domid, 
    3.13 +                        int vcpu,
    3.14 +                        cpumap_t cpumap)
    3.15  {
    3.16      DECLARE_DOM0_OP;
    3.17 -    op.cmd = DOM0_PINCPUDOMAIN;
    3.18 -    op.u.pincpudomain.domain  = (domid_t)domid;
    3.19 -    op.u.pincpudomain.vcpu    = vcpu;
    3.20 -    op.u.pincpudomain.cpumap  = cpumap;
    3.21 +    op.cmd = DOM0_SETVCPUAFFINITY;
    3.22 +    op.u.setvcpuaffinity.domain  = (domid_t)domid;
    3.23 +    op.u.setvcpuaffinity.vcpu    = vcpu;
    3.24 +    op.u.setvcpuaffinity.cpumap  = cpumap;
    3.25      return do_dom0_op(xc_handle, &op);
    3.26  }
    3.27  
    3.28 @@ -155,7 +155,7 @@ int xc_domain_getinfolist(int xc_handle,
    3.29      return ret;
    3.30  }
    3.31  
    3.32 -int xc_domain_get_vcpu_context(int xc_handle,
    3.33 +int xc_vcpu_getcontext(int xc_handle,
    3.34                                 uint32_t domid,
    3.35                                 uint32_t vcpu,
    3.36                                 vcpu_guest_context_t *ctxt)
    3.37 @@ -345,10 +345,10 @@ int xc_domain_sethandle(int xc_handle, u
    3.38      return do_dom0_op(xc_handle, &op);
    3.39  }
    3.40  
    3.41 -int xc_domain_get_vcpu_info(int xc_handle,
    3.42 -                            uint32_t domid,
    3.43 -                            uint32_t vcpu,
    3.44 -                            xc_vcpuinfo_t *info)
    3.45 +int xc_vcpu_getinfo(int xc_handle,
    3.46 +                    uint32_t domid,
    3.47 +                    uint32_t vcpu,
    3.48 +                    xc_vcpuinfo_t *info)
    3.49  {
    3.50      int rc;
    3.51      DECLARE_DOM0_OP;
    3.52 @@ -380,18 +380,18 @@ int xc_domain_ioport_permission(int xc_h
    3.53      return do_dom0_op(xc_handle, &op);
    3.54  }
    3.55  
    3.56 -int xc_domain_setinfo(int xc_handle,
    3.57 -                      uint32_t domid,
    3.58 -                      uint32_t vcpu,
    3.59 -                      vcpu_guest_context_t *ctxt)
    3.60 +int xc_vcpu_setcontext(int xc_handle,
    3.61 +                       uint32_t domid,
    3.62 +                       uint32_t vcpu,
    3.63 +                       vcpu_guest_context_t *ctxt)
    3.64  {
    3.65      dom0_op_t op;
    3.66      int rc;
    3.67  
    3.68 -    op.cmd = DOM0_SETDOMAININFO;
    3.69 -    op.u.setdomaininfo.domain = domid;
    3.70 -    op.u.setdomaininfo.vcpu = vcpu;
    3.71 -    op.u.setdomaininfo.ctxt = ctxt;
    3.72 +    op.cmd = DOM0_SETVCPUCONTEXT;
    3.73 +    op.u.setvcpucontext.domain = domid;
    3.74 +    op.u.setvcpucontext.vcpu = vcpu;
    3.75 +    op.u.setvcpucontext.ctxt = ctxt;
    3.76  
    3.77      if ( (rc = mlock(ctxt, sizeof(*ctxt))) != 0 )
    3.78          return rc;
     4.1 --- a/tools/libxc/xc_ia64_stubs.c	Fri Jan 06 12:25:47 2006 +0100
     4.2 +++ b/tools/libxc/xc_ia64_stubs.c	Fri Jan 06 12:53:19 2006 +0100
     4.3 @@ -664,7 +664,7 @@ int xc_vmx_build(int xc_handle,
     4.4          goto error_out;
     4.5      }
     4.6  
     4.7 -    if ( xc_domain_get_vcpu_context(xc_handle, domid, 0, ctxt) ){
     4.8 +    if ( xc_vcpu_getcontext(xc_handle, domid, 0, ctxt) ){
     4.9          PERROR("Could not get vcpu context");
    4.10          goto error_out;
    4.11      }
    4.12 @@ -688,11 +688,11 @@ int xc_vmx_build(int xc_handle,
    4.13  
    4.14      memset( &launch_op, 0, sizeof(launch_op) );
    4.15  
    4.16 -    launch_op.u.setdomaininfo.domain = (domid_t)domid;
    4.17 -    launch_op.u.setdomaininfo.vcpu   = 0;
    4.18 -    launch_op.u.setdomaininfo.ctxt   = ctxt;
    4.19 +    launch_op.u.setvcpucontext.domain = (domid_t)domid;
    4.20 +    launch_op.u.setvcpucontext.vcpu   = 0;
    4.21 +    launch_op.u.setvcpucontext.ctxt   = ctxt;
    4.22  
    4.23 -    launch_op.cmd = DOM0_SETDOMAININFO;
    4.24 +    launch_op.cmd = DOM0_SETVCPUCONTEXT;
    4.25      rc = do_dom0_op(xc_handle, &launch_op);
    4.26      return rc;
    4.27  
     5.1 --- a/tools/libxc/xc_linux_build.c	Fri Jan 06 12:25:47 2006 +0100
     5.2 +++ b/tools/libxc/xc_linux_build.c	Fri Jan 06 12:53:19 2006 +0100
     5.3 @@ -794,7 +794,7 @@ int xc_linux_build(int xc_handle,
     5.4          goto error_out;
     5.5      }
     5.6  
     5.7 -    if ( xc_domain_get_vcpu_context(xc_handle, domid, 0, ctxt) )
     5.8 +    if ( xc_vcpu_getcontext(xc_handle, domid, 0, ctxt) )
     5.9      {
    5.10          PERROR("Could not get vcpu context");
    5.11          goto error_out;
    5.12 @@ -897,11 +897,11 @@ int xc_linux_build(int xc_handle,
    5.13  
    5.14      memset( &launch_op, 0, sizeof(launch_op) );
    5.15  
    5.16 -    launch_op.u.setdomaininfo.domain = (domid_t)domid;
    5.17 -    launch_op.u.setdomaininfo.vcpu   = 0;
    5.18 -    launch_op.u.setdomaininfo.ctxt   = ctxt;
    5.19 +    launch_op.u.setvcpucontext.domain = (domid_t)domid;
    5.20 +    launch_op.u.setvcpucontext.vcpu   = 0;
    5.21 +    launch_op.u.setvcpucontext.ctxt   = ctxt;
    5.22  
    5.23 -    launch_op.cmd = DOM0_SETDOMAININFO;
    5.24 +    launch_op.cmd = DOM0_SETVCPUCONTEXT;
    5.25      rc = xc_dom0_op(xc_handle, &launch_op);
    5.26      
    5.27      return rc;
     6.1 --- a/tools/libxc/xc_linux_restore.c	Fri Jan 06 12:25:47 2006 +0100
     6.2 +++ b/tools/libxc/xc_linux_restore.c	Fri Jan 06 12:53:19 2006 +0100
     6.3 @@ -171,7 +171,7 @@ int xc_linux_restore(int xc_handle, int 
     6.4  
     6.5  
     6.6      /* Only have to worry about vcpu 0 even for SMP */
     6.7 -    if (xc_domain_get_vcpu_context( xc_handle, dom, 0, &ctxt)) {
     6.8 +    if (xc_vcpu_getcontext( xc_handle, dom, 0, &ctxt)) {
     6.9          ERR("Could not get vcpu context");
    6.10          goto out;
    6.11      }
    6.12 @@ -735,10 +735,10 @@ int xc_linux_restore(int xc_handle, int 
    6.13  
    6.14      DPRINTF("Domain ready to be built.\n");
    6.15  
    6.16 -    op.cmd = DOM0_SETDOMAININFO;
    6.17 -    op.u.setdomaininfo.domain = (domid_t)dom;
    6.18 -    op.u.setdomaininfo.vcpu   = 0;
    6.19 -    op.u.setdomaininfo.ctxt   = &ctxt;
    6.20 +    op.cmd = DOM0_SETVCPUCONTEXT;
    6.21 +    op.u.setvcpucontext.domain = (domid_t)dom;
    6.22 +    op.u.setvcpucontext.vcpu   = 0;
    6.23 +    op.u.setvcpucontext.ctxt   = &ctxt;
    6.24      rc = xc_dom0_op(xc_handle, &op);
    6.25  
    6.26      if (rc != 0) {
     7.1 --- a/tools/libxc/xc_linux_save.c	Fri Jan 06 12:25:47 2006 +0100
     7.2 +++ b/tools/libxc/xc_linux_save.c	Fri Jan 06 12:53:19 2006 +0100
     7.3 @@ -382,7 +382,7 @@ static int suspend_and_state(int xc_hand
     7.4          return -1;
     7.5      }
     7.6  
     7.7 -    if ( xc_domain_get_vcpu_context(xc_handle, dom, 0 /* XXX */, ctxt)) 
     7.8 +    if ( xc_vcpu_getcontext(xc_handle, dom, 0 /* XXX */, ctxt)) 
     7.9          ERR("Could not get vcpu context");
    7.10  
    7.11  
    7.12 @@ -643,7 +643,7 @@ int xc_linux_save(int xc_handle, int io_
    7.13      }
    7.14      
    7.15      /* Only have to worry about vcpu 0 even for SMP */
    7.16 -    if (xc_domain_get_vcpu_context(xc_handle, dom, 0, &ctxt)) {
    7.17 +    if (xc_vcpu_getcontext(xc_handle, dom, 0, &ctxt)) {
    7.18          ERR("Could not get vcpu context");
    7.19          goto out;
    7.20      }
     8.1 --- a/tools/libxc/xc_pagetab.c	Fri Jan 06 12:25:47 2006 +0100
     8.2 +++ b/tools/libxc/xc_pagetab.c	Fri Jan 06 12:53:19 2006 +0100
     8.3 @@ -74,7 +74,7 @@ unsigned long xc_translate_foreign_addre
     8.4  #define pt_levels 4
     8.5  #endif
     8.6  
     8.7 -    if (xc_domain_get_vcpu_context(xc_handle, dom, vcpu, &ctx) != 0) {
     8.8 +    if (xc_vcpu_getcontext(xc_handle, dom, vcpu, &ctx) != 0) {
     8.9          fprintf(stderr, "failed to retreive vcpu context\n");
    8.10          goto out;
    8.11      }
     9.1 --- a/tools/libxc/xc_ptrace.c	Fri Jan 06 12:25:47 2006 +0100
     9.2 +++ b/tools/libxc/xc_ptrace.c	Fri Jan 06 12:53:19 2006 +0100
     9.3 @@ -33,7 +33,7 @@ fetch_regs(int xc_handle, int cpu, int *
     9.4      if (online)
     9.5          *online = 0;
     9.6      if ( !(regs_valid & (1 << cpu)) ) { 
     9.7 -        retval = xc_domain_get_vcpu_context(xc_handle, current_domid, 
     9.8 +        retval = xc_vcpu_getcontext(xc_handle, current_domid, 
     9.9  						cpu, &ctxt[cpu]);
    9.10          if ( retval ) 
    9.11              goto done;
    9.12 @@ -43,8 +43,7 @@ fetch_regs(int xc_handle, int cpu, int *
    9.13  	if ( online == NULL )
    9.14  	    goto done;
    9.15  
    9.16 -	retval = xc_domain_get_vcpu_info(xc_handle, current_domid,
    9.17 -					 cpu, &info);
    9.18 +	retval = xc_vcpu_getinfo(xc_handle, current_domid, cpu, &info);
    9.19  	*online = info.online;
    9.20      
    9.21   done:
    9.22 @@ -395,7 +394,7 @@ xc_ptrace(
    9.23  
    9.24      case PTRACE_SETREGS:
    9.25          SET_XC_REGS(((struct gdb_regs *)data), ctxt[cpu].user_regs);
    9.26 -        retval = xc_domain_setinfo(xc_handle, current_domid, cpu, &ctxt[cpu]);
    9.27 +        retval = xc_vcpu_setcontext(xc_handle, current_domid, cpu, &ctxt[cpu]);
    9.28          if (retval)
    9.29              goto error_out;
    9.30          break;
    9.31 @@ -405,7 +404,7 @@ xc_ptrace(
    9.32           *  during single-stepping - but that just seems retarded
    9.33           */
    9.34          ctxt[cpu].user_regs.eflags |= PSL_T; 
    9.35 -        retval = xc_domain_setinfo(xc_handle, current_domid, cpu, &ctxt[cpu]);
    9.36 +        retval = xc_vcpu_setcontext(xc_handle, current_domid, cpu, &ctxt[cpu]);
    9.37          if ( retval )
    9.38          {
    9.39              perror("dom0 op failed");
    9.40 @@ -423,8 +422,8 @@ xc_ptrace(
    9.41                  /* Clear trace flag */
    9.42                  if ( ctxt[cpu].user_regs.eflags & PSL_T ) {
    9.43                      ctxt[cpu].user_regs.eflags &= ~PSL_T;
    9.44 -                    retval = xc_domain_setinfo(xc_handle, current_domid, 
    9.45 -                                               cpu, &ctxt[cpu]);
    9.46 +                    retval = xc_vcpu_setcontext(xc_handle, current_domid, 
    9.47 +                                                cpu, &ctxt[cpu]);
    9.48                      if ( retval ) {
    9.49                          perror("dom0 op failed");
    9.50                          goto error_out;
    10.1 --- a/tools/libxc/xc_vmx_build.c	Fri Jan 06 12:25:47 2006 +0100
    10.2 +++ b/tools/libxc/xc_vmx_build.c	Fri Jan 06 12:53:19 2006 +0100
    10.3 @@ -651,7 +651,7 @@ int xc_vmx_build(int xc_handle,
    10.4          goto error_out;
    10.5      }
    10.6  
    10.7 -    if ( xc_domain_get_vcpu_context(xc_handle, domid, 0, ctxt) )
    10.8 +    if ( xc_vcpu_getcontext(xc_handle, domid, 0, ctxt) )
    10.9      {
   10.10          PERROR("Could not get vcpu context");
   10.11          goto error_out;
   10.12 @@ -708,11 +708,11 @@ int xc_vmx_build(int xc_handle,
   10.13  
   10.14      memset( &launch_op, 0, sizeof(launch_op) );
   10.15  
   10.16 -    launch_op.u.setdomaininfo.domain = (domid_t)domid;
   10.17 -    launch_op.u.setdomaininfo.vcpu   = 0;
   10.18 -    launch_op.u.setdomaininfo.ctxt   = ctxt;
   10.19 +    launch_op.u.setvcpucontext.domain = (domid_t)domid;
   10.20 +    launch_op.u.setvcpucontext.vcpu   = 0;
   10.21 +    launch_op.u.setvcpucontext.ctxt   = ctxt;
   10.22  
   10.23 -    launch_op.cmd = DOM0_SETDOMAININFO;
   10.24 +    launch_op.cmd = DOM0_SETVCPUCONTEXT;
   10.25      rc = xc_dom0_op(xc_handle, &launch_op);
   10.26  
   10.27      return rc;
    11.1 --- a/tools/libxc/xenctrl.h	Fri Jan 06 12:25:47 2006 +0100
    11.2 +++ b/tools/libxc/xenctrl.h	Fri Jan 06 12:53:19 2006 +0100
    11.3 @@ -181,10 +181,11 @@ int xc_domain_unpause(int xc_handle,
    11.4   */
    11.5  int xc_domain_destroy(int xc_handle, 
    11.6                        uint32_t domid);
    11.7 -int xc_domain_pincpu(int xc_handle,
    11.8 -                     uint32_t domid,
    11.9 -                     int vcpu,
   11.10 -                     cpumap_t cpumap);
   11.11 +
   11.12 +int xc_vcpu_setaffinity(int xc_handle,
   11.13 +                        uint32_t domid,
   11.14 +                        int vcpu,
   11.15 +                        cpumap_t cpumap);
   11.16  
   11.17  /**
   11.18   * This function will return information about one or more domains. It is
   11.19 @@ -208,7 +209,7 @@ int xc_domain_getinfo(int xc_handle,
   11.20  
   11.21  
   11.22  /**
   11.23 - * This function will set the vcpu context for the specified domain.
   11.24 + * This function will set the execution context for the specified vcpu.
   11.25   *
   11.26   * @parm xc_handle a handle to an open hypervisor interface
   11.27   * @parm domid the domain to set the vcpu context for
   11.28 @@ -216,10 +217,10 @@ int xc_domain_getinfo(int xc_handle,
   11.29   * @parm ctxt pointer to the the cpu context with the values to set
   11.30   * @return the number of domains enumerated or -1 on error
   11.31   */
   11.32 -int xc_domain_setinfo(int xc_handle,
   11.33 -                      uint32_t domid,
   11.34 -                      uint32_t vcpu,
   11.35 -                      vcpu_guest_context_t *ctxt);
   11.36 +int xc_vcpu_setcontext(int xc_handle,
   11.37 +                       uint32_t domid,
   11.38 +                       uint32_t vcpu,
   11.39 +                       vcpu_guest_context_t *ctxt);
   11.40  /**
   11.41   * This function will return information about one or more domains, using a
   11.42   * single hypercall.  The domain information will be stored into the supplied
   11.43 @@ -249,17 +250,16 @@ int xc_domain_getinfolist(int xc_handle,
   11.44   *            domain
   11.45   * @return 0 on success, -1 on failure
   11.46   */
   11.47 -int xc_domain_get_vcpu_context(int xc_handle,
   11.48 +int xc_vcpu_getcontext(int xc_handle,
   11.49                                 uint32_t domid,
   11.50                                 uint32_t vcpu,
   11.51                                 vcpu_guest_context_t *ctxt);
   11.52  
   11.53  typedef dom0_getvcpuinfo_t xc_vcpuinfo_t;
   11.54 -int xc_domain_get_vcpu_info(int xc_handle,
   11.55 -                            uint32_t domid,
   11.56 -                            uint32_t vcpu,
   11.57 -                            xc_vcpuinfo_t *info);
   11.58 -
   11.59 +int xc_vcpu_getinfo(int xc_handle,
   11.60 +                    uint32_t domid,
   11.61 +                    uint32_t vcpu,
   11.62 +                    xc_vcpuinfo_t *info);
   11.63  
   11.64  int xc_domain_setcpuweight(int xc_handle,
   11.65                             uint32_t domid,
    12.1 --- a/tools/python/xen/lowlevel/xc/xc.c	Fri Jan 06 12:25:47 2006 +0100
    12.2 +++ b/tools/python/xen/lowlevel/xc/xc.c	Fri Jan 06 12:53:19 2006 +0100
    12.3 @@ -135,9 +135,9 @@ static PyObject *pyxc_domain_destroy(XcO
    12.4  }
    12.5  
    12.6  
    12.7 -static PyObject *pyxc_domain_pincpu(XcObject *self,
    12.8 -                                    PyObject *args,
    12.9 -                                    PyObject *kwds)
   12.10 +static PyObject *pyxc_vcpu_setaffinity(XcObject *self,
   12.11 +                                       PyObject *args,
   12.12 +                                       PyObject *kwds)
   12.13  {
   12.14      uint32_t dom;
   12.15      int vcpu = 0, i;
   12.16 @@ -157,7 +157,7 @@ static PyObject *pyxc_domain_pincpu(XcOb
   12.17              cpumap |= (cpumap_t)1 << PyInt_AsLong(PyList_GetItem(cpulist, i));
   12.18      }
   12.19    
   12.20 -    if ( xc_domain_pincpu(self->xc_handle, dom, vcpu, cpumap) != 0 )
   12.21 +    if ( xc_vcpu_setaffinity(self->xc_handle, dom, vcpu, cpumap) != 0 )
   12.22          return PyErr_SetFromErrno(xc_error);
   12.23      
   12.24      Py_INCREF(zero);
   12.25 @@ -297,7 +297,7 @@ static PyObject *pyxc_vcpu_getinfo(XcObj
   12.26                                        &dom, &vcpu) )
   12.27          return NULL;
   12.28  
   12.29 -    rc = xc_domain_get_vcpu_info(self->xc_handle, dom, vcpu, &info);
   12.30 +    rc = xc_vcpu_getinfo(self->xc_handle, dom, vcpu, &info);
   12.31      if ( rc < 0 )
   12.32          return PyErr_SetFromErrno(xc_error);
   12.33  
   12.34 @@ -890,8 +890,8 @@ static PyMethodDef pyxc_methods[] = {
   12.35        " dom [int]:    Identifier of domain to be destroyed.\n\n"
   12.36        "Returns: [int] 0 on success; -1 on error.\n" },
   12.37  
   12.38 -    { "domain_pincpu", 
   12.39 -      (PyCFunction)pyxc_domain_pincpu, 
   12.40 +    { "vcpu_setaffinity", 
   12.41 +      (PyCFunction)pyxc_vcpu_setaffinity, 
   12.42        METH_VARARGS | METH_KEYWORDS, "\n"
   12.43        "Pin a VCPU to a specified set CPUs.\n"
   12.44        " dom [int]:     Identifier of domain to which VCPU belongs.\n"
    13.1 --- a/tools/python/xen/xend/XendDomain.py	Fri Jan 06 12:25:47 2006 +0100
    13.2 +++ b/tools/python/xen/xend/XendDomain.py	Fri Jan 06 12:53:19 2006 +0100
    13.3 @@ -443,7 +443,7 @@ class XendDomain:
    13.4          cpumap = map(lambda x: int(x),
    13.5                       cpumap.replace("[", "").replace("]", "").split(","))
    13.6          try:
    13.7 -            return xc.domain_pincpu(dominfo.getDomid(), vcpu, cpumap)
    13.8 +            return xc.vcpu_setaffinity(dominfo.getDomid(), vcpu, cpumap)
    13.9          except Exception, ex:
   13.10              raise XendError(str(ex))
   13.11  
    14.1 --- a/tools/python/xen/xend/XendDomainInfo.py	Fri Jan 06 12:25:47 2006 +0100
    14.2 +++ b/tools/python/xen/xend/XendDomainInfo.py	Fri Jan 06 12:53:19 2006 +0100
    14.3 @@ -1179,7 +1179,7 @@ class XendDomainInfo:
    14.4                  for v in range(0, self.info['max_vcpu_id']+1):
    14.5                      # pincpu takes a list of ints
    14.6                      cpu = [ int( cpus[v % len(cpus)] ) ]
    14.7 -                    xc.domain_pincpu(self.domid, v, cpu)
    14.8 +                    xc.vcpu_setaffinity(self.domid, v, cpu)
    14.9  
   14.10              m = self.image.getDomainMemory(self.info['memory'] * 1024)
   14.11              balloon.free(m)
    15.1 --- a/tools/xentrace/xenctx.c	Fri Jan 06 12:25:47 2006 +0100
    15.2 +++ b/tools/xentrace/xenctx.c	Fri Jan 06 12:53:19 2006 +0100
    15.3 @@ -380,10 +380,10 @@ void dump_ctx(int vcpu)
    15.4          exit(-1);
    15.5      }
    15.6  
    15.7 -    ret = xc_domain_get_vcpu_context(xc_handle, domid, vcpu, &ctx);
    15.8 +    ret = xc_vcpu_getcontext(xc_handle, domid, vcpu, &ctx);
    15.9      if (ret < 0) {
   15.10          xc_domain_unpause(xc_handle, domid);
   15.11 -        perror("xc_domain_get_vcpu_context");
   15.12 +        perror("xc_vcpu_getcontext");
   15.13          exit(-1);
   15.14      }
   15.15  
    16.1 --- a/xen/common/dom0_ops.c	Fri Jan 06 12:25:47 2006 +0100
    16.2 +++ b/xen/common/dom0_ops.c	Fri Jan 06 12:53:19 2006 +0100
    16.3 @@ -110,13 +110,13 @@ long do_dom0_op(dom0_op_t *u_dom0_op)
    16.4      switch ( op->cmd )
    16.5      {
    16.6  
    16.7 -    case DOM0_SETDOMAININFO:
    16.8 +    case DOM0_SETVCPUCONTEXT:
    16.9      {
   16.10 -        struct domain *d = find_domain_by_id(op->u.setdomaininfo.domain);
   16.11 +        struct domain *d = find_domain_by_id(op->u.setvcpucontext.domain);
   16.12          ret = -ESRCH;
   16.13          if ( d != NULL )
   16.14          {
   16.15 -            ret = set_info_guest(d, &op->u.setdomaininfo);
   16.16 +            ret = set_info_guest(d, &op->u.setvcpucontext);
   16.17              put_domain(d);
   16.18          }
   16.19      }
   16.20 @@ -284,9 +284,9 @@ long do_dom0_op(dom0_op_t *u_dom0_op)
   16.21      }
   16.22      break;
   16.23  
   16.24 -    case DOM0_PINCPUDOMAIN:
   16.25 +    case DOM0_SETVCPUAFFINITY:
   16.26      {
   16.27 -        domid_t dom = op->u.pincpudomain.domain;
   16.28 +        domid_t dom = op->u.setvcpuaffinity.domain;
   16.29          struct domain *d = find_domain_by_id(dom);
   16.30          struct vcpu *v;
   16.31  
   16.32 @@ -296,15 +296,15 @@ long do_dom0_op(dom0_op_t *u_dom0_op)
   16.33              break;
   16.34          }
   16.35          
   16.36 -        if ( (op->u.pincpudomain.vcpu >= MAX_VIRT_CPUS) ||
   16.37 -             !d->vcpu[op->u.pincpudomain.vcpu] )
   16.38 +        if ( (op->u.setvcpuaffinity.vcpu >= MAX_VIRT_CPUS) ||
   16.39 +             !d->vcpu[op->u.setvcpuaffinity.vcpu] )
   16.40          {
   16.41              ret = -EINVAL;
   16.42              put_domain(d);
   16.43              break;
   16.44          }
   16.45  
   16.46 -        v = d->vcpu[op->u.pincpudomain.vcpu];
   16.47 +        v = d->vcpu[op->u.setvcpuaffinity.vcpu];
   16.48          if ( v == NULL )
   16.49          {
   16.50              ret = -ESRCH;
   16.51 @@ -320,9 +320,9 @@ long do_dom0_op(dom0_op_t *u_dom0_op)
   16.52          }
   16.53  
   16.54          memcpy(cpus_addr(v->cpu_affinity),
   16.55 -               &op->u.pincpudomain.cpumap,
   16.56 +               &op->u.setvcpuaffinity.cpumap,
   16.57                 min((int)BITS_TO_LONGS(NR_CPUS),
   16.58 -                   (int)sizeof(op->u.pincpudomain.cpumap)));
   16.59 +                   (int)sizeof(op->u.setvcpuaffinity.cpumap)));
   16.60  
   16.61          vcpu_pause(v);
   16.62          vcpu_migrate_cpu(v, first_cpu(v->cpu_affinity));
    17.1 --- a/xen/common/domain.c	Fri Jan 06 12:25:47 2006 +0100
    17.2 +++ b/xen/common/domain.c	Fri Jan 06 12:53:19 2006 +0100
    17.3 @@ -357,11 +357,11 @@ void domain_unpause_by_systemcontroller(
    17.4   * of domains other than domain 0. ie. the domains that are being built by 
    17.5   * the userspace dom0 domain builder.
    17.6   */
    17.7 -int set_info_guest(struct domain *d, dom0_setdomaininfo_t *setdomaininfo)
    17.8 +int set_info_guest(struct domain *d, dom0_setvcpucontext_t *setvcpucontext)
    17.9  {
   17.10      int rc = 0;
   17.11      struct vcpu_guest_context *c = NULL;
   17.12 -    unsigned long vcpu = setdomaininfo->vcpu;
   17.13 +    unsigned long vcpu = setvcpucontext->vcpu;
   17.14      struct vcpu *v; 
   17.15  
   17.16      if ( (vcpu >= MAX_VIRT_CPUS) || ((v = d->vcpu[vcpu]) == NULL) )
   17.17 @@ -374,7 +374,7 @@ int set_info_guest(struct domain *d, dom
   17.18          return -ENOMEM;
   17.19  
   17.20      rc = -EFAULT;
   17.21 -    if ( copy_from_user(c, setdomaininfo->ctxt, sizeof(*c)) == 0 )
   17.22 +    if ( copy_from_user(c, setvcpucontext->ctxt, sizeof(*c)) == 0 )
   17.23          rc = arch_set_info_guest(v, c);
   17.24  
   17.25      xfree(c);
    18.1 --- a/xen/include/public/dom0_ops.h	Fri Jan 06 12:25:47 2006 +0100
    18.2 +++ b/xen/include/public/dom0_ops.h	Fri Jan 06 12:53:19 2006 +0100
    18.3 @@ -94,14 +94,14 @@ typedef struct {
    18.4      xen_domain_handle_t handle;
    18.5  } dom0_getdomaininfo_t;
    18.6  
    18.7 -#define DOM0_SETDOMAININFO      13
    18.8 +#define DOM0_SETVCPUCONTEXT   13
    18.9  typedef struct {
   18.10      /* IN variables. */
   18.11      domid_t               domain;
   18.12      uint32_t              vcpu;
   18.13      /* IN/OUT parameters */
   18.14      vcpu_guest_context_t *ctxt;
   18.15 -} dom0_setdomaininfo_t;
   18.16 +} dom0_setvcpucontext_t;
   18.17  
   18.18  #define DOM0_MSR              15
   18.19  typedef struct {
   18.20 @@ -163,13 +163,13 @@ typedef struct {
   18.21  /* 
   18.22   * Set which physical cpus a vcpu can execute on.
   18.23   */
   18.24 -#define DOM0_PINCPUDOMAIN     20
   18.25 +#define DOM0_SETVCPUAFFINITY  20
   18.26  typedef struct {
   18.27      /* IN variables. */
   18.28      domid_t   domain;
   18.29      uint32_t  vcpu;
   18.30      cpumap_t  cpumap;
   18.31 -} dom0_pincpudomain_t;
   18.32 +} dom0_setvcpuaffinity_t;
   18.33  
   18.34  /* Get trace buffers machine base address */
   18.35  #define DOM0_TBUFCONTROL       21
   18.36 @@ -436,13 +436,13 @@ typedef struct {
   18.37          dom0_getmemlist_t        getmemlist;
   18.38          dom0_schedctl_t          schedctl;
   18.39          dom0_adjustdom_t         adjustdom;
   18.40 -        dom0_setdomaininfo_t     setdomaininfo;
   18.41 +        dom0_setvcpucontext_t    setvcpucontext;
   18.42          dom0_getdomaininfo_t     getdomaininfo;
   18.43          dom0_getpageframeinfo_t  getpageframeinfo;
   18.44          dom0_msr_t               msr;
   18.45          dom0_settime_t           settime;
   18.46          dom0_readconsole_t       readconsole;
   18.47 -        dom0_pincpudomain_t      pincpudomain;
   18.48 +        dom0_setvcpuaffinity_t   setvcpuaffinity;
   18.49          dom0_tbufcontrol_t       tbufcontrol;
   18.50          dom0_physinfo_t          physinfo;
   18.51          dom0_sched_id_t          sched_id;
    19.1 --- a/xen/include/xen/sched.h	Fri Jan 06 12:25:47 2006 +0100
    19.2 +++ b/xen/include/xen/sched.h	Fri Jan 06 12:53:19 2006 +0100
    19.3 @@ -221,7 +221,7 @@ extern int construct_dom0(
    19.4      unsigned long image_start, unsigned long image_len, 
    19.5      unsigned long initrd_start, unsigned long initrd_len,
    19.6      char *cmdline);
    19.7 -extern int set_info_guest(struct domain *d, dom0_setdomaininfo_t *);
    19.8 +extern int set_info_guest(struct domain *d, dom0_setvcpucontext_t *);
    19.9  
   19.10  struct domain *find_domain_by_id(domid_t dom);
   19.11  extern void domain_destruct(struct domain *d);