WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] sched.h, dom0_ops.h, dom0_ops.c, xc_domain.c, xc.h:

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] sched.h, dom0_ops.h, dom0_ops.c, xc_domain.c, xc.h:
From: BitKeeper Bot <riel@xxxxxxxxxxx>
Date: Wed, 11 May 2005 14:12:14 +0000
Delivery-date: Wed, 11 May 2005 17:04:29 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: Xen Development List <xen-devel@xxxxxxxxxxxxxxxxxxx>
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
ChangeSet 1.1439, 2005/05/11 15:12:14+01:00, cl349@xxxxxxxxxxxxxxxxxxxx

        sched.h, dom0_ops.h, dom0_ops.c, xc_domain.c, xc.h:
          Minor cleanups.
        Signed-off-by: Christian Limpach <Christian.Limpach@xxxxxxxxxxxx>



 tools/libxc/xc.h              |    2 +-
 tools/libxc/xc_domain.c       |   10 +++++-----
 xen/common/dom0_ops.c         |   17 ++++++++++-------
 xen/include/public/dom0_ops.h |    2 +-
 xen/include/xen/sched.h       |    4 ++--
 5 files changed, 19 insertions(+), 16 deletions(-)


diff -Nru a/tools/libxc/xc.h b/tools/libxc/xc.h
--- a/tools/libxc/xc.h  2005-05-11 13:05:03 -04:00
+++ b/tools/libxc/xc.h  2005-05-11 13:05:03 -04:00
@@ -119,7 +119,7 @@
     unsigned long shared_info_frame;
     u64           cpu_time;
     unsigned long max_memkb;
-    u32           vcpu_to_cpu[MAX_VIRT_CPUS];
+    s32           vcpu_to_cpu[MAX_VIRT_CPUS];
     cpumap_t      cpumap[MAX_VIRT_CPUS];
 } xc_dominfo_t;
 
diff -Nru a/tools/libxc/xc_domain.c b/tools/libxc/xc_domain.c
--- a/tools/libxc/xc_domain.c   2005-05-11 13:05:03 -04:00
+++ b/tools/libxc/xc_domain.c   2005-05-11 13:05:03 -04:00
@@ -17,7 +17,7 @@
     int err, errno_saved;
     dom0_op_t op;
     u32 vcpu = 0; /* FIXME, hard coded initial pin to vcpu 0 */
-    cpumap_t cpumap = 1<<cpu;
+    cpumap_t cpumap = 1 << cpu;
 
     op.cmd = DOM0_CREATEDOMAIN;
     op.u.createdomain.domain = (domid_t)*pdomid;
@@ -137,10 +137,10 @@
         info->shared_info_frame = op.u.getdomaininfo.shared_info_frame;
         info->cpu_time = op.u.getdomaininfo.cpu_time;
         info->vcpus = op.u.getdomaininfo.n_vcpu;
-        memcpy(info->vcpu_to_cpu, &op.u.getdomaininfo.vcpu_to_cpu, 
-               MAX_VIRT_CPUS*sizeof(u32));
-        memcpy(info->cpumap, &op.u.getdomaininfo.cpumap, 
-               MAX_VIRT_CPUS*sizeof(cpumap_t));
+        memcpy(&info->vcpu_to_cpu, &op.u.getdomaininfo.vcpu_to_cpu, 
+               sizeof(info->vcpu_to_cpu));
+        memcpy(&info->cpumap, &op.u.getdomaininfo.cpumap, 
+               sizeof(info->cpumap));
 
         next_domid = (u16)op.u.getdomaininfo.domain + 1;
         info++;
diff -Nru a/xen/common/dom0_ops.c b/xen/common/dom0_ops.c
--- a/xen/common/dom0_ops.c     2005-05-11 13:05:03 -04:00
+++ b/xen/common/dom0_ops.c     2005-05-11 13:05:03 -04:00
@@ -221,7 +221,7 @@
         domid_t dom = op->u.pincpudomain.domain;
         struct domain *d = find_domain_by_id(dom);
         struct exec_domain *ed;
-        cpumap_t curmap, *cpumap = &curmap;
+        cpumap_t cpumap;
 
 
         if ( d == NULL )
@@ -253,8 +253,8 @@
             break;
         }
 
-        if ( copy_from_user(cpumap, 
-                            op->u.pincpudomain.cpumap, sizeof(*cpumap)) )
+        if ( copy_from_user(&cpumap, op->u.pincpudomain.cpumap,
+                            sizeof(cpumap)) )
         {
             ret = -EFAULT;
             put_domain(d);
@@ -262,14 +262,14 @@
         }
 
         /* update cpumap for this ed */
-        ed->cpumap = *(cpumap);
+        ed->cpumap = cpumap;
 
-        if ( *(cpumap) == CPUMAP_RUNANYWHERE )
+        if ( cpumap == CPUMAP_RUNANYWHERE )
             clear_bit(EDF_CPUPINNED, &ed->flags);
         else
         {
             /* pick a new cpu from the usable map */
-            int new_cpu = (int)find_first_set_bit(*(cpumap)) % smp_num_cpus;
+            int new_cpu = (int)find_first_set_bit(cpumap) % smp_num_cpus;
 
             exec_domain_pause(ed);
             if ( ed->processor != new_cpu )
@@ -329,7 +329,10 @@
             break;
         }
         
-        memset(&op->u.getdomaininfo.vcpu_to_cpu,-1,MAX_VIRT_CPUS*sizeof(u8));
+        memset(&op->u.getdomaininfo.vcpu_to_cpu, -1,
+               sizeof(op->u.getdomaininfo.vcpu_to_cpu));
+        memset(&op->u.getdomaininfo.cpumap, 0,
+               sizeof(op->u.getdomaininfo.cpumap));
         for_each_exec_domain ( d, ed ) {
             op->u.getdomaininfo.vcpu_to_cpu[ed->id] = ed->processor;
             op->u.getdomaininfo.cpumap[ed->id]      = ed->cpumap;
diff -Nru a/xen/include/public/dom0_ops.h b/xen/include/public/dom0_ops.h
--- a/xen/include/public/dom0_ops.h     2005-05-11 13:05:03 -04:00
+++ b/xen/include/public/dom0_ops.h     2005-05-11 13:05:03 -04:00
@@ -89,7 +89,7 @@
     memory_t shared_info_frame;       /* MFN of shared_info struct */
     u64      cpu_time;
     u32      n_vcpu;
-    u32      vcpu_to_cpu[MAX_VIRT_CPUS];  /* current mapping   */
+    s32      vcpu_to_cpu[MAX_VIRT_CPUS];  /* current mapping   */
     cpumap_t cpumap[MAX_VIRT_CPUS];       /* allowable mapping */
 } dom0_getdomaininfo_t;
 
diff -Nru a/xen/include/xen/sched.h b/xen/include/xen/sched.h
--- a/xen/include/xen/sched.h   2005-05-11 13:05:03 -04:00
+++ b/xen/include/xen/sched.h   2005-05-11 13:05:03 -04:00
@@ -58,8 +58,8 @@
 void destroy_event_channels(struct domain *d);
 int  init_exec_domain_event_channels(struct exec_domain *ed);
 
-
 #define CPUMAP_RUNANYWHERE 0xFFFFFFFF
+
 struct exec_domain 
 {
     int              id;
@@ -86,7 +86,7 @@
 
     atomic_t         pausecnt;
 
-    cpumap_t  cpumap;               /* which cpus this domain can run on */
+    cpumap_t         cpumap;        /* which cpus this domain can run on */
 
     struct arch_exec_domain arch;
 };

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] sched.h, dom0_ops.h, dom0_ops.c, xc_domain.c, xc.h:, BitKeeper Bot <=