From a0ae69c94d471eb7113b146526520a5d75852051 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Edwin=20T=C3=B6r=C3=B6k?= Date: Wed, 15 Jul 2020 16:10:56 +0100 Subject: [PATCH] oxenstored: fix ABI breakage introduced in Xen 4.9.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit dbc84d2983969bb47d294131ed9e6bbbdc2aec49 (Xen >= 4.9.0) deleted XS_RESTRICT from oxenstored, which caused all the following opcodes to be shifted by 1: reset_watches became off-by-one compared to the C version of xenstored. Looking at the C code the opcode for reset watches needs: XS_RESET_WATCHES = XS_SET_TARGET + 2 So add the placeholder `Invalid` in the OCaml<->C mapping list. (Note that the code here doesn't simply convert the OCaml constructor to an integer, so we don't need to introduce a dummy constructor). Igor says that with a suitably patched xenopsd to enable watch reset, we now see `reset watches` during kdump of a guest in xenstored-access.log. Signed-off-by: Edwin Török Tested-by: Igor Druzhinin Acked-by: Christian Lindig (cherry picked from commit a6ed77f1e0334c26e6e216aea45f8674d9284856) (cherry picked from commit 9503a6df19924d2d9bf5b5a663342ba1507819c5) --- tools/ocaml/libs/xb/op.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/ocaml/libs/xb/op.ml b/tools/ocaml/libs/xb/op.ml index d4f1f08185..9bcab0f38c 100644 --- a/tools/ocaml/libs/xb/op.ml +++ b/tools/ocaml/libs/xb/op.ml @@ -28,7 +28,7 @@ let operation_c_mapping = Transaction_end; Introduce; Release; Getdomainpath; Write; Mkdir; Rm; Setperms; Watchevent; Error; Isintroduced; - Resume; Set_target; Reset_watches |] + Resume; Set_target; Invalid; Reset_watches |] let size = Array.length operation_c_mapping let array_search el a = -- 2.39.5