1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2024-12-22 17:34:18 +03:00

* 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
This commit is contained in:
Daniel Veillard 2009-01-19 20:16:10 +00:00
parent b751b46bc5
commit 9a969b86a9
3 changed files with 18 additions and 7 deletions

View File

@ -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

View 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;

View 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");