--- xen/debian/patches/series | 1 + xen/debian/patches/tools-ocaml-fix-xc.diff | 45 ++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 0 deletions(-) create mode 100644 xen/debian/patches/tools-ocaml-fix-xc.diff
diff --git a/xen/debian/patches/series b/xen/debian/patches/series index a974926..8f816da 100644 --- a/xen/debian/patches/series +++ b/xen/debian/patches/series @@ -56,3 +56,4 @@ tools-ocaml-rename-ocamlfind-packages.diff tools-ocaml-fix-xc-dependencies.diff tools-ocaml-remove-uuid.diff tools-ocaml-remove-log.diff +tools-ocaml-fix-xc.diff diff --git a/xen/debian/patches/tools-ocaml-fix-xc.diff b/xen/debian/patches/tools-ocaml-fix-xc.diff new file mode 100644 index 0000000..2c7521a --- /dev/null +++ b/xen/debian/patches/tools-ocaml-fix-xc.diff @@ -0,0 +1,45 @@ +# HG changeset patch +# User Jon Ludlam <[email protected]> +# Date 1318261276 -3600 +# Node ID 187d59e32a586d65697ed46bef106b52e3fb5ab9 +# Parent 51288f69523fcbbefa12cea5a761a6e957410151 +tools/ocaml: Fix 2 bit-twiddling bugs and an off-by-one + +The bit bugs are in ocaml vcpu affinity calls, and the off-by-one +error is in the ocaml console ring code + +Signed-off-by: Zheng Li <[email protected]> +Acked-by: Ian Campbell <ian.campbell.com> +Committed-by: Ian Jackson <ian.jackson.citrix.com> +Acked-by: Jon Ludlam <[email protected]> + +diff -r 51288f69523f -r 187d59e32a58 tools/ocaml/libs/xc/xenctrl_stubs.c +--- a/tools/ocaml/libs/xc/xenctrl_stubs.c Mon Oct 10 16:41:16 2011 +0100 ++++ b/tools/ocaml/libs/xc/xenctrl_stubs.c Mon Oct 10 16:41:16 2011 +0100 +@@ -430,7 +430,7 @@ + + for (i=0; i<len; i++) { + if (Bool_val(Field(cpumap, i))) +- c_cpumap[i/8] |= i << (i&7); ++ c_cpumap[i/8] |= 1 << (i&7); + } + retval = xc_vcpu_setaffinity(_H(xch), _D(domid), + Int_val(vcpu), c_cpumap); +@@ -466,7 +466,7 @@ + ret = caml_alloc(len, 0); + + for (i=0; i<len; i++) { +- if (c_cpumap[i%8] & 1 << (i&7)) ++ if (c_cpumap[i/8] & 1 << (i&7)) + Store_field(ret, i, Val_true); + else + Store_field(ret, i, Val_false); +@@ -523,7 +523,7 @@ + + CAMLprim value stub_xc_readconsolering(value xch) + { +- unsigned int size = RING_SIZE; ++ unsigned int size = RING_SIZE - 1; + char *ring_ptr = ring; + + CAMLparam1(xch); -- 1.7.5.4 -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected] Archive: http://lists.debian.org/[email protected]

