提交 9a969b86 编写于 作者: D Daniel Veillard

* 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
daniel
上级 b751b46b
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> Mon Jan 19 20:47:18 CET 2009 Daniel Veillard <veillard@redhat.com>
* src/xend_internal.c src/xm_internal.c: fix paravirt framebuffer * src/xend_internal.c src/xm_internal.c: fix paravirt framebuffer
......
...@@ -93,6 +93,12 @@ typedef privcmd_hypercall_t hypercall_t; ...@@ -93,6 +93,12 @@ typedef privcmd_hypercall_t hypercall_t;
#define __HYPERVISOR_domctl 36 #define __HYPERVISOR_domctl 36
#endif #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 xen_ioctl_hypercall_cmd = 0;
static int initialized = 0; static int initialized = 0;
static int in_init = 0; static int in_init = 0;
...@@ -2150,7 +2156,7 @@ xenHypervisorBuildCapabilities(virConnectPtr conn, ...@@ -2150,7 +2156,7 @@ xenHypervisorBuildCapabilities(virConnectPtr conn,
goto no_memory; goto no_memory;
if (sys_interface_version >= 4) { if (sys_interface_version >= SYS_IFACE_MIN_VERS_NUMA) {
if (xenDaemonNodeGetTopology(conn, caps) != 0) { if (xenDaemonNodeGetTopology(conn, caps) != 0) {
virCapabilitiesFree(caps); virCapabilitiesFree(caps);
return NULL; return NULL;
...@@ -3072,7 +3078,7 @@ xenHypervisorNodeGetCellsFreeMemory(virConnectPtr conn, unsigned long long *free ...@@ -3072,7 +3078,7 @@ xenHypervisorNodeGetCellsFreeMemory(virConnectPtr conn, unsigned long long *free
/* /*
* Support only sys_interface_version >=4 * 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__, virXenErrorFunc (conn, VIR_ERR_XEN_CALL, __FUNCTION__,
"unsupported in sys interface < 4", 0); "unsupported in sys interface < 4", 0);
return -1; return -1;
......
...@@ -2547,6 +2547,8 @@ sexpr_to_xend_node_info(const struct sexpr *root, virNodeInfoPtr info) ...@@ -2547,6 +2547,8 @@ sexpr_to_xend_node_info(const struct sexpr *root, virNodeInfoPtr info)
* Internal routine populating capability info with * Internal routine populating capability info with
* NUMA node mapping details * 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 * Returns 0 in case of success, -1 in case of error
*/ */
static int static int
...@@ -2563,11 +2565,8 @@ sexpr_to_xend_topology(virConnectPtr conn, ...@@ -2563,11 +2565,8 @@ sexpr_to_xend_topology(virConnectPtr conn,
int numCpus; int numCpus;
nodeToCpu = sexpr_node(root, "node/node_to_cpu"); nodeToCpu = sexpr_node(root, "node/node_to_cpu");
if (nodeToCpu == NULL) { if (nodeToCpu == NULL)
virXendError(conn, VIR_ERR_INTERNAL_ERROR, return 0; /* no NUMA support */
"%s", _("failed to parse topology information"));
return -1;
}
numCpus = sexpr_int(root, "node/nr_cpus"); numCpus = sexpr_int(root, "node/nr_cpus");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册