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 6 of 7] [XIU]: Add explicit HVM and HAP flags to Domctl

To: xen-api@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-API] [PATCH 6 of 7] [XIU]: Add explicit HVM and HAP flags to Domctl_create in the simulator
From: David Scott <dave.scott@xxxxxxxxxxxxx>
Date: Fri, 27 Nov 2009 22:47:31 +0000
Delivery-date: Fri, 27 Nov 2009 14:47:32 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <patchbomb.1259362045@xxxxxxxxxxxxxxxxxxxx>
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>
Sender: xen-api-bounces@xxxxxxxxxxxxxxxxxxx
# 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