4 #include <palacios/vmm_types.h>
5 #include <palacios/vmm_device_types.h>
6 #include <palacios/vmm_list.h>
7 #include <palacios/vmm_string.h>
14 struct vm_device * head;
19 struct dev_io_hook_list {
20 struct dev_io_hook * head;
25 struct dev_mem_hook_list {
26 struct dev_mem_hook * head;
33 struct vm_dev_list dev_list;
34 struct dev_io_hook_list io_hooks;
35 struct dev_mem_hook_list mem_hooks;
43 int (*read)(ushort_t port, void * dst, uint_t length, struct vm_device * dev);
44 int (*write)(ushort_t port, void * src, uint_t length, struct vm_device * dev);
46 struct vm_device * dev;
48 // Do not touch anything below this
49 struct dev_io_hook *dev_next, *dev_prev;
50 struct dev_io_hook *mgr_next, *mgr_prev;
57 // Do not touch anything below this
58 struct dev_mem_hook *dev_next, *dev_prev;
59 struct dev_mem_hook *mgr_next, *mgr_prev;
64 // Registration of devices
67 // The following device manager functions should only be called
68 // when the guest is stopped
71 int dev_mgr_init(struct vmm_dev_mgr *mgr);
72 int dev_mgr_deinit(struct vmm_dev_mgr * mgr);
76 int attach_device(struct guest_info *vm, struct vm_device * dev);
77 int unattach_device(struct vm_device *dev);
80 int dev_mgr_add_device(struct vmm_dev_mgr * mgr, struct vm_device * dev);
81 int dev_mgr_remove_device(struct vmm_dev_mgr * mgr, struct vm_device * dev);
84 void PrintDebugDevMgr(struct vmm_dev_mgr * mgr);
85 void PrintDebugDev(struct vm_device * dev);
86 void PrintDebugDevIO(struct vm_device * dev);
87 void PrintDebugDevMgrIO(struct vmm_dev_mgr * mgr);