diff --git a/ChangeLog b/ChangeLog index 7a6741ca4b1d96716cec4a0d4773d3fde56045ff..08a1cb5576568361796c7e0f5467a4bdd104cce2 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 59171e7fe0bcebaf09e53911f423b5789ea66a55..312f64674b9d3323e57f1526209ecb63e5a4af29 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 3659c6bf64d977efcbf51fbbf21d161510ec98f0..00adf273576a36df3c1ba79197d09311fc6c2a6a 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++)