[Pkg-xen-devel] [OCAML 5/7] Import patch 23940:187d59e32a58 from xen-unstable.hg

Jon Ludlam jonathan.ludlam at eu.citrix.com
Tue Nov 29 14:43:27 UTC 2011


---
 xen/debian/patches/series                      |    2 +-
 xen/debian/patches/upstream-23940:187d59e32a58 |   45 ++++++++++++++++++++++++
 2 files changed, 46 insertions(+), 1 deletions(-)
 create mode 100644 xen/debian/patches/upstream-23940:187d59e32a58

diff --git a/xen/debian/patches/series b/xen/debian/patches/series
index c0bde78..56190b5 100644
--- a/xen/debian/patches/series
+++ b/xen/debian/patches/series
@@ -56,4 +56,4 @@ upstream-23936:cdb34816a40a-rework
 upstream-23937:5173834e8476
 upstream-23938:fa04fbd56521-rework
 upstream-23939:51288f69523f-rework
-
+upstream-23940:187d59e32a58
diff --git a/xen/debian/patches/upstream-23940:187d59e32a58 b/xen/debian/patches/upstream-23940:187d59e32a58
new file mode 100644
index 0000000..2c7521a
--- /dev/null
+++ b/xen/debian/patches/upstream-23940:187d59e32a58
@@ -0,0 +1,45 @@
+# HG changeset patch
+# User Jon Ludlam <jonathan.ludlam at eu.citrix.com>
+# 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 <zheng.li at eu.citrix.com>
+Acked-by: Ian Campbell <ian.campbell.com>
+Committed-by: Ian Jackson <ian.jackson.citrix.com>
+Acked-by: Jon Ludlam <jonathan.ludlam at eu.citrix.com>
+
+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




More information about the Pkg-xen-devel mailing list