direct-io.hg

changeset 2693:2584528df9e1

bitkeeper revision 1.1159.123.2 (4177d169N58TtQXn_XJO4xNBKbMQUw)

Merge freefall.cl.cam.ac.uk:/auto/groups/xeno/BK/xeno.bk
into freefall.cl.cam.ac.uk:/local/scratch/kaf24/xeno
author kaf24@freefall.cl.cam.ac.uk
date Thu Oct 21 15:10:33 2004 +0000 (2004-10-21)
parents bd272fb0c28f d8e27145f1eb
children 59daee42dceb a9128b3b9f45
files linux-2.6.8.1-xen-sparse/drivers/xen/balloon/balloon.c tools/libxc/xc.h tools/libxc/xc_domain.c tools/libxc/xc_linux_restore.c tools/libxc/xc_linux_save.c tools/python/xen/lowlevel/xc/xc.c tools/python/xen/xend/XendDomain.py tools/python/xen/xend/XendDomainInfo.py xen/common/dom0_ops.c xen/common/domain.c xen/include/hypervisor-ifs/dom0_ops.h xen/include/xen/sched.h
line diff
     1.1 --- a/linux-2.6.8.1-xen-sparse/drivers/xen/balloon/balloon.c	Thu Oct 21 14:15:00 2004 +0000
     1.2 +++ b/linux-2.6.8.1-xen-sparse/drivers/xen/balloon/balloon.c	Thu Oct 21 15:10:33 2004 +0000
     1.3 @@ -388,6 +388,8 @@ claim_new_pages(unsigned long num_pages)
     1.4  
     1.5  static int balloon_try_target(int target)
     1.6  {
     1.7 +    int change, reclaim;
     1.8 +
     1.9      if ( target < current_pages )
    1.10      {
    1.11          int change = inflate_balloon(current_pages-target);
    1.12 @@ -400,7 +402,7 @@ static int balloon_try_target(int target
    1.13      }
    1.14      else if ( target > current_pages )
    1.15      {
    1.16 -        int change, reclaim = min(target,most_seen_pages) - current_pages;
    1.17 +        reclaim = min((unsigned long)target,most_seen_pages) - current_pages;
    1.18  
    1.19          if ( reclaim )
    1.20          {
     2.1 --- a/tools/libxc/xc.h	Thu Oct 21 14:15:00 2004 +0000
     2.2 +++ b/tools/libxc/xc.h	Thu Oct 21 15:10:33 2004 +0000
     2.3 @@ -31,8 +31,6 @@ typedef struct {
     2.4      unsigned long nr_pages;
     2.5      unsigned long shared_info_frame;
     2.6      u64           cpu_time;
     2.7 -#define XC_DOMINFO_MAXNAME 16
     2.8 -    char          name[XC_DOMINFO_MAXNAME];
     2.9      unsigned long max_memkb;
    2.10  } xc_dominfo_t;
    2.11  
    2.12 @@ -46,7 +44,6 @@ typedef struct xc_shadow_control_stats_s
    2.13  
    2.14  int xc_domain_create(int xc_handle, 
    2.15                       unsigned int mem_kb, 
    2.16 -                     const char *name,
    2.17                       int cpu,
    2.18                       float cpu_weight,
    2.19                       u32 *pdomid);
    2.20 @@ -193,10 +190,6 @@ int xc_physinfo(int xc_handle,
    2.21  int xc_sched_id(int xc_handle,
    2.22                  int *sched_id);
    2.23  
    2.24 -int xc_domain_setname(int xc_handle,
    2.25 -                      u32 domid, 
    2.26 -                      char *name);
    2.27 -
    2.28  int xc_domain_setinitialmem(int xc_handle,
    2.29                              u32 domid, 
    2.30                              unsigned int initial_memkb);
     3.1 --- a/tools/libxc/xc_domain.c	Thu Oct 21 14:15:00 2004 +0000
     3.2 +++ b/tools/libxc/xc_domain.c	Thu Oct 21 15:10:33 2004 +0000
     3.3 @@ -10,7 +10,6 @@
     3.4  
     3.5  int xc_domain_create(int xc_handle,
     3.6                       unsigned int mem_kb, 
     3.7 -                     const char *name,
     3.8                       int cpu,
     3.9                       float cpu_weight,
    3.10                       u32 *pdomid)
    3.11 @@ -21,8 +20,6 @@ int xc_domain_create(int xc_handle,
    3.12      op.cmd = DOM0_CREATEDOMAIN;
    3.13      op.u.createdomain.domain = (domid_t)*pdomid;
    3.14      op.u.createdomain.memory_kb = mem_kb;
    3.15 -    strncpy(op.u.createdomain.name, name, MAX_DOMAIN_NAME);
    3.16 -    op.u.createdomain.name[MAX_DOMAIN_NAME-1] = '\0';
    3.17      op.u.createdomain.cpu = cpu;
    3.18  
    3.19      if ( (err = do_dom0_op(xc_handle, &op)) == 0 )
    3.20 @@ -113,8 +110,6 @@ int xc_domain_getinfo(int xc_handle,
    3.21          info->max_memkb = op.u.getdomaininfo.max_pages<<(PAGE_SHIFT);
    3.22          info->shared_info_frame = op.u.getdomaininfo.shared_info_frame;
    3.23          info->cpu_time = op.u.getdomaininfo.cpu_time;
    3.24 -        strncpy(info->name, op.u.getdomaininfo.name, XC_DOMINFO_MAXNAME);
    3.25 -        info->name[XC_DOMINFO_MAXNAME-1] = '\0';
    3.26  
    3.27          next_domid = (u16)op.u.getdomaininfo.domain + 1;
    3.28          info++;
    3.29 @@ -165,17 +160,6 @@ int xc_shadow_control(int xc_handle,
    3.30      return (rc == 0) ? op.u.shadow_control.pages : rc;
    3.31  }
    3.32  
    3.33 -int xc_domain_setname(int xc_handle,
    3.34 -                      u32 domid, 
    3.35 -                      char *name)
    3.36 -{
    3.37 -    dom0_op_t op;
    3.38 -    op.cmd = DOM0_SETDOMAINNAME;
    3.39 -    op.u.setdomainname.domain = (domid_t)domid;
    3.40 -    strncpy(op.u.setdomainname.name, name, MAX_DOMAIN_NAME);
    3.41 -    return do_dom0_op(xc_handle, &op);
    3.42 -}
    3.43 -
    3.44  int xc_domain_setcpuweight(int xc_handle,
    3.45                             u32 domid,
    3.46                             float weight)
     4.1 --- a/tools/libxc/xc_linux_restore.c	Thu Oct 21 14:15:00 2004 +0000
     4.2 +++ b/tools/libxc/xc_linux_restore.c	Thu Oct 21 15:10:33 2004 +0000
     4.3 @@ -102,9 +102,6 @@ int xc_linux_restore(int xc_handle, XcIO
     4.4      /* First 16 bytes of the state file must contain 'LinuxGuestRecord'. */
     4.5      char signature[16];
     4.6      
     4.7 -    /* A copy of the domain's name. */
     4.8 -    char name[MAX_DOMAIN_NAME];
     4.9 -
    4.10      /* A table containg the type of each PFN (/not/ MFN!). */
    4.11      unsigned long *pfn_type = NULL;
    4.12  
    4.13 @@ -149,8 +146,7 @@ int xc_linux_restore(int xc_handle, XcIO
    4.14          goto out;
    4.15      }
    4.16  
    4.17 -    if ( xcio_read(ioctxt, name,                  sizeof(name)) ||
    4.18 -         xcio_read(ioctxt, &nr_pfns,              sizeof(unsigned long)) ||
    4.19 +    if ( xcio_read(ioctxt, &nr_pfns,              sizeof(unsigned long)) ||
    4.20           xcio_read(ioctxt, pfn_to_mfn_frame_list, PAGE_SIZE) )
    4.21      {
    4.22          xcio_error(ioctxt, "Error reading header");
    4.23 @@ -163,17 +159,6 @@ int xc_linux_restore(int xc_handle, XcIO
    4.24          goto out;
    4.25      }
    4.26  
    4.27 -    for ( i = 0; i < MAX_DOMAIN_NAME; i++ ) 
    4.28 -    {
    4.29 -        if ( name[i] == '\0' ) break;
    4.30 -        if ( name[i] & 0x80 )
    4.31 -        {
    4.32 -            xcio_error(ioctxt, "Random characters in domain name");
    4.33 -            goto out;
    4.34 -        }
    4.35 -    }
    4.36 -    name[MAX_DOMAIN_NAME-1] = '\0';
    4.37 -
    4.38      if ( nr_pfns > 1024*1024 )
    4.39      {
    4.40          xcio_error(ioctxt, "Invalid state file -- pfn count out of range");
    4.41 @@ -199,30 +184,9 @@ int xc_linux_restore(int xc_handle, XcIO
    4.42          goto out;
    4.43      }
    4.44  
    4.45 -#if 0
    4.46 -    /* Set the domain's name to that from the restore file */
    4.47 -    if ( xc_domain_setname( xc_handle, dom, name ) )
    4.48 -    {
    4.49 -        xcio_error(ioctxt, "Could not set domain name");
    4.50 -        goto out;
    4.51 -    }
    4.52 -
    4.53 -    /* Set the domain's initial memory allocation 
    4.54 -       to that from the restore file */
    4.55 -
    4.56 -    if ( xc_domain_setinitialmem(xc_handle, dom, 
    4.57 -                                 nr_pfns * (PAGE_SIZE / 1024)) )
    4.58 -    {
    4.59 -        xcio_error(ioctxt, "Could not set domain %d initial memory. pfns=%d, %dKB",
    4.60 -		   dom, nr_pfns,nr_pfns * (PAGE_SIZE / 1024));
    4.61 -        goto out;
    4.62 -    }
    4.63 -#endif
    4.64 -
    4.65 -
    4.66 -    /* XXX create domain on CPU=-1 so that in future it auto load ballances by default */
    4.67 -    if ( xc_domain_create( xc_handle,  nr_pfns * (PAGE_SIZE / 1024),
    4.68 -			   "", -1, 1, &dom ) )
    4.69 +    /* Create domain on CPU -1 so that it may auto load-balance in future. */
    4.70 +    if ( xc_domain_create(xc_handle, nr_pfns * (PAGE_SIZE / 1024),
    4.71 +                          -1, 1, &dom) )
    4.72      {
    4.73  	xcio_error(ioctxt, "Could not create domain. pfns=%d, %dKB",
    4.74  		   nr_pfns,nr_pfns * (PAGE_SIZE / 1024));
     5.1 --- a/tools/libxc/xc_linux_save.c	Thu Oct 21 14:15:00 2004 +0000
     5.2 +++ b/tools/libxc/xc_linux_save.c	Thu Oct 21 15:10:33 2004 +0000
     5.3 @@ -303,9 +303,6 @@ int xc_linux_save(int xc_handle, XcIOCon
     5.4      /* A copy of the CPU context of the guest. */
     5.5      full_execution_context_t ctxt;
     5.6  
     5.7 -    /* A copy of the domain's name. */
     5.8 -    char name[MAX_DOMAIN_NAME];
     5.9 -
    5.10      /* A table containg the type of each PFN (/not/ MFN!). */
    5.11      unsigned long *pfn_type = NULL;
    5.12      unsigned long *pfn_batch = NULL;
    5.13 @@ -359,7 +356,6 @@ int xc_linux_save(int xc_handle, XcIOCon
    5.14          xcio_error(ioctxt, "Could not get full domain info");
    5.15          goto out;
    5.16      }
    5.17 -    memcpy(name, op.u.getdomaininfo.name, sizeof(name));
    5.18      shared_info_frame = op.u.getdomaininfo.shared_info_frame;
    5.19  
    5.20      /* A cheesy test to see whether the domain contains valid state. */
    5.21 @@ -539,7 +535,6 @@ int xc_linux_save(int xc_handle, XcIOCon
    5.22      /* Start writing out the saved-domain record. */
    5.23  
    5.24      if ( xcio_write(ioctxt, "LinuxGuestRecord",    16) ||
    5.25 -         xcio_write(ioctxt, name,                  sizeof(name)) ||
    5.26           xcio_write(ioctxt, &nr_pfns,              sizeof(unsigned long)) ||
    5.27           xcio_write(ioctxt, pfn_to_mfn_frame_list, PAGE_SIZE) ){
    5.28          xcio_error(ioctxt, "Error writing header");
     6.1 --- a/tools/python/xen/lowlevel/xc/xc.c	Thu Oct 21 14:15:00 2004 +0000
     6.2 +++ b/tools/python/xen/lowlevel/xc/xc.c	Thu Oct 21 15:10:33 2004 +0000
     6.3 @@ -42,21 +42,19 @@ static PyObject *pyxc_domain_create(PyOb
     6.4      XcObject *xc = (XcObject *)self;
     6.5  
     6.6      unsigned int mem_kb = 0;
     6.7 -    char        *name   = "(anon)";
     6.8      int          cpu = -1;
     6.9      float        cpu_weight = 1;
    6.10      u32          dom = 0;
    6.11      int          ret;
    6.12  
    6.13 -    static char *kwd_list[] = { "dom", "mem_kb", "name", 
    6.14 -                                "cpu", "cpu_weight", NULL };
    6.15 +    static char *kwd_list[] = { "dom", "mem_kb", "cpu", "cpu_weight", NULL };
    6.16  
    6.17 -    if ( !PyArg_ParseTupleAndKeywords(args, kwds, "|iisif", kwd_list, 
    6.18 -                                      &dom, &mem_kb, &name, &cpu, &cpu_weight))
    6.19 +    if ( !PyArg_ParseTupleAndKeywords(args, kwds, "|iiif", kwd_list, 
    6.20 +                                      &dom, &mem_kb, &cpu, &cpu_weight))
    6.21          return NULL;
    6.22  
    6.23      if ( (ret = xc_domain_create(
    6.24 -                    xc->xc_handle, mem_kb, name, cpu, cpu_weight, &dom)) < 0 )
    6.25 +                    xc->xc_handle, mem_kb, cpu, cpu_weight, &dom)) < 0 )
    6.26          return PyErr_SetFromErrno(xc_error);
    6.27  
    6.28      return PyInt_FromLong(dom);
    6.29 @@ -172,7 +170,7 @@ static PyObject *pyxc_domain_getinfo(PyO
    6.30          PyList_SetItem(
    6.31              list, i, 
    6.32              Py_BuildValue("{s:i,s:i,s:i,s:i,s:i,s:i,s:i,s:i"
    6.33 -                          ",s:l,s:L,s:s,s:l,s:i}",
    6.34 +                          ",s:l,s:L,s:l,s:i}",
    6.35                            "dom",       info[i].domid,
    6.36                            "cpu",       info[i].cpu,
    6.37                            "dying",     info[i].dying,
    6.38 @@ -183,7 +181,6 @@ static PyObject *pyxc_domain_getinfo(PyO
    6.39                            "running",   info[i].running,
    6.40                            "mem_kb",    info[i].nr_pages*4,
    6.41                            "cpu_time",  info[i].cpu_time,
    6.42 -                          "name",      info[i].name,
    6.43                            "maxmem_kb", info[i].max_memkb,
    6.44                            "shutdown_reason", info[i].shutdown_reason
    6.45                  ));
    6.46 @@ -779,27 +776,6 @@ static PyObject *pyxc_rrobin_global_get(
    6.47      return Py_BuildValue("{s:L}", "slice", slice);
    6.48  }
    6.49  
    6.50 -static PyObject *pyxc_domain_setname(PyObject *self,
    6.51 -                                     PyObject *args,
    6.52 -                                     PyObject *kwds)
    6.53 -{
    6.54 -    XcObject *xc = (XcObject *)self;
    6.55 -    u32 dom;
    6.56 -    char *name;
    6.57 -
    6.58 -    static char *kwd_list[] = { "dom", "name", NULL };
    6.59 -
    6.60 -    if ( !PyArg_ParseTupleAndKeywords(args, kwds, "is", kwd_list, 
    6.61 -                                      &dom, &name) )
    6.62 -        return NULL;
    6.63 -
    6.64 -    if ( xc_domain_setname(xc->xc_handle, dom, name) != 0 )
    6.65 -        return PyErr_SetFromErrno(xc_error);
    6.66 -    
    6.67 -    Py_INCREF(zero);
    6.68 -    return zero;
    6.69 -}
    6.70 -
    6.71  static PyObject *pyxc_domain_setmaxmem(PyObject *self,
    6.72                                         PyObject *args,
    6.73                                         PyObject *kwds)
    6.74 @@ -830,7 +806,6 @@ static PyMethodDef pyxc_methods[] = {
    6.75        "Create a new domain.\n"
    6.76        " dom    [int, 0]:        Domain identifier to use (allocated if zero).\n"
    6.77        " mem_kb [int, 0]:        Memory allocation, in kilobytes.\n"
    6.78 -      " name   [str, '(anon)']: Informative textual name.\n\n"
    6.79        "Returns: [int] new domain identifier; -1 on error.\n" },
    6.80  
    6.81      { "domain_pause", 
    6.82 @@ -883,7 +858,6 @@ static PyMethodDef pyxc_methods[] = {
    6.83        " mem_kb   [int]:  Memory reservation, in kilobytes\n"
    6.84        " maxmem_kb [int]: Maximum memory limit, in kilobytes\n"
    6.85        " cpu_time [long]: CPU time consumed, in nanoseconds\n"
    6.86 -      " name     [str]:  Identifying name\n"
    6.87        " shutdown_reason [int]: Numeric code from guest OS, explaining "
    6.88        "reason why it shut itself down.\n" },
    6.89  
    6.90 @@ -1071,14 +1045,6 @@ static PyMethodDef pyxc_methods[] = {
    6.91        " op [int, 0]: operation\n\n"
    6.92        "Returns: [int] 0 on success; -1 on error.\n" },
    6.93  
    6.94 -    { "domain_setname", 
    6.95 -      (PyCFunction)pyxc_domain_setname, 
    6.96 -      METH_VARARGS | METH_KEYWORDS, "\n"
    6.97 -      "Set domain informative textual name\n"
    6.98 -      " dom [int]:  Identifier of domain.\n"
    6.99 -      " name [str]: Text string.\n\n"
   6.100 -      "Returns: [int] 0 on success; -1 on error.\n" },
   6.101 -
   6.102      { "domain_setmaxmem", 
   6.103        (PyCFunction)pyxc_domain_setmaxmem, 
   6.104        METH_VARARGS | METH_KEYWORDS, "\n"
     7.1 --- a/tools/python/xen/xend/XendDomain.py	Thu Oct 21 14:15:00 2004 +0000
     7.2 +++ b/tools/python/xen/xend/XendDomain.py	Thu Oct 21 15:10:33 2004 +0000
     7.3 @@ -355,15 +355,6 @@ class XendDomain:
     7.4          deferred.addCallback(cbok)
     7.5          return deferred
     7.6  
     7.7 -    def domain_setname(self, dom, name):
     7.8 -        """Set the name of a domain.
     7.9 -        For internal use only.
    7.10 -
    7.11 -        @param dom: domain id
    7.12 -        @param name: domain name
    7.13 -        """
    7.14 -        return xc.domain_setname(dom=dom, name=name)
    7.15 -
    7.16      def domain_restart(self, dominfo):
    7.17          """Restart a domain.
    7.18  
     8.1 --- a/tools/python/xen/xend/XendDomainInfo.py	Thu Oct 21 14:15:00 2004 +0000
     8.2 +++ b/tools/python/xen/xend/XendDomainInfo.py	Thu Oct 21 15:10:33 2004 +0000
     8.3 @@ -236,7 +236,7 @@ def vm_recreate(savedinfo, info):
     8.4      if config:
     8.5          d = vm.construct(config)
     8.6      else:
     8.7 -        vm.name = info['name']
     8.8 +        vm.name = sxp.child_value(savedinfo, 'name')
     8.9          d = defer.succeed(vm)
    8.10      vm.recreate = 0
    8.11      return d
    8.12 @@ -434,8 +434,6 @@ class XendDomainInfo:
    8.13                  self.cpu_weight = float(sxp.child_value(config, 'cpu_weight', '1'))
    8.14              except:
    8.15                  raise VmError('invalid cpu weight')
    8.16 -            if self.restore and self.dom:
    8.17 -                xc.domain_setname(self.dom, self.name)
    8.18              self.memory = int(sxp.child_value(config, 'memory'))
    8.19              if self.memory is None:
    8.20                  raise VmError('missing memory size')
    8.21 @@ -690,7 +688,7 @@ class XendDomainInfo:
    8.22              raise VmError('invalid cpu')
    8.23          cpu_weight = self.cpu_weight
    8.24          dom = xc.domain_create(dom= dom, mem_kb= memory * 1024,
    8.25 -                               name= name, cpu= cpu, cpu_weight= cpu_weight)
    8.26 +                               cpu= cpu, cpu_weight= cpu_weight)
    8.27          if dom <= 0:
    8.28              raise VmError('Creating domain failed: name=%s memory=%d'
    8.29                            % (name, memory))
     9.1 --- a/xen/common/dom0_ops.c	Thu Oct 21 14:15:00 2004 +0000
     9.2 +++ b/xen/common/dom0_ops.c	Thu Oct 21 15:10:33 2004 +0000
     9.3 @@ -42,9 +42,10 @@ static inline int is_free_domid(domid_t 
     9.4      return 0;
     9.5  }
     9.6  
     9.7 -/** Allocate a free domain id. We try to reuse domain ids in a fairly low range,
     9.8 - * only expanding the range when there are no free domain ids. This is to
     9.9 - * keep domain ids in a range depending on the number that exist simultaneously,
    9.10 +/*
    9.11 + * Allocate a free domain id. We try to reuse domain ids in a fairly low range,
    9.12 + * only expanding the range when there are no free domain ids. This is to keep 
    9.13 + * domain ids in a range depending on the number that exist simultaneously,
    9.14   * rather than incrementing domain ids in the full 32-bit range.
    9.15   */
    9.16  static int allocate_domid(domid_t *pdom)
    9.17 @@ -208,12 +209,6 @@ long do_dom0_op(dom0_op_t *u_dom0_op)
    9.18          if ( (d = do_createdomain(dom, pro)) == NULL )
    9.19              break;
    9.20  
    9.21 -        if ( op->u.createdomain.name[0] )
    9.22 -        {
    9.23 -            strncpy(d->name, op->u.createdomain.name, MAX_DOMAIN_NAME);
    9.24 -            d->name[MAX_DOMAIN_NAME - 1] = '\0';
    9.25 -        }
    9.26 -
    9.27          ret = alloc_new_dom_mem(d, op->u.createdomain.memory_kb);
    9.28          if ( ret != 0 ) 
    9.29          {
    9.30 @@ -359,7 +354,6 @@ long do_dom0_op(dom0_op_t *u_dom0_op)
    9.31          read_unlock_irqrestore(&tasklist_lock, flags);
    9.32  
    9.33          op->u.getdomaininfo.domain = d->domain;
    9.34 -        strcpy(op->u.getdomaininfo.name, d->name);
    9.35          
    9.36          op->u.getdomaininfo.flags =
    9.37              (test_bit(DF_DYING,     &d->flags) ? DOMFLAGS_DYING    : 0) |
    9.38 @@ -543,20 +537,6 @@ long do_dom0_op(dom0_op_t *u_dom0_op)
    9.39      }
    9.40      break;
    9.41  
    9.42 -    case DOM0_SETDOMAINNAME:
    9.43 -    {
    9.44 -        struct domain *d; 
    9.45 -        ret = -ESRCH;
    9.46 -        d = find_domain_by_id( op->u.setdomainname.domain );
    9.47 -        if ( d != NULL )
    9.48 -        {
    9.49 -            strncpy(d->name, op->u.setdomainname.name, MAX_DOMAIN_NAME);
    9.50 -            put_domain(d);
    9.51 -            ret = 0;
    9.52 -        }
    9.53 -    }
    9.54 -    break;
    9.55 -
    9.56      case DOM0_SETDOMAININITIALMEM:
    9.57      {
    9.58          struct domain *d; 
    10.1 --- a/xen/common/domain.c	Thu Oct 21 14:15:00 2004 +0000
    10.2 +++ b/xen/common/domain.c	Thu Oct 21 15:10:33 2004 +0000
    10.3 @@ -24,7 +24,6 @@ struct domain *task_list;
    10.4  
    10.5  struct domain *do_createdomain(domid_t dom_id, unsigned int cpu)
    10.6  {
    10.7 -    char buf[100];
    10.8      struct domain *d, **pd;
    10.9      unsigned long flags;
   10.10  
   10.11 @@ -59,11 +58,6 @@ struct domain *do_createdomain(domid_t d
   10.12              return NULL;
   10.13          }
   10.14  
   10.15 -        /* We use a large intermediate to avoid overflow in sprintf. */
   10.16 -        sprintf(buf, "Domain-%u", dom_id);
   10.17 -        strncpy(d->name, buf, MAX_DOMAIN_NAME);
   10.18 -        d->name[MAX_DOMAIN_NAME-1] = '\0';
   10.19 -
   10.20          arch_do_createdomain(d);
   10.21  
   10.22          sched_add_domain(d);
   10.23 @@ -81,7 +75,6 @@ struct domain *do_createdomain(domid_t d
   10.24      }
   10.25      else
   10.26      {
   10.27 -        sprintf(d->name, "Idle-%d", cpu);
   10.28          sched_add_domain(d);
   10.29      }
   10.30  
    11.1 --- a/xen/include/hypervisor-ifs/dom0_ops.h	Thu Oct 21 14:15:00 2004 +0000
    11.2 +++ b/xen/include/hypervisor-ifs/dom0_ops.h	Thu Oct 21 15:10:33 2004 +0000
    11.3 @@ -19,9 +19,7 @@
    11.4   * This makes sure that old versions of dom0 tools will stop working in a
    11.5   * well-defined way (rather than crashing the machine, for instance).
    11.6   */
    11.7 -#define DOM0_INTERFACE_VERSION   0xAAAA0017
    11.8 -
    11.9 -#define MAX_DOMAIN_NAME    16
   11.10 +#define DOM0_INTERFACE_VERSION   0xAAAA0019
   11.11  
   11.12  /************************************************************************/
   11.13  
   11.14 @@ -53,15 +51,14 @@ typedef struct {
   11.15      /* IN parameters. */
   11.16      memory_t     memory_kb;           /*  0 */
   11.17      MEMORY_PADDING;
   11.18 -    u8           name[MAX_DOMAIN_NAME]; /*  8 */
   11.19 -    u32          cpu;                 /* 24 */
   11.20 -    u32          __pad0;              /* 28 */
   11.21 +    u32          cpu;                 /*  8 */
   11.22 +    u32          __pad0;              /* 12 */
   11.23      /* IN/OUT parameters. */
   11.24      /* If 0, domain is allocated. If non-zero use it unless in use. */
   11.25 -    domid_t      domain;              /* 32 */
   11.26 +    domid_t      domain;              /* 16 */
   11.27      u16          __pad1;
   11.28      /* OUT parameters. */
   11.29 -} PACKED dom0_createdomain_t; /* 36 bytes */
   11.30 +} PACKED dom0_createdomain_t; /* 20 bytes */
   11.31  
   11.32  #define DOM0_DESTROYDOMAIN     9
   11.33  typedef struct {
   11.34 @@ -101,17 +98,16 @@ typedef struct {
   11.35  #define DOMFLAGS_SHUTDOWNMASK 255 /* DOMFLAGS_SHUTDOWN guest-supplied code.  */
   11.36  #define DOMFLAGS_SHUTDOWNSHIFT 16
   11.37      u32      flags;                   /*  4 */
   11.38 -    u8       name[MAX_DOMAIN_NAME];   /*  8 */
   11.39 -    full_execution_context_t *ctxt;   /* 24 */ /* NB. IN/OUT variable. */
   11.40 -    MEMORY_PADDING;
   11.41 -    memory_t tot_pages;               /* 32 */
   11.42 +    full_execution_context_t *ctxt;   /*  8 */ /* NB. IN/OUT variable. */
   11.43      MEMORY_PADDING;
   11.44 -    memory_t max_pages;               /* 40 */
   11.45 +    memory_t tot_pages;               /* 16 */
   11.46      MEMORY_PADDING;
   11.47 -    memory_t shared_info_frame;       /* 48: MFN of shared_info struct */
   11.48 +    memory_t max_pages;               /* 24 */
   11.49      MEMORY_PADDING;
   11.50 -    u64      cpu_time;                /* 56 */
   11.51 -} PACKED dom0_getdomaininfo_t; /* 64 bytes */
   11.52 +    memory_t shared_info_frame;       /* 32: MFN of shared_info struct */
   11.53 +    MEMORY_PADDING;
   11.54 +    u64      cpu_time;                /* 40 */
   11.55 +} PACKED dom0_getdomaininfo_t; /* 48 bytes */
   11.56  
   11.57  #define DOM0_BUILDDOMAIN      13
   11.58  typedef struct {
   11.59 @@ -298,15 +294,6 @@ typedef struct {
   11.60      dom0_shadow_control_stats_t stats;
   11.61  } PACKED dom0_shadow_control_t;
   11.62  
   11.63 -
   11.64 -#define DOM0_SETDOMAINNAME     26
   11.65 -typedef struct {
   11.66 -    /* IN variables. */
   11.67 -    domid_t  domain;                  /*  0 */
   11.68 -    u16      __pad;
   11.69 -    u8       name[MAX_DOMAIN_NAME];   /*  4 */
   11.70 -} PACKED dom0_setdomainname_t; /* 20 bytes */
   11.71 -
   11.72  #define DOM0_SETDOMAININITIALMEM   27
   11.73  typedef struct {
   11.74      /* IN variables. */
   11.75 @@ -375,7 +362,6 @@ typedef struct {
   11.76          dom0_pcidev_access_t     pcidev_access;
   11.77          dom0_sched_id_t          sched_id;
   11.78  	dom0_shadow_control_t    shadow_control;
   11.79 -	dom0_setdomainname_t     setdomainname;
   11.80  	dom0_setdomaininitialmem_t setdomaininitialmem;
   11.81  	dom0_setdomainmaxmem_t   setdomainmaxmem;
   11.82  	dom0_getpageframeinfo2_t getpageframeinfo2;
    12.1 --- a/xen/include/xen/sched.h	Thu Oct 21 14:15:00 2004 +0000
    12.2 +++ b/xen/include/xen/sched.h	Thu Oct 21 15:10:33 2004 +0000
    12.3 @@ -2,7 +2,6 @@
    12.4  #define __SCHED_H__
    12.5  
    12.6  #define STACK_SIZE (2*PAGE_SIZE)
    12.7 -#define MAX_DOMAIN_NAME 16
    12.8  
    12.9  #include <xen/config.h>
   12.10  #include <xen/types.h>
   12.11 @@ -85,7 +84,6 @@ struct domain
   12.12       */
   12.13  
   12.14      domid_t  domain;
   12.15 -    char     name[MAX_DOMAIN_NAME];
   12.16      s_time_t create_time;
   12.17  
   12.18      spinlock_t       page_alloc_lock; /* protects all the following fields  */
   12.19 @@ -135,7 +133,7 @@ struct domain
   12.20                          * "interesting" (i.e. have clear bits) */
   12.21  
   12.22      /* Handy macro - number of bytes of the IO bitmap, per selector bit. */
   12.23 -#define IOBMP_SELBIT_LWORDS ( IO_BITMAP_SIZE / 64 )
   12.24 +#define IOBMP_SELBIT_LWORDS (IO_BITMAP_SIZE / 64)
   12.25      unsigned long *io_bitmap; /* Pointer to task's IO bitmap or NULL */
   12.26  
   12.27      unsigned long flags;