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
global_pci_power_mgmt: int;
sound: string option;
inject_sci: int;
+ qemu_pv: bool;
}
let default_nic =
| "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 =
| "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 =
global_pci_power_mgmt = 0;
inject_sci = 0;
sound = None;
+ qemu_pv = true;
(* list_{get/del/add} *)
disks = [];