From ef985223491c728c3430075728b1cd7071b91a3d Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Mon, 10 Nov 2008 14:35:35 -0500 Subject: [PATCH] libvirtvirt-0.3.3-numa-compat.patch --- src/xen_internal.c | 12 +++++++++++- src/xend_internal.c | 6 ++++++ 2 files changed, 17 insertions(+), 1 deletions(-) diff --git a/src/xen_internal.c b/src/xen_internal.c index 72c61eb..42ab3fc 100644 --- a/src/xen_internal.c +++ b/src/xen_internal.c @@ -2149,7 +2149,10 @@ xenHypervisorBuildCapabilities(virConnectPtr conn, goto no_memory; - if (sys_interface_version >= 4) { + /* RHEL5 ABI backported numa info so relax + * this check to be '3' instead of '4' + */ + if (sys_interface_version >= 3) { if (xenDaemonNodeGetTopology(conn, caps) != 0) { virCapabilitiesFree(caps); return NULL; @@ -2949,11 +2952,18 @@ xenHypervisorNodeGetCellsFreeMemory(virConnectPtr conn, unsigned long long *free /* * Support only sys_interface_version >=4 */ +#if 0 + /* + * RHEL5.2 ABI backported NUMA free cell hypercall so + * no need to reject this. Just try it - it may work + * if on new enough RHEL kernel + */ if (sys_interface_version < 4) { virXenErrorFunc (conn, VIR_ERR_XEN_CALL, __FUNCTION__, "unsupported in sys interface < 4", 0); return -1; } +#endif priv = (xenUnifiedPrivatePtr) conn->privateData; if (priv->handle < 0) { diff --git a/src/xend_internal.c b/src/xend_internal.c index bad9de3..038a6e4 100644 --- a/src/xend_internal.c +++ b/src/xend_internal.c @@ -2552,9 +2552,15 @@ sexpr_to_xend_topology(virConnectPtr conn, nodeToCpu = sexpr_node(root, "node/node_to_cpu"); if (nodeToCpu == NULL) { + /* RHEL5 compat - this is not fatal - it simply + * means we're on a HV without the backport + */ +#if 0 virXendError(conn, VIR_ERR_INTERNAL_ERROR, "%s", _("failed to parse topology information")); return -1; +#endif + return 0; } numCpus = sexpr_int(root, "node/nr_cpus"); -- 1.5.4.3