]> xenbits.xensource.com Git - xenclient/toolstack.git/commitdiff
add vfb stuff in the core of xenops.
authorVincent Hanquez <vincent.hanquez@eu.citrix.com>
Thu, 30 Jul 2009 13:50:20 +0000 (14:50 +0100)
committerVincent Hanquez <vincent.hanquez@eu.citrix.com>
Thu, 30 Jul 2009 13:50:20 +0000 (14:50 +0100)
xenops/device.ml
xenops/device_common.ml
xenops/device_common.mli

index 11fef21d2ffb2d3169d02d1cb4ea6141130bb5cf..fbb22147d5e5b536f6940235c35d8d2802cbf1d0 100644 (file)
@@ -1039,15 +1039,41 @@ let hard_shutdown ~xs (x: device) =
 
 end
 
+module Vfb = struct
+
+let add ~xc ~xs ~hvm domid =
+       debug "Device.Vfb.add %d" domid;
+
+       let frontend = { domid = domid; kind = Vfb; devid = 0 } in
+       let backend = frontend in
+       let device = { backend = backend; frontend = frontend } in
+
+       let back = [] in
+       let front = [] in
+       Generic.add_device ~xs device back front;
+       ()
+
+let hard_shutdown ~xs (x: device) =
+       debug "Device.Vfb.hard_shutdown %s" (string_of_device x);
+       ()
+
+let clean_shutdown ~xs (x: device) =
+       debug "Device.Vfb.clean_shutdown %s" (string_of_device x);
+       ()
+
+end
+
 let hard_shutdown ~xs (x: device) = match x.backend.kind with
   | Vif -> Vif.hard_shutdown ~xs x
   | Vbd | Tap -> Vbd.hard_shutdown ~xs x
   | Pci -> PCI.hard_shutdown ~xs x
+  | Vfb -> Vfb.hard_shutdown ~xs x
 
 let clean_shutdown ~xs (x: device) = match x.backend.kind with
   | Vif -> Vif.clean_shutdown ~xs x
   | Vbd | Tap -> Vbd.clean_shutdown ~xs x
   | Pci -> PCI.clean_shutdown ~xs x
+  | Vfb -> Vfb.clean_shutdown ~xs x
 
 let can_surprise_remove ~xs (x: device) = Generic.can_surprise_remove ~xs x
 
index 7baa170f9b05fb2415a666dd743ba846eaa691a4..75bdfacb917041903a44ac1ffb558a3173ff08b8 100644 (file)
@@ -19,7 +19,7 @@ open Stringext
 open Hashtblext
 open Pervasiveext
 
-type kind = Vif | Vbd | Tap | Pci
+type kind = Vif | Vbd | Tap | Pci | Vfb
 
 type devid = int
 (** Represents one end of a device *)
@@ -46,9 +46,9 @@ open D
 open Printf
 
 let string_of_kind = function
-  | Vif -> "vif" | Vbd -> "vbd" | Tap -> "tap" | Pci -> "pci"
+  | Vif -> "vif" | Vbd -> "vbd" | Tap -> "tap" | Pci -> "pci" | Vfb -> "vfb"
 let kind_of_string = function
-  | "vif" -> Vif | "vbd" -> Vbd | "tap" -> Tap | "pci" -> Pci
+  | "vif" -> Vif | "vbd" -> Vbd | "tap" -> Tap | "pci" -> Pci | "vfb" -> Vfb
   | x -> raise (Unknown_device_type x)
 
 let string_of_endpoint (x: endpoint) =
index ffc438b6e55f58410648f6254c449cda8cba1360..1666e50478528e6cc4a5837dc6fb43f923af50ef 100644 (file)
@@ -15,7 +15,7 @@
  * GNU Lesser General Public License for more details.
  *)
 
-type kind = Vif | Vbd | Tap | Pci
+type kind = Vif | Vbd | Tap | Pci | Vfb
 
 type devid = int