]> xenbits.xensource.com Git - xenclient/toolstack.git/commitdiff
add a config option to not start qemu in the pv case. solve the problem on relying...
authorVincent Hanquez <vincent.hanquez@eu.citrix.com>
Mon, 10 Aug 2009 17:18:12 +0000 (18:18 +0100)
committerVincent Hanquez <vincent.hanquez@eu.citrix.com>
Tue, 11 Aug 2009 12:45:29 +0000 (13:45 +0100)
to start qemu or not.

xenvm/vmact.ml
xenvm/vmconfig.ml

index 786c514e44dcf916495458327831adfd58882480..c3e9461822ead963ac3748dc07fd28bd3d1d5e91 100644 (file)
@@ -271,11 +271,13 @@ let add_devices xc xs domid state restore =
                Device.PCI.add ~xc ~xs ~hvm:cfg.hvm ~msitranslate ~pci_power_mgmt devs domid devid
        ) pcis;
 
-       if (not cfg.hvm) && cfg.vnc <> (-1) then (
-               Device.Vfb.add ~xc ~xs ~hvm:cfg.hvm domid
+       if (not cfg.hvm) then (
+               let protocol = devproto_of_state state in
+               Device.Vfb.add ~xc ~xs ~hvm:cfg.hvm ~protocol domid;
+               Device.Vkb.add ~xc ~xs ~hvm:cfg.hvm ~protocol domid
        );
 
-       if cfg.hvm || cfg.vnc <> (-1) then (
+       if cfg.hvm || cfg.qemu_pv then (
                (* add device model *)
                let dmpath = "/opt/xensource/libexec/qemu-dm-wrapper" in
                let dmstart = if restore then Device.Dm.restore else Device.Dm.start in
index 3a2ef955fc408e19cceb3111bb500f99349aff62..c6969f9edb38514b2c345e7f76cda60b5ba22f65 100644 (file)
@@ -132,6 +132,7 @@ type config = {
        global_pci_power_mgmt: int;
        sound: string option;
        inject_sci: int;
+       qemu_pv: bool;
 }
 
 let default_nic =
@@ -340,6 +341,7 @@ let get cfg field =
        | "inject-sci" -> string_of_int cfg.inject_sci
        | "sound"      -> string_of_string_option cfg.sound
        | "notify"     -> string_of_notify cfg.notify
+       | "qemu-pv"    -> string_of_bool cfg.qemu_pv
        | _            -> raise (Unknown_field field)
 
 let set cfg field value =
@@ -375,6 +377,7 @@ let set cfg field value =
        | "inject-sci"       -> { cfg with inject_sci = int_of_string value } 
        | "sound"            -> { cfg with sound = string_option_of_string value }
        | "notify"           -> { cfg with notify = config_notify_of_string value }
+       | "qemu-pv"          -> { cfg with qemu_pv = bool_of_string value }
        | _           -> raise (Unknown_field field)
 
 let list_add cfg field value =
@@ -450,6 +453,7 @@ let empty =
                global_pci_power_mgmt = 0;
                inject_sci = 0;
                sound = None;
+               qemu_pv = true;
 
                (* list_{get/del/add} *)
                disks = [];