[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-API] [PATCH 6 of 7] [XIU]: Add explicit HVM and HAP flags to Domctl_create in the simulator



# HG changeset patch
# User David Scott <dave.scott@xxxxxxxxxxxxx>
# Date 1259361891 0
# Node ID 725caf683ec94688154459a8e6bc650cf2d03be0
# Parent  017686f2d3b2f906b094a07fbd32926ef6b832ad
[XIU]: Add explicit HVM and HAP flags to Domctl_create in the simulator.

Also increase the default loglevel so the hypercalls can be easily monitored.

Signed-off-by: David Scott <dave.scott@xxxxxxxxxxxxx>

diff -r 017686f2d3b2 -r 725caf683ec9 ocaml/xiu/xiu.ml
--- a/ocaml/xiu/xiu.ml  Fri Nov 27 22:44:50 2009 +0000
+++ b/ocaml/xiu/xiu.ml  Fri Nov 27 22:44:51 2009 +0000
@@ -20,7 +20,7 @@
        | Inject_crash
        | Inject_shutdown
 
-let debug_level = ref 0
+let debug_level = ref 3
 let inject_error = ref []
 
 let xiu_path = ref "" (* passed into udev scripts we fork *)
@@ -593,15 +593,15 @@
        let do_xc_domctl _cmd args =
                let cmd = domctl_of_int (int_of_string _cmd) in
                match cmd, args with
-               | Domctl_create, [flags; handle] ->
-                       hypercall_debug (sprintf "creating domain (%s,%s)" 
flags handle);
+               | Domctl_create, [hvm; hap; handle] ->
+                       hypercall_debug (sprintf "creating domain (%s, %s, 
,%s)" hvm hap handle);
                        let h = Array.map int_of_hexstring
                        (Array.of_list (Stringext.String.split '-' handle)) in
                        
                        if random_inject_error Inject_error_create then (
                                raise Cannot_create_domain
                        );
-                       let dom = exn_to_errno (fun () -> (domain_create false 
h).domid) in
+                       let dom = exn_to_errno (fun () -> (domain_create (hvm = 
"1") h).domid) in
                        marshall_int fd (if dom < 0 then 0 else dom);
                        0               
                | Domctl_destroy, [domid] ->
@@ -656,7 +656,7 @@
                        hypercall_debug (sprintf "DOMCTL(%d) unknown" i);
                        -einval
                | _, _ ->
-                       hypercall_debug (sprintf "DOMCTL(%s) not implemented or 
invalid number of args" _cmd);
+                       hypercall_debug (sprintf "DOMCTL(%s) not implemented or 
invalid number of args ([%s])" _cmd (String.concat ";" args));
                        -einval
                in
        let do_xc_sysctl _cmd args =
1 file changed, 5 insertions(+), 5 deletions(-)
ocaml/xiu/xiu.ml |   10 +++++-----


Attachment: xen-api.hg-7.patch
Description: Text Data

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

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.