external hard_shutdown : domid -> unit = "stub_xl_device_vfb_hard_shutdown"
end
+module Device_pci = struct
+ type t =
+ {
+ func : int;
+ dev : int;
+ bus : int;
+ domain : int;
+ vdevfn : int;
+ msitranslate : bool;
+ power_mgmt : bool;
+ }
-type pci_info =
-{
- func : int;
- dev : int;
- bus : int;
- domain : int;
- vdevfn : int;
- msitranslate : bool;
- power_mgmt : bool;
-}
+ external add : t -> domid -> unit = "stub_xl_device_pci_add"
+ external remove : t -> domid -> unit = "stub_xl_device_pci_remove"
+ external shutdown : domid -> unit = "stub_xl_device_pci_shutdown"
+end
type physinfo =
{
external domain_make : create_info -> domid = "stub_xl_domain_make"
external domain_build : build_info -> domid -> build_state = "stub_xl_domain_build"
-external pci_add : pci_info -> domid -> unit = "stub_xl_pci_add"
-external pci_remove : pci_info -> domid -> unit = "stub_xl_pci_remove"
-external pci_shutdown : domid -> unit = "stub_xl_pci_shutdown"
-
type button =
| Button_Power
| Button_Sleep
external hard_shutdown : domid -> unit = "stub_xl_device_vfb_hard_shutdown"
end
-type pci_info =
-{
- func : int;
- dev : int;
- bus : int;
- domain : int;
- vdevfn : int;
- msitranslate : bool;
- power_mgmt : bool;
-}
+module Device_pci : sig
+ type t =
+ {
+ func : int;
+ dev : int;
+ bus : int;
+ domain : int;
+ vdevfn : int;
+ msitranslate : bool;
+ power_mgmt : bool;
+ }
+
+ external add : t -> domid -> unit = "stub_xl_device_pci_add"
+ external remove : t -> domid -> unit = "stub_xl_device_pci_remove"
+ external shutdown : domid -> unit = "stub_xl_device_pci_shutdown"
+end
type physinfo =
{
external domain_make : create_info -> domid = "stub_xl_domain_make"
external domain_build : build_info -> domid -> build_state = "stub_xl_domain_build"
-external pci_add : pci_info -> domid -> unit = "stub_xl_pci_add"
-external pci_remove : pci_info -> domid -> unit = "stub_xl_pci_remove"
-external pci_shutdown : domid -> unit = "stub_xl_pci_shutdown"
-
type button =
| Button_Power
| Button_Sleep
CAMLreturn(Val_unit);
}
-value stub_xl_pci_add(value info, value domid)
+value stub_xl_device_pci_add(value info, value domid)
{
CAMLparam2(info, domid);
libxl_device_pci c_info;
CAMLreturn(Val_unit);
}
-value stub_xl_pci_remove(value info, value domid)
+value stub_xl_device_pci_remove(value info, value domid)
{
CAMLparam2(info, domid);
libxl_device_pci c_info;
CAMLreturn(Val_unit);
}
-value stub_xl_pci_shutdown(value domid)
+value stub_xl_device_pci_shutdown(value domid)
{
CAMLparam1(domid);
int ret;