diff --git a/ChangeLog b/ChangeLog index 7a6741ca4b..08a1cb5576 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +Wed Dec 17 08:02:01 +0100 2008 Jim Meyering + + fix numa-related (and kernel-dependent) test failures + This change is required on some kernels due to the way a change in + the kernel's CONFIG_NR_CPUS propagates through the numa library. + * src/qemu_conf.c (qemudCapsInitNUMA): Pass numa_all_cpus_ptr->size/8 + as the buffer-length-in-bytes in the call to numa_node_to_cpus, since + that's what is required on second and subseqent calls. + * src/uml_conf.c (umlCapsInitNUMA): Likewise. + Tue Dec 16 17:26:49 EST 2008 Cole Robinson * src/qemu_driver.c: Sanitize qemu monitor reads. diff --git a/src/qemu_conf.c b/src/qemu_conf.c index 59171e7fe0..312f64674b 100644 --- a/src/qemu_conf.c +++ b/src/qemu_conf.c @@ -323,8 +323,8 @@ qemudCapsInitNUMA(virCapsPtr caps) goto cleanup; for (n = 0 ; n <= numa_max_node() ; n++) { - - if (numa_node_to_cpus(n, mask, MAX_CPUS_MASK_LEN / 8) < 0) + int mask_n_bytes = numa_all_cpus_ptr->size / 8; + if (numa_node_to_cpus(n, mask, mask_n_bytes) < 0) goto cleanup; for (ncpus = 0, i = 0 ; i < MAX_CPUS ; i++) diff --git a/src/uml_conf.c b/src/uml_conf.c index 3659c6bf64..00adf27357 100644 --- a/src/uml_conf.c +++ b/src/uml_conf.c @@ -79,8 +79,8 @@ umlCapsInitNUMA(virCapsPtr caps) goto cleanup; for (n = 0 ; n <= numa_max_node() ; n++) { - - if (numa_node_to_cpus(n, mask, MAX_CPUS_MASK_LEN / 8) < 0) + int mask_n_bytes = numa_all_cpus_ptr->size / 8; + if (numa_node_to_cpus(n, mask, mask_n_bytes) < 0) goto cleanup; for (ncpus = 0, i = 0 ; i < MAX_CPUS ; i++)