]> xenbits.xensource.com Git - libvirt.git/commitdiff
* src/xen_internal.c src/xend_internal.c: Relax NUMA checking
authorDaniel Veillard <veillard@redhat.com>
Mon, 19 Jan 2009 20:16:10 +0000 (20:16 +0000)
committerDaniel Veillard <veillard@redhat.com>
Mon, 19 Jan 2009 20:16:10 +0000 (20:16 +0000)
  for RHEL-5 and change the detection stategy for default Xen
  accesses, patch by Markus Armbruster
daniel

ChangeLog
src/xen_internal.c
src/xend_internal.c

index f1f7afe47ba28876cb12dfd9df636989659627bc..a035267bd195bec7cc08816ce2b4572a461e1f1f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Mon Jan 19 20:58:34 CET 2009 Daniel Veillard <veillard@redhat.com>
+
+       * src/xen_internal.c src/xend_internal.c: Relax NUMA checking
+         for RHEL-5 and change the detection stategy for default Xen
+         accesses, patch by Markus Armbruster
+
 Mon Jan 19 20:47:18 CET 2009 Daniel Veillard <veillard@redhat.com>
 
        * src/xend_internal.c src/xm_internal.c: fix paravirt framebuffer
index 947cd37dd078a771c9296a76282c0c761798a8d3..12c1e1e3ee2cd3ffcc82982e4e5de438a12e3801 100644 (file)
@@ -93,6 +93,12 @@ typedef privcmd_hypercall_t hypercall_t;
 #define __HYPERVISOR_domctl 36
 #endif
 
+#ifdef WITH_RHEL5_API
+#define SYS_IFACE_MIN_VERS_NUMA 3
+#else
+#define SYS_IFACE_MIN_VERS_NUMA 4
+#endif
+
 static int xen_ioctl_hypercall_cmd = 0;
 static int initialized = 0;
 static int in_init = 0;
@@ -2150,7 +2156,7 @@ xenHypervisorBuildCapabilities(virConnectPtr conn,
         goto no_memory;
 
 
-    if (sys_interface_version >= 4) {
+    if (sys_interface_version >= SYS_IFACE_MIN_VERS_NUMA) {
         if (xenDaemonNodeGetTopology(conn, caps) != 0) {
             virCapabilitiesFree(caps);
             return NULL;
@@ -3072,7 +3078,7 @@ xenHypervisorNodeGetCellsFreeMemory(virConnectPtr conn, unsigned long long *free
     /*
      * Support only sys_interface_version >=4
      */
-    if (sys_interface_version < 4) {
+    if (sys_interface_version < SYS_IFACE_MIN_VERS_NUMA) {
         virXenErrorFunc (conn, VIR_ERR_XEN_CALL, __FUNCTION__,
                         "unsupported in sys interface < 4", 0);
         return -1;
index df4b5e5d453db7882fd6e64a0a6f89922021b720..a53c2e941610ad0faeca26078b706cbbc7e013ac 100644 (file)
@@ -2547,6 +2547,8 @@ sexpr_to_xend_node_info(const struct sexpr *root, virNodeInfoPtr info)
  * Internal routine populating capability info with
  * NUMA node mapping details
  *
+ * Does nothing when the system doesn't support NUMA (not an error).
+ *
  * Returns 0 in case of success, -1 in case of error
  */
 static int
@@ -2563,11 +2565,8 @@ sexpr_to_xend_topology(virConnectPtr conn,
     int numCpus;
 
     nodeToCpu = sexpr_node(root, "node/node_to_cpu");
-    if (nodeToCpu == NULL) {
-        virXendError(conn, VIR_ERR_INTERNAL_ERROR,
-                     "%s", _("failed to parse topology information"));
-        return -1;
-    }
+    if (nodeToCpu == NULL)
+        return 0;               /* no NUMA support */
 
     numCpus = sexpr_int(root, "node/nr_cpus");