ia64/xen-unstable
changeset 2692:d8e27145f1eb
bitkeeper revision 1.1159.124.2 (4177d163xinza3-p0e7_VEpiJ-okNA)
Remove domain names from Xen. These are now stored only within xend.
Remove domain names from Xen. These are now stored only within xend.
author | kaf24@freefall.cl.cam.ac.uk |
---|---|
date | Thu Oct 21 15:10:27 2004 +0000 (2004-10-21) |
parents | fa98ee4c6a0c |
children | 2584528df9e1 |
files | 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/tools/libxc/xc.h Thu Oct 21 15:09:27 2004 +0000 1.2 +++ b/tools/libxc/xc.h Thu Oct 21 15:10:27 2004 +0000 1.3 @@ -31,8 +31,6 @@ typedef struct { 1.4 unsigned long nr_pages; 1.5 unsigned long shared_info_frame; 1.6 u64 cpu_time; 1.7 -#define XC_DOMINFO_MAXNAME 16 1.8 - char name[XC_DOMINFO_MAXNAME]; 1.9 unsigned long max_memkb; 1.10 } xc_dominfo_t; 1.11 1.12 @@ -46,7 +44,6 @@ typedef struct xc_shadow_control_stats_s 1.13 1.14 int xc_domain_create(int xc_handle, 1.15 unsigned int mem_kb, 1.16 - const char *name, 1.17 int cpu, 1.18 float cpu_weight, 1.19 u32 *pdomid); 1.20 @@ -193,10 +190,6 @@ int xc_physinfo(int xc_handle, 1.21 int xc_sched_id(int xc_handle, 1.22 int *sched_id); 1.23 1.24 -int xc_domain_setname(int xc_handle, 1.25 - u32 domid, 1.26 - char *name); 1.27 - 1.28 int xc_domain_setinitialmem(int xc_handle, 1.29 u32 domid, 1.30 unsigned int initial_memkb);
2.1 --- a/tools/libxc/xc_domain.c Thu Oct 21 15:09:27 2004 +0000 2.2 +++ b/tools/libxc/xc_domain.c Thu Oct 21 15:10:27 2004 +0000 2.3 @@ -10,7 +10,6 @@ 2.4 2.5 int xc_domain_create(int xc_handle, 2.6 unsigned int mem_kb, 2.7 - const char *name, 2.8 int cpu, 2.9 float cpu_weight, 2.10 u32 *pdomid) 2.11 @@ -21,8 +20,6 @@ int xc_domain_create(int xc_handle, 2.12 op.cmd = DOM0_CREATEDOMAIN; 2.13 op.u.createdomain.domain = (domid_t)*pdomid; 2.14 op.u.createdomain.memory_kb = mem_kb; 2.15 - strncpy(op.u.createdomain.name, name, MAX_DOMAIN_NAME); 2.16 - op.u.createdomain.name[MAX_DOMAIN_NAME-1] = '\0'; 2.17 op.u.createdomain.cpu = cpu; 2.18 2.19 if ( (err = do_dom0_op(xc_handle, &op)) == 0 ) 2.20 @@ -113,8 +110,6 @@ int xc_domain_getinfo(int xc_handle, 2.21 info->max_memkb = op.u.getdomaininfo.max_pages<<(PAGE_SHIFT); 2.22 info->shared_info_frame = op.u.getdomaininfo.shared_info_frame; 2.23 info->cpu_time = op.u.getdomaininfo.cpu_time; 2.24 - strncpy(info->name, op.u.getdomaininfo.name, XC_DOMINFO_MAXNAME); 2.25 - info->name[XC_DOMINFO_MAXNAME-1] = '\0'; 2.26 2.27 next_domid = (u16)op.u.getdomaininfo.domain + 1; 2.28 info++; 2.29 @@ -165,17 +160,6 @@ int xc_shadow_control(int xc_handle, 2.30 return (rc == 0) ? op.u.shadow_control.pages : rc; 2.31 } 2.32 2.33 -int xc_domain_setname(int xc_handle, 2.34 - u32 domid, 2.35 - char *name) 2.36 -{ 2.37 - dom0_op_t op; 2.38 - op.cmd = DOM0_SETDOMAINNAME; 2.39 - op.u.setdomainname.domain = (domid_t)domid; 2.40 - strncpy(op.u.setdomainname.name, name, MAX_DOMAIN_NAME); 2.41 - return do_dom0_op(xc_handle, &op); 2.42 -} 2.43 - 2.44 int xc_domain_setcpuweight(int xc_handle, 2.45 u32 domid, 2.46 float weight)
3.1 --- a/tools/libxc/xc_linux_restore.c Thu Oct 21 15:09:27 2004 +0000 3.2 +++ b/tools/libxc/xc_linux_restore.c Thu Oct 21 15:10:27 2004 +0000 3.3 @@ -102,9 +102,6 @@ int xc_linux_restore(int xc_handle, XcIO 3.4 /* First 16 bytes of the state file must contain 'LinuxGuestRecord'. */ 3.5 char signature[16]; 3.6 3.7 - /* A copy of the domain's name. */ 3.8 - char name[MAX_DOMAIN_NAME]; 3.9 - 3.10 /* A table containg the type of each PFN (/not/ MFN!). */ 3.11 unsigned long *pfn_type = NULL; 3.12 3.13 @@ -149,8 +146,7 @@ int xc_linux_restore(int xc_handle, XcIO 3.14 goto out; 3.15 } 3.16 3.17 - if ( xcio_read(ioctxt, name, sizeof(name)) || 3.18 - xcio_read(ioctxt, &nr_pfns, sizeof(unsigned long)) || 3.19 + if ( xcio_read(ioctxt, &nr_pfns, sizeof(unsigned long)) || 3.20 xcio_read(ioctxt, pfn_to_mfn_frame_list, PAGE_SIZE) ) 3.21 { 3.22 xcio_error(ioctxt, "Error reading header"); 3.23 @@ -163,17 +159,6 @@ int xc_linux_restore(int xc_handle, XcIO 3.24 goto out; 3.25 } 3.26 3.27 - for ( i = 0; i < MAX_DOMAIN_NAME; i++ ) 3.28 - { 3.29 - if ( name[i] == '\0' ) break; 3.30 - if ( name[i] & 0x80 ) 3.31 - { 3.32 - xcio_error(ioctxt, "Random characters in domain name"); 3.33 - goto out; 3.34 - } 3.35 - } 3.36 - name[MAX_DOMAIN_NAME-1] = '\0'; 3.37 - 3.38 if ( nr_pfns > 1024*1024 ) 3.39 { 3.40 xcio_error(ioctxt, "Invalid state file -- pfn count out of range"); 3.41 @@ -199,30 +184,9 @@ int xc_linux_restore(int xc_handle, XcIO 3.42 goto out; 3.43 } 3.44 3.45 -#if 0 3.46 - /* Set the domain's name to that from the restore file */ 3.47 - if ( xc_domain_setname( xc_handle, dom, name ) ) 3.48 - { 3.49 - xcio_error(ioctxt, "Could not set domain name"); 3.50 - goto out; 3.51 - } 3.52 - 3.53 - /* Set the domain's initial memory allocation 3.54 - to that from the restore file */ 3.55 - 3.56 - if ( xc_domain_setinitialmem(xc_handle, dom, 3.57 - nr_pfns * (PAGE_SIZE / 1024)) ) 3.58 - { 3.59 - xcio_error(ioctxt, "Could not set domain %d initial memory. pfns=%d, %dKB", 3.60 - dom, nr_pfns,nr_pfns * (PAGE_SIZE / 1024)); 3.61 - goto out; 3.62 - } 3.63 -#endif 3.64 - 3.65 - 3.66 - /* XXX create domain on CPU=-1 so that in future it auto load ballances by default */ 3.67 - if ( xc_domain_create( xc_handle, nr_pfns * (PAGE_SIZE / 1024), 3.68 - "", -1, 1, &dom ) ) 3.69 + /* Create domain on CPU -1 so that it may auto load-balance in future. */ 3.70 + if ( xc_domain_create(xc_handle, nr_pfns * (PAGE_SIZE / 1024), 3.71 + -1, 1, &dom) ) 3.72 { 3.73 xcio_error(ioctxt, "Could not create domain. pfns=%d, %dKB", 3.74 nr_pfns,nr_pfns * (PAGE_SIZE / 1024));
4.1 --- a/tools/libxc/xc_linux_save.c Thu Oct 21 15:09:27 2004 +0000 4.2 +++ b/tools/libxc/xc_linux_save.c Thu Oct 21 15:10:27 2004 +0000 4.3 @@ -303,9 +303,6 @@ int xc_linux_save(int xc_handle, XcIOCon 4.4 /* A copy of the CPU context of the guest. */ 4.5 full_execution_context_t ctxt; 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 unsigned long *pfn_batch = NULL; 4.13 @@ -359,7 +356,6 @@ int xc_linux_save(int xc_handle, XcIOCon 4.14 xcio_error(ioctxt, "Could not get full domain info"); 4.15 goto out; 4.16 } 4.17 - memcpy(name, op.u.getdomaininfo.name, sizeof(name)); 4.18 shared_info_frame = op.u.getdomaininfo.shared_info_frame; 4.19 4.20 /* A cheesy test to see whether the domain contains valid state. */ 4.21 @@ -539,7 +535,6 @@ int xc_linux_save(int xc_handle, XcIOCon 4.22 /* Start writing out the saved-domain record. */ 4.23 4.24 if ( xcio_write(ioctxt, "LinuxGuestRecord", 16) || 4.25 - xcio_write(ioctxt, name, sizeof(name)) || 4.26 xcio_write(ioctxt, &nr_pfns, sizeof(unsigned long)) || 4.27 xcio_write(ioctxt, pfn_to_mfn_frame_list, PAGE_SIZE) ){ 4.28 xcio_error(ioctxt, "Error writing header");
5.1 --- a/tools/python/xen/lowlevel/xc/xc.c Thu Oct 21 15:09:27 2004 +0000 5.2 +++ b/tools/python/xen/lowlevel/xc/xc.c Thu Oct 21 15:10:27 2004 +0000 5.3 @@ -42,21 +42,19 @@ static PyObject *pyxc_domain_create(PyOb 5.4 XcObject *xc = (XcObject *)self; 5.5 5.6 unsigned int mem_kb = 0; 5.7 - char *name = "(anon)"; 5.8 int cpu = -1; 5.9 float cpu_weight = 1; 5.10 u32 dom = 0; 5.11 int ret; 5.12 5.13 - static char *kwd_list[] = { "dom", "mem_kb", "name", 5.14 - "cpu", "cpu_weight", NULL }; 5.15 + static char *kwd_list[] = { "dom", "mem_kb", "cpu", "cpu_weight", NULL }; 5.16 5.17 - if ( !PyArg_ParseTupleAndKeywords(args, kwds, "|iisif", kwd_list, 5.18 - &dom, &mem_kb, &name, &cpu, &cpu_weight)) 5.19 + if ( !PyArg_ParseTupleAndKeywords(args, kwds, "|iiif", kwd_list, 5.20 + &dom, &mem_kb, &cpu, &cpu_weight)) 5.21 return NULL; 5.22 5.23 if ( (ret = xc_domain_create( 5.24 - xc->xc_handle, mem_kb, name, cpu, cpu_weight, &dom)) < 0 ) 5.25 + xc->xc_handle, mem_kb, cpu, cpu_weight, &dom)) < 0 ) 5.26 return PyErr_SetFromErrno(xc_error); 5.27 5.28 return PyInt_FromLong(dom); 5.29 @@ -172,7 +170,7 @@ static PyObject *pyxc_domain_getinfo(PyO 5.30 PyList_SetItem( 5.31 list, i, 5.32 Py_BuildValue("{s:i,s:i,s:i,s:i,s:i,s:i,s:i,s:i" 5.33 - ",s:l,s:L,s:s,s:l,s:i}", 5.34 + ",s:l,s:L,s:l,s:i}", 5.35 "dom", info[i].domid, 5.36 "cpu", info[i].cpu, 5.37 "dying", info[i].dying, 5.38 @@ -183,7 +181,6 @@ static PyObject *pyxc_domain_getinfo(PyO 5.39 "running", info[i].running, 5.40 "mem_kb", info[i].nr_pages*4, 5.41 "cpu_time", info[i].cpu_time, 5.42 - "name", info[i].name, 5.43 "maxmem_kb", info[i].max_memkb, 5.44 "shutdown_reason", info[i].shutdown_reason 5.45 )); 5.46 @@ -779,27 +776,6 @@ static PyObject *pyxc_rrobin_global_get( 5.47 return Py_BuildValue("{s:L}", "slice", slice); 5.48 } 5.49 5.50 -static PyObject *pyxc_domain_setname(PyObject *self, 5.51 - PyObject *args, 5.52 - PyObject *kwds) 5.53 -{ 5.54 - XcObject *xc = (XcObject *)self; 5.55 - u32 dom; 5.56 - char *name; 5.57 - 5.58 - static char *kwd_list[] = { "dom", "name", NULL }; 5.59 - 5.60 - if ( !PyArg_ParseTupleAndKeywords(args, kwds, "is", kwd_list, 5.61 - &dom, &name) ) 5.62 - return NULL; 5.63 - 5.64 - if ( xc_domain_setname(xc->xc_handle, dom, name) != 0 ) 5.65 - return PyErr_SetFromErrno(xc_error); 5.66 - 5.67 - Py_INCREF(zero); 5.68 - return zero; 5.69 -} 5.70 - 5.71 static PyObject *pyxc_domain_setmaxmem(PyObject *self, 5.72 PyObject *args, 5.73 PyObject *kwds) 5.74 @@ -830,7 +806,6 @@ static PyMethodDef pyxc_methods[] = { 5.75 "Create a new domain.\n" 5.76 " dom [int, 0]: Domain identifier to use (allocated if zero).\n" 5.77 " mem_kb [int, 0]: Memory allocation, in kilobytes.\n" 5.78 - " name [str, '(anon)']: Informative textual name.\n\n" 5.79 "Returns: [int] new domain identifier; -1 on error.\n" }, 5.80 5.81 { "domain_pause", 5.82 @@ -883,7 +858,6 @@ static PyMethodDef pyxc_methods[] = { 5.83 " mem_kb [int]: Memory reservation, in kilobytes\n" 5.84 " maxmem_kb [int]: Maximum memory limit, in kilobytes\n" 5.85 " cpu_time [long]: CPU time consumed, in nanoseconds\n" 5.86 - " name [str]: Identifying name\n" 5.87 " shutdown_reason [int]: Numeric code from guest OS, explaining " 5.88 "reason why it shut itself down.\n" }, 5.89 5.90 @@ -1071,14 +1045,6 @@ static PyMethodDef pyxc_methods[] = { 5.91 " op [int, 0]: operation\n\n" 5.92 "Returns: [int] 0 on success; -1 on error.\n" }, 5.93 5.94 - { "domain_setname", 5.95 - (PyCFunction)pyxc_domain_setname, 5.96 - METH_VARARGS | METH_KEYWORDS, "\n" 5.97 - "Set domain informative textual name\n" 5.98 - " dom [int]: Identifier of domain.\n" 5.99 - " name [str]: Text string.\n\n" 5.100 - "Returns: [int] 0 on success; -1 on error.\n" }, 5.101 - 5.102 { "domain_setmaxmem", 5.103 (PyCFunction)pyxc_domain_setmaxmem, 5.104 METH_VARARGS | METH_KEYWORDS, "\n"
6.1 --- a/tools/python/xen/xend/XendDomain.py Thu Oct 21 15:09:27 2004 +0000 6.2 +++ b/tools/python/xen/xend/XendDomain.py Thu Oct 21 15:10:27 2004 +0000 6.3 @@ -355,15 +355,6 @@ class XendDomain: 6.4 deferred.addCallback(cbok) 6.5 return deferred 6.6 6.7 - def domain_setname(self, dom, name): 6.8 - """Set the name of a domain. 6.9 - For internal use only. 6.10 - 6.11 - @param dom: domain id 6.12 - @param name: domain name 6.13 - """ 6.14 - return xc.domain_setname(dom=dom, name=name) 6.15 - 6.16 def domain_restart(self, dominfo): 6.17 """Restart a domain. 6.18
7.1 --- a/tools/python/xen/xend/XendDomainInfo.py Thu Oct 21 15:09:27 2004 +0000 7.2 +++ b/tools/python/xen/xend/XendDomainInfo.py Thu Oct 21 15:10:27 2004 +0000 7.3 @@ -236,7 +236,7 @@ def vm_recreate(savedinfo, info): 7.4 if config: 7.5 d = vm.construct(config) 7.6 else: 7.7 - vm.name = info['name'] 7.8 + vm.name = sxp.child_value(savedinfo, 'name') 7.9 d = defer.succeed(vm) 7.10 vm.recreate = 0 7.11 return d 7.12 @@ -434,8 +434,6 @@ class XendDomainInfo: 7.13 self.cpu_weight = float(sxp.child_value(config, 'cpu_weight', '1')) 7.14 except: 7.15 raise VmError('invalid cpu weight') 7.16 - if self.restore and self.dom: 7.17 - xc.domain_setname(self.dom, self.name) 7.18 self.memory = int(sxp.child_value(config, 'memory')) 7.19 if self.memory is None: 7.20 raise VmError('missing memory size') 7.21 @@ -690,7 +688,7 @@ class XendDomainInfo: 7.22 raise VmError('invalid cpu') 7.23 cpu_weight = self.cpu_weight 7.24 dom = xc.domain_create(dom= dom, mem_kb= memory * 1024, 7.25 - name= name, cpu= cpu, cpu_weight= cpu_weight) 7.26 + cpu= cpu, cpu_weight= cpu_weight) 7.27 if dom <= 0: 7.28 raise VmError('Creating domain failed: name=%s memory=%d' 7.29 % (name, memory))
8.1 --- a/xen/common/dom0_ops.c Thu Oct 21 15:09:27 2004 +0000 8.2 +++ b/xen/common/dom0_ops.c Thu Oct 21 15:10:27 2004 +0000 8.3 @@ -42,9 +42,10 @@ static inline int is_free_domid(domid_t 8.4 return 0; 8.5 } 8.6 8.7 -/** Allocate a free domain id. We try to reuse domain ids in a fairly low range, 8.8 - * only expanding the range when there are no free domain ids. This is to 8.9 - * keep domain ids in a range depending on the number that exist simultaneously, 8.10 +/* 8.11 + * Allocate a free domain id. We try to reuse domain ids in a fairly low range, 8.12 + * only expanding the range when there are no free domain ids. This is to keep 8.13 + * domain ids in a range depending on the number that exist simultaneously, 8.14 * rather than incrementing domain ids in the full 32-bit range. 8.15 */ 8.16 static int allocate_domid(domid_t *pdom) 8.17 @@ -208,12 +209,6 @@ long do_dom0_op(dom0_op_t *u_dom0_op) 8.18 if ( (d = do_createdomain(dom, pro)) == NULL ) 8.19 break; 8.20 8.21 - if ( op->u.createdomain.name[0] ) 8.22 - { 8.23 - strncpy(d->name, op->u.createdomain.name, MAX_DOMAIN_NAME); 8.24 - d->name[MAX_DOMAIN_NAME - 1] = '\0'; 8.25 - } 8.26 - 8.27 ret = alloc_new_dom_mem(d, op->u.createdomain.memory_kb); 8.28 if ( ret != 0 ) 8.29 { 8.30 @@ -359,7 +354,6 @@ long do_dom0_op(dom0_op_t *u_dom0_op) 8.31 read_unlock_irqrestore(&tasklist_lock, flags); 8.32 8.33 op->u.getdomaininfo.domain = d->domain; 8.34 - strcpy(op->u.getdomaininfo.name, d->name); 8.35 8.36 op->u.getdomaininfo.flags = 8.37 (test_bit(DF_DYING, &d->flags) ? DOMFLAGS_DYING : 0) | 8.38 @@ -543,20 +537,6 @@ long do_dom0_op(dom0_op_t *u_dom0_op) 8.39 } 8.40 break; 8.41 8.42 - case DOM0_SETDOMAINNAME: 8.43 - { 8.44 - struct domain *d; 8.45 - ret = -ESRCH; 8.46 - d = find_domain_by_id( op->u.setdomainname.domain ); 8.47 - if ( d != NULL ) 8.48 - { 8.49 - strncpy(d->name, op->u.setdomainname.name, MAX_DOMAIN_NAME); 8.50 - put_domain(d); 8.51 - ret = 0; 8.52 - } 8.53 - } 8.54 - break; 8.55 - 8.56 case DOM0_SETDOMAININITIALMEM: 8.57 { 8.58 struct domain *d;
9.1 --- a/xen/common/domain.c Thu Oct 21 15:09:27 2004 +0000 9.2 +++ b/xen/common/domain.c Thu Oct 21 15:10:27 2004 +0000 9.3 @@ -24,7 +24,6 @@ struct domain *task_list; 9.4 9.5 struct domain *do_createdomain(domid_t dom_id, unsigned int cpu) 9.6 { 9.7 - char buf[100]; 9.8 struct domain *d, **pd; 9.9 unsigned long flags; 9.10 9.11 @@ -59,11 +58,6 @@ struct domain *do_createdomain(domid_t d 9.12 return NULL; 9.13 } 9.14 9.15 - /* We use a large intermediate to avoid overflow in sprintf. */ 9.16 - sprintf(buf, "Domain-%u", dom_id); 9.17 - strncpy(d->name, buf, MAX_DOMAIN_NAME); 9.18 - d->name[MAX_DOMAIN_NAME-1] = '\0'; 9.19 - 9.20 arch_do_createdomain(d); 9.21 9.22 sched_add_domain(d); 9.23 @@ -81,7 +75,6 @@ struct domain *do_createdomain(domid_t d 9.24 } 9.25 else 9.26 { 9.27 - sprintf(d->name, "Idle-%d", cpu); 9.28 sched_add_domain(d); 9.29 } 9.30
10.1 --- a/xen/include/hypervisor-ifs/dom0_ops.h Thu Oct 21 15:09:27 2004 +0000 10.2 +++ b/xen/include/hypervisor-ifs/dom0_ops.h Thu Oct 21 15:10:27 2004 +0000 10.3 @@ -19,9 +19,7 @@ 10.4 * This makes sure that old versions of dom0 tools will stop working in a 10.5 * well-defined way (rather than crashing the machine, for instance). 10.6 */ 10.7 -#define DOM0_INTERFACE_VERSION 0xAAAA0017 10.8 - 10.9 -#define MAX_DOMAIN_NAME 16 10.10 +#define DOM0_INTERFACE_VERSION 0xAAAA0019 10.11 10.12 /************************************************************************/ 10.13 10.14 @@ -53,15 +51,14 @@ typedef struct { 10.15 /* IN parameters. */ 10.16 memory_t memory_kb; /* 0 */ 10.17 MEMORY_PADDING; 10.18 - u8 name[MAX_DOMAIN_NAME]; /* 8 */ 10.19 - u32 cpu; /* 24 */ 10.20 - u32 __pad0; /* 28 */ 10.21 + u32 cpu; /* 8 */ 10.22 + u32 __pad0; /* 12 */ 10.23 /* IN/OUT parameters. */ 10.24 /* If 0, domain is allocated. If non-zero use it unless in use. */ 10.25 - domid_t domain; /* 32 */ 10.26 + domid_t domain; /* 16 */ 10.27 u16 __pad1; 10.28 /* OUT parameters. */ 10.29 -} PACKED dom0_createdomain_t; /* 36 bytes */ 10.30 +} PACKED dom0_createdomain_t; /* 20 bytes */ 10.31 10.32 #define DOM0_DESTROYDOMAIN 9 10.33 typedef struct { 10.34 @@ -101,17 +98,16 @@ typedef struct { 10.35 #define DOMFLAGS_SHUTDOWNMASK 255 /* DOMFLAGS_SHUTDOWN guest-supplied code. */ 10.36 #define DOMFLAGS_SHUTDOWNSHIFT 16 10.37 u32 flags; /* 4 */ 10.38 - u8 name[MAX_DOMAIN_NAME]; /* 8 */ 10.39 - full_execution_context_t *ctxt; /* 24 */ /* NB. IN/OUT variable. */ 10.40 + full_execution_context_t *ctxt; /* 8 */ /* NB. IN/OUT variable. */ 10.41 MEMORY_PADDING; 10.42 - memory_t tot_pages; /* 32 */ 10.43 + memory_t tot_pages; /* 16 */ 10.44 MEMORY_PADDING; 10.45 - memory_t max_pages; /* 40 */ 10.46 + memory_t max_pages; /* 24 */ 10.47 MEMORY_PADDING; 10.48 - memory_t shared_info_frame; /* 48: MFN of shared_info struct */ 10.49 + memory_t shared_info_frame; /* 32: MFN of shared_info struct */ 10.50 MEMORY_PADDING; 10.51 - u64 cpu_time; /* 56 */ 10.52 -} PACKED dom0_getdomaininfo_t; /* 64 bytes */ 10.53 + u64 cpu_time; /* 40 */ 10.54 +} PACKED dom0_getdomaininfo_t; /* 48 bytes */ 10.55 10.56 #define DOM0_BUILDDOMAIN 13 10.57 typedef struct { 10.58 @@ -298,15 +294,6 @@ typedef struct { 10.59 dom0_shadow_control_stats_t stats; 10.60 } PACKED dom0_shadow_control_t; 10.61 10.62 - 10.63 -#define DOM0_SETDOMAINNAME 26 10.64 -typedef struct { 10.65 - /* IN variables. */ 10.66 - domid_t domain; /* 0 */ 10.67 - u16 __pad; 10.68 - u8 name[MAX_DOMAIN_NAME]; /* 4 */ 10.69 -} PACKED dom0_setdomainname_t; /* 20 bytes */ 10.70 - 10.71 #define DOM0_SETDOMAININITIALMEM 27 10.72 typedef struct { 10.73 /* IN variables. */ 10.74 @@ -375,7 +362,6 @@ typedef struct { 10.75 dom0_pcidev_access_t pcidev_access; 10.76 dom0_sched_id_t sched_id; 10.77 dom0_shadow_control_t shadow_control; 10.78 - dom0_setdomainname_t setdomainname; 10.79 dom0_setdomaininitialmem_t setdomaininitialmem; 10.80 dom0_setdomainmaxmem_t setdomainmaxmem; 10.81 dom0_getpageframeinfo2_t getpageframeinfo2;
11.1 --- a/xen/include/xen/sched.h Thu Oct 21 15:09:27 2004 +0000 11.2 +++ b/xen/include/xen/sched.h Thu Oct 21 15:10:27 2004 +0000 11.3 @@ -2,7 +2,6 @@ 11.4 #define __SCHED_H__ 11.5 11.6 #define STACK_SIZE (2*PAGE_SIZE) 11.7 -#define MAX_DOMAIN_NAME 16 11.8 11.9 #include <xen/config.h> 11.10 #include <xen/types.h> 11.11 @@ -85,7 +84,6 @@ struct domain 11.12 */ 11.13 11.14 domid_t domain; 11.15 - char name[MAX_DOMAIN_NAME]; 11.16 s_time_t create_time; 11.17 11.18 spinlock_t page_alloc_lock; /* protects all the following fields */ 11.19 @@ -135,7 +133,7 @@ struct domain 11.20 * "interesting" (i.e. have clear bits) */ 11.21 11.22 /* Handy macro - number of bytes of the IO bitmap, per selector bit. */ 11.23 -#define IOBMP_SELBIT_LWORDS ( IO_BITMAP_SIZE / 64 ) 11.24 +#define IOBMP_SELBIT_LWORDS (IO_BITMAP_SIZE / 64) 11.25 unsigned long *io_bitmap; /* Pointer to task's IO bitmap or NULL */ 11.26 11.27 unsigned long flags;