Andrew Cooper
2013-Mar-13 15:59 UTC
[PATCH 4 of 4] PoC: ocaml: add binding to xc_domain_suppress_spurious_page_faults
# HG changeset patch # User Ian Campbell <ian.campbell@citrix.com> # Date 1294742832 0 # Node ID 6c7218be49d86a2c4741c7bdf2b8b2cd0187746c # Parent 03997417771be2aa122d7dac31256399f854c5b1 PoC: ocaml: add binding to xc_domain_suppress_spurious_page_faults Required by xapi. Taken from xen-api-libs.hg/xc and adjusted for upstream libxc+ocaml. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Rebased on top of xen-unstable. Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> diff -r 03997417771b -r 6c7218be49d8 tools/ocaml/libs/xc/xenctrl.ml --- a/tools/ocaml/libs/xc/xenctrl.ml +++ b/tools/ocaml/libs/xc/xenctrl.ml @@ -237,6 +237,9 @@ external domain_deassign_device: handle external domain_test_assign_device: handle -> domid -> (int * int * int * int) -> bool = "stub_xc_domain_test_assign_device" +external domain_suppress_spurious_page_faults: handle -> domid -> unit + = "stub_xc_domain_suppress_spurious_page_faults" + external domain_set_timer_mode: handle -> domid -> int -> unit = "stub_xc_domain_set_timer_mode" external domain_set_hpet: handle -> domid -> int -> unit = "stub_xc_domain_set_hpet" external domain_set_vpt_align: handle -> domid -> int -> unit = "stub_xc_domain_set_vpt_align" diff -r 03997417771b -r 6c7218be49d8 tools/ocaml/libs/xc/xenctrl.mli --- a/tools/ocaml/libs/xc/xenctrl.mli +++ b/tools/ocaml/libs/xc/xenctrl.mli @@ -185,6 +185,9 @@ external domain_set_machine_address_size external domain_get_machine_address_size: handle -> domid -> int = "stub_xc_domain_get_machine_address_size" +external domain_suppress_spurious_page_faults: handle -> domid -> unit + = "stub_xc_domain_suppress_spurious_page_faults" + external domain_cpuid_set: handle -> domid -> (int64 * (int64 option)) -> string option array -> string option array diff -r 03997417771b -r 6c7218be49d8 tools/ocaml/libs/xc/xenctrl_stubs.c --- a/tools/ocaml/libs/xc/xenctrl_stubs.c +++ b/tools/ocaml/libs/xc/xenctrl_stubs.c @@ -731,6 +731,17 @@ CAMLprim value stub_xc_domain_get_machin CAMLreturn(Val_int(retval)); } +CAMLprim value stub_xc_domain_suppress_spurious_page_faults(value xch, + value domid) +{ + CAMLparam2(xch, domid); + + int retval = xc_domain_suppress_spurious_page_faults(_H(xch), _D(domid)); + if (retval) + failwith_xc(_H(xch)); + CAMLreturn(Val_unit); +} + CAMLprim value stub_xc_domain_cpuid_set(value xch, value domid, value input, value config)