WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-api

[Xen-API] [PATCH 8 of 9] PoC: ocaml: add binding to xc_domain_suppress_s

To: xen-api@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-API] [PATCH 8 of 9] PoC: ocaml: add binding to xc_domain_suppress_spurious_page_faults
From: Ian Campbell <ian.campbell@xxxxxxxxxx>
Date: Tue, 11 Jan 2011 10:55:56 +0000
Cc: gianni.tedesco@xxxxxxxxxx, zheng.li@xxxxxxxxxxxxx
Delivery-date: Tue, 11 Jan 2011 03:46:32 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <patchbomb.1294743348@xxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-api-request@lists.xensource.com?subject=help>
List-id: Discussion of API issues surrounding Xen <xen-api.lists.xensource.com>
List-post: <mailto:xen-api@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=unsubscribe>
References: <patchbomb.1294743348@xxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-api-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mercurial-patchbomb/1.5.2
# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1294742832 0
# Node ID eb4ac8ec9239aa0b6320388caab5d2162f20de4f
# Parent  8110fd3fc41eb6730d53df9d4ef221d65a079df4
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@xxxxxxxxxx>

diff -r 8110fd3fc41e -r eb4ac8ec9239 tools/ocaml/libs/xc/xc.ml
--- a/tools/ocaml/libs/xc/xc.ml Tue Jan 11 10:47:12 2011 +0000
+++ b/tools/ocaml/libs/xc/xc.ml Tue Jan 11 10:47:12 2011 +0000
@@ -241,6 +241,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 8110fd3fc41e -r eb4ac8ec9239 tools/ocaml/libs/xc/xc.mli
--- a/tools/ocaml/libs/xc/xc.mli        Tue Jan 11 10:47:12 2011 +0000
+++ b/tools/ocaml/libs/xc/xc.mli        Tue Jan 11 10:47:12 2011 +0000
@@ -201,6 +201,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 8110fd3fc41e -r eb4ac8ec9239 tools/ocaml/libs/xc/xc_stubs.c
--- a/tools/ocaml/libs/xc/xc_stubs.c    Tue Jan 11 10:47:12 2011 +0000
+++ b/tools/ocaml/libs/xc/xc_stubs.c    Tue Jan 11 10:47:12 2011 +0000
@@ -730,6 +730,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)

_______________________________________________
xen-api mailing list
xen-api@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/mailman/listinfo/xen-api

<Prev in Thread] Current Thread [Next in Thread>