aboutsummaryrefslogtreecommitdiffstats
path: root/tools/ocaml/libs/xc/xenctrl_stubs.c
Commit message (Collapse)AuthorAgeFilesLines
* tools/ocaml: fix erroneous free of cpumap in stub_xc_vcpu_getaffinityMatthew Daley2013-10-101-2/+0
| | | | | | | | | | | Not sure how it got there... Coverity-ID: 1056196 This is CVE-2013-4370 / XSA-69 Signed-off-by: Matthew Daley <mattjd@gmail.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* tools/ocaml: libxc bindings: Correct PCI terminologyAndrew Cooper2013-01-111-17/+17
| | | | | | | | | | Some renaming to correct the PCI and SBDF terminology. No functional change. Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* tools/ocaml: libxc bindings: Fix SBDF encodingAndrew Cooper2013-01-111-5/+4
| | | | | | | | | | | | | Changeset 23861:ec7c81fbe0de alters the SBDF encoding expected by the DOMCTL_{de,}assign_device hypercalls. While it updates libxl, libxc and the python bindings, the ocaml bindings got missed. As a result, any attempt to use PCI Passthrough with Xen-4.2 and later will fail. Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* tools/ocaml: Release the global lock during some hypercallsJonathan Davies2011-12-011-47/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | Since libxc is re-entrant, there is no need for the OCaml bindings to prevent more than one thread from entering libxc concurrently. Previously, the OCaml bindings had prevented re-entrancy by not using caml_{enter,leave}_blocking_section in the C stubs. The absence of these calls meant that the global lock remained held during hypercalls. This caused multi-threaded applications to completely lock up during long-running hypercalls. Calls to these functions were present but commented out in the OCaml bindings some years ago when libxc was not fully re-entrant. Instead, we now do call caml_{enter,leave}_blocking_section in all the places it used to be commented out, meaning that the global lock is released during those hypercalls. We also no longer assert the XC_OPENFLAG_NON_REENTRANT flag when calling xc_interface_open because the caller no longer does re-entrancy prevention at those places. This patch has now gone through a XenRT nightly test; no problems were observed. Signed-off-by: Jonathan Davies <jonathan.davies@citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools/ocaml: Small improvement to the ocaml xenctrl libraryJon Ludlam2011-10-101-1/+3
| | | | | | | | Add a new field 'max_nr_cpus' to the physinfo type in the ocaml xc bindings Signed-off-by: Zheng Li <zheng.li@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* tools/ocaml: Fix 2 bit-twiddling bugs and an off-by-oneJon Ludlam2011-10-101-3/+3
| | | | | | | | | | 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@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell.com> Committed-by: Ian Jackson <ian.jackson.citrix.com> Acked-by: Jon Ludlam <jonathan.ludlam@eu.citrix.com>
* tools/ocaml: Rename the ocaml librariesJon Ludlam2011-10-101-0/+1161
ocamlfind does not support namespaces, so to avoid name clashes the module names have become longer. Additionally, the xenstore and xenbus subdirs, which contain several modules each, have been packed into toplevel Xenstore and Xenbus modules. xb becomes xenbus, xc becomes xenctrl, xl becomes xenlight, xs becomes xenstore, eventchn becomes xeneventchn and mmap becomes xenmmap. [ Patch modified from that submitted, to update the .hgignore, and to cope with intervening changes to mmap_stubs.c -iwj ] Signed-off-by: Jon Ludlam <jonathan.ludlam@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>