[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[RFC v2 5/7] libxl: add device function definitions to libxl_types.idl



Add definitions to libxl_type.idl for the device functions required by
each device. In addition, add a Builtin definition for libxl_asyncop_how,
since each device function requires this as a parameter.

This is still prepatory work, and a later commit will make use of these
new definitions to generate the code from gentypes.py.

Signed-off-by: Nick Rosbrook <rosbrookn@xxxxxxxxxxxx>
---
 tools/libs/light/libxl_types.idl | 202 +++++++++++++++++++++++++++++++
 1 file changed, 202 insertions(+)

diff --git a/tools/libs/light/libxl_types.idl b/tools/libs/light/libxl_types.idl
index 5b85a7419f..550af7a1c7 100644
--- a/tools/libs/light/libxl_types.idl
+++ b/tools/libs/light/libxl_types.idl
@@ -33,6 +33,8 @@ libxl_hwcap = Builtin("hwcap", passby=PASS_BY_REFERENCE, 
json_parse_type="JSON_A
 libxl_ms_vm_genid = Builtin("ms_vm_genid", passby=PASS_BY_REFERENCE, 
check_default_fn="libxl_ms_vm_genid_is_zero",
                             copy_fn="libxl_ms_vm_genid_copy")
 
+libxl_asyncop_how = Builtin("asyncop_how", passby=PASS_BY_CONST_REFERENCE)
+
 #
 # Specific integer types
 #
@@ -666,6 +668,24 @@ libxl_device_vfb = Struct("device_vfb", [
     ("keymap",        string),
     ])
 
+libxl_device_vfb_add = DeviceAddFunction("device_vfb_add",
+    device_param=("vfb", libxl_device_vfb),
+    extra_params=[("ao_how", libxl_asyncop_how)],
+    return_type=libxl_error
+)
+
+libxl_device_vfb_remove = DeviceRemoveFunction("device_vfb_remove",
+    device_param=("vfb", libxl_device_vfb),
+    extra_params=[("ao_how", libxl_asyncop_how)],
+    return_type=libxl_error
+)
+
+libxl_device_vfb_destroy = DeviceDestroyFunction("device_vfb_destroy",
+    device_param=("vfb", libxl_device_vfb),
+    extra_params=[("ao_how", libxl_asyncop_how)],
+    return_type=libxl_error
+)
+
 libxl_device_vkb = Struct("device_vkb", [
     ("backend_domid", libxl_domid),
     ("backend_domname", string),
@@ -684,6 +704,24 @@ libxl_device_vkb = Struct("device_vkb", [
     ("multi_touch_num_contacts", uint32)
     ])
 
+libxl_device_vkb_add = DeviceAddFunction("device_vkb_add",
+    device_param=("vkb", libxl_device_vkb),
+    extra_params=[("ao_how", libxl_asyncop_how)],
+    return_type=libxl_error
+)
+
+libxl_device_vkb_remove = DeviceRemoveFunction("device_vkb_remove",
+    device_param=("vkb", libxl_device_vkb),
+    extra_params=[("ao_how", libxl_asyncop_how)],
+    return_type=libxl_error
+)
+
+libxl_device_vkb_destroy = DeviceAddFunction("device_vkb_destroy",
+    device_param=("vkb", libxl_device_vkb),
+    extra_params=[("ao_how", libxl_asyncop_how)],
+    return_type=libxl_error
+)
+
 libxl_device_disk = Struct("device_disk", [
     ("backend_domid", libxl_domid),
     ("backend_domname", string),
@@ -708,6 +746,24 @@ libxl_device_disk = Struct("device_disk", [
     ("hidden_disk", string)
     ])
 
+libxl_device_disk_add = DeviceAddFunction("device_disk_add",
+    device_param=("disk", libxl_device_disk),
+    extra_params=[("ao_how", libxl_asyncop_how)],
+    return_type=libxl_error
+)
+
+libxl_device_disk_remove = DeviceRemoveFunction("device_disk_remove",
+    device_param=("disk", libxl_device_disk),
+    extra_params=[("ao_how", libxl_asyncop_how)],
+    return_type=libxl_error
+)
+
+libxl_device_disk_destroy = DeviceDestroyFunction("device_disk_destroy",
+    device_param=("disk", libxl_device_disk),
+    extra_params=[("ao_how", libxl_asyncop_how)],
+    return_type=libxl_error
+)
+
 libxl_device_nic = Struct("device_nic", [
     ("backend_domid", libxl_domid),
     ("backend_domname", string),
@@ -776,6 +832,24 @@ libxl_device_nic = Struct("device_nic", [
     ("colo_checkpoint_port", string)
     ])
 
+libxl_device_nic_add = DeviceAddFunction("device_nic_add",
+    device_param=("nic", libxl_device_nic),
+    extra_params=[("ao_how", libxl_asyncop_how)],
+    return_type=libxl_error
+)
+
+libxl_device_nic_remove = DeviceRemoveFunction("device_nic_remove",
+    device_param=("nic", libxl_device_nic),
+    extra_params=[("ao_how", libxl_asyncop_how)],
+    return_type=libxl_error
+)
+
+libxl_device_nic_destroy = DeviceDestroyFunction("device_nic_destroy",
+    device_param=("nic", libxl_device_nic),
+    extra_params=[("ao_how", libxl_asyncop_how)],
+    return_type=libxl_error
+)
+
 libxl_device_pci = Struct("device_pci", [
     ("func", uint8),
     ("dev", uint8),
@@ -791,6 +865,24 @@ libxl_device_pci = Struct("device_pci", [
     ("name", string),
     ])
 
+libxl_device_pci_add = DeviceAddFunction("device_pci_add",
+    device_param=("pci", libxl_device_pci),
+    extra_params=[("ao_how", libxl_asyncop_how)],
+    return_type=libxl_error
+)
+
+libxl_device_pci_remove = DeviceRemoveFunction("device_pci_remove",
+    device_param=("pci", libxl_device_pci),
+    extra_params=[("ao_how", libxl_asyncop_how)],
+    return_type=libxl_error
+)
+
+libxl_device_pci_destroy = DeviceDestroyFunction("device_pci_destroy",
+    device_param=("pci", libxl_device_pci),
+    extra_params=[("ao_how", libxl_asyncop_how)],
+    return_type=libxl_error
+)
+
 libxl_device_rdm = Struct("device_rdm", [
     ("start", uint64),
     ("size", uint64),
@@ -817,6 +909,26 @@ libxl_device_usbctrl = Struct("device_usbctrl", [
     ("backend_domname", string),
    ])
 
+libxl_device_usbctrl_add = DeviceAddFunction("device_usbctrl_add",
+    device_param=("usbctrl", libxl_device_usbctrl),
+    extra_params=[("ao_how", libxl_asyncop_how)],
+    return_type=libxl_error
+)
+
+libxl_device_usbctrl_remove = DeviceRemoveFunction("device_usbctrl_remove",
+    device_param=("usbctrl", libxl_device_usbctrl),
+    extra_params=[("ao_how", libxl_asyncop_how)],
+    return_type=libxl_error,
+    custom_remove="usbctrl"
+)
+
+libxl_device_usbctrl_destroy = DeviceDestroyFunction("device_usbctrl_destroy",
+    device_param=("usbctrl", libxl_device_usbctrl),
+    extra_params=[("ao_how", libxl_asyncop_how)],
+    return_type=libxl_error,
+    custom_remove="usbctrl"
+)
+
 libxl_device_usbdev = Struct("device_usbdev", [
     ("ctrl", libxl_devid),
     ("port", integer),
@@ -827,6 +939,18 @@ libxl_device_usbdev = Struct("device_usbdev", [
            ])),
     ])
 
+libxl_device_usbdev_add = DeviceAddFunction("device_usbdev_add",
+    device_param=("usbdev", libxl_device_usbdev),
+    extra_params=[("ao_how", libxl_asyncop_how)],
+    return_type=libxl_error
+)
+
+libxl_device_usbdev_remove = DeviceRemoveFunction("device_usbdev_remove",
+    device_param=("usbdev", libxl_device_usbdev),
+    extra_params=[("ao_how", libxl_asyncop_how)],
+    return_type=libxl_error
+)
+
 libxl_device_dtdev = Struct("device_dtdev", [
     ("path", string),
     ])
@@ -838,6 +962,24 @@ libxl_device_vtpm = Struct("device_vtpm", [
     ("uuid",             libxl_uuid),
 ])
 
+libxl_device_vtpm_add = DeviceAddFunction("device_vtpm_add",
+    device_param=("vtpm", libxl_device_vtpm),
+    extra_params=[("ao_how", libxl_asyncop_how)],
+    return_type=libxl_error
+)
+
+libxl_device_vtpm_remove = DeviceRemoveFunction("device_vtpm_remove",
+    device_param=("vtpm", libxl_device_vtpm),
+    extra_params=[("ao_how", libxl_asyncop_how)],
+    return_type=libxl_error
+)
+
+libxl_device_vtpm_destroy = DeviceDestroyFunction("device_vtpm_destroy",
+    device_param=("vtpm", libxl_device_vtpm),
+    extra_params=[("ao_how", libxl_asyncop_how)],
+    return_type=libxl_error
+)
+
 libxl_device_p9 = Struct("device_p9", [
     ("backend_domid",    libxl_domid),
     ("backend_domname",  string),
@@ -847,12 +989,36 @@ libxl_device_p9 = Struct("device_p9", [
     ("devid",            libxl_devid),
 ])
 
+libxl_device_p9_remove = DeviceRemoveFunction("device_p9_remove",
+    device_param=("p9", libxl_device_p9),
+    extra_params=[("ao_how", libxl_asyncop_how)],
+    return_type=libxl_error
+)
+
+libxl_device_p9_destroy = DeviceDestroyFunction("device_p9_destroy",
+    device_param=("p9", libxl_device_p9),
+    extra_params=[("ao_how", libxl_asyncop_how)],
+    return_type=libxl_error
+)
+
 libxl_device_pvcallsif = Struct("device_pvcallsif", [
     ("backend_domid",    libxl_domid),
     ("backend_domname",  string),
     ("devid",            libxl_devid),
 ])
 
+libxl_device_pvcallsif_remove = DeviceRemoveFunction("device_pvcallsif_remove",
+    device_param=("pvcallsif", libxl_device_pvcallsif),
+    extra_params=[("ao_how", libxl_asyncop_how)],
+    return_type=libxl_error
+)
+
+libxl_device_pvcallsif_destroy = 
DeviceDestroyFunction("device_pvcallsif_destroy",
+    device_param=("pvcallsif", libxl_device_pvcallsif),
+    extra_params=[("ao_how", libxl_asyncop_how)],
+    return_type=libxl_error
+)
+
 libxl_device_channel = Struct("device_channel", [
     ("backend_domid", libxl_domid),
     ("backend_domname", string),
@@ -879,6 +1045,24 @@ libxl_device_vdispl = Struct("device_vdispl", [
     ("connectors", Array(libxl_connector_param, "num_connectors"))
     ])
 
+libxl_device_vdispl_add = DeviceAddFunction("device_vdispl_add",
+    device_param=("vdispl", libxl_device_vdispl),
+    extra_params=[("ao_how", libxl_asyncop_how)],
+    return_type=libxl_error
+)
+
+libxl_device_vdispl_remove = DeviceRemoveFunction("device_vdispl_remove",
+    device_param=("vdispl", libxl_device_vdispl),
+    extra_params=[("ao_how", libxl_asyncop_how)],
+    return_type=libxl_error
+)
+
+libxl_device_vdispl_destroy = DeviceDestroyFunction("device_vdispl_destroy",
+    device_param=("vdispl", libxl_device_vdispl),
+    extra_params=[("ao_how", libxl_asyncop_how)],
+    return_type=libxl_error
+)
+
 libxl_vsnd_pcm_format = Enumeration("vsnd_pcm_format", [
     (1,  "S8"),
     (2,  "U8"),
@@ -942,6 +1126,24 @@ libxl_device_vsnd = Struct("device_vsnd", [
     ("pcms", Array(libxl_vsnd_pcm, "num_vsnd_pcms"))
     ])
 
+libxl_device_vsnd_add = DeviceAddFunction("device_vsnd_add",
+    device_param=("vsnd", libxl_device_vsnd),
+    extra_params=[("ao_how", libxl_asyncop_how)],
+    return_type=libxl_error
+)
+
+libxl_device_vsnd_remove = DeviceRemoveFunction("device_vsnd_remove",
+    device_param=("vsnd", libxl_device_vsnd),
+    extra_params=[("ao_how", libxl_asyncop_how)],
+    return_type=libxl_error
+)
+
+libxl_device_vsnd_destroy = DeviceDestroyFunction("device_vsnd_destroy",
+    device_param=("vsnd", libxl_device_vsnd),
+    extra_params=[("ao_how", libxl_asyncop_how)],
+    return_type=libxl_error
+)
+
 libxl_domain_config = Struct("domain_config", [
     ("c_info", libxl_domain_create_info),
     ("b_info", libxl_domain_build_info),
-- 
2.17.1




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.