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] [xen-unstable] [IA64] support XEN_SYSCTL_numainfo

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [IA64] support XEN_SYSCTL_numainfo
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 04 Jun 2010 03:45:37 -0700
Delivery-date: Fri, 04 Jun 2010 03:48:33 -0700
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/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1275647946 -3600
# Node ID c514d69c71d8c07fc3f86b7216dd1c3fef126451
# Parent  497bda800505b740c9aea42647031fc27abd2e8c
[IA64] support XEN_SYSCTL_numainfo

Signed-off-by: KUWAMURA Shin'ya <kuwa@xxxxxxxxxxxxxx>
---
 xen/arch/ia64/xen/dom0_ops.c |   44 +++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 44 insertions(+)

diff -r 497bda800505 -r c514d69c71d8 xen/arch/ia64/xen/dom0_ops.c
--- a/xen/arch/ia64/xen/dom0_ops.c      Fri Jun 04 11:35:23 2010 +0100
+++ b/xen/arch/ia64/xen/dom0_ops.c      Fri Jun 04 11:39:06 2010 +0100
@@ -803,6 +803,50 @@ long arch_do_sysctl(xen_sysctl_t *op, XE
     }
     break;
 
+    case XEN_SYSCTL_numainfo:
+    {
+        uint32_t i, j, max_node_index, last_online_node;
+        xen_sysctl_numainfo_t *ni = &op->u.numainfo;
+
+        last_online_node = last_node(node_online_map);
+        max_node_index = min_t(uint32_t, ni->max_node_index, last_online_node);
+        ni->max_node_index = last_online_node;
+
+        for (i = 0; i <= max_node_index; i++) {
+            if (!guest_handle_is_null(ni->node_to_memsize)) {
+                uint64_t memsize = node_online(i) ? 
+                                   node_memblk[i].size << PAGE_SHIFT : 0ul;
+                if (copy_to_guest_offset(ni->node_to_memsize, i, &memsize, 1))
+                    break;
+            }
+            if (!guest_handle_is_null(ni->node_to_memfree)) {
+                uint64_t memfree = node_online(i) ? 
+                                   avail_node_heap_pages(i) << PAGE_SHIFT : 
0ul;
+                if (copy_to_guest_offset(ni->node_to_memfree, i, &memfree, 1))
+                    break;
+            }
+
+            if (!guest_handle_is_null(ni->node_to_node_distance)) {
+                for (j = 0; j <= max_node_index; j++) {
+                    uint32_t distance = ~0u;
+                    if (node_online(i) && node_online (j)) 
+                        distance = node_distance(i, j);
+                    
+                    if (copy_to_guest_offset(
+                        ni->node_to_node_distance, 
+                        i*(max_node_index+1) + j, &distance, 1))
+                        break;
+                }
+                if (j <= max_node_index)
+                    break;
+            }
+        }
+
+        ret = ((i <= max_node_index) || copy_to_guest(u_sysctl, op, 1))
+            ? -EFAULT : 0;
+    }
+    break;
+
     default:
         printk("arch_do_sysctl: unrecognized sysctl: %d!!!\n",op->cmd);
         ret = -ENOSYS;

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [IA64] support XEN_SYSCTL_numainfo, Xen patchbot-unstable <=