4 #include <palacios/vmm_types.h>
5 #include <palacios/vmm_list.h>
6 #include <palacios/vmm_string.h>
14 struct list_head dev_list;
17 struct list_head io_hooks;
20 struct list_head mem_hooks;
23 struct list_head irq_hooks;
31 int (*read)(ushort_t port, void * dst, uint_t length, struct vm_device * dev);
32 int (*write)(ushort_t port, void * src, uint_t length, struct vm_device * dev);
34 struct vm_device * dev;
36 // Do not touch anything below this
38 struct dev_io_hook *dev_next, *dev_prev;
39 struct dev_io_hook *mgr_next, *mgr_prev;
41 struct list_head dev_list;
42 struct list_head mgr_list;
49 struct vm_device * dev;
51 // Do not touch anything below this
52 struct list_head dev_list;
53 struct list_head mgr_list;
59 int (*handler)(uint_t irq, struct vm_device * dev);
61 struct vm_device * dev;
63 struct list_head dev_list;
64 struct list_head mgr_list;
67 // Registration of devices
70 // The following device manager functions should only be called
71 // when the guest is stopped
74 int dev_mgr_init(struct vmm_dev_mgr *mgr);
75 int dev_mgr_deinit(struct vmm_dev_mgr * mgr);
79 int attach_device(struct guest_info *vm, struct vm_device * dev);
80 int unattach_device(struct vm_device *dev);
83 int dev_mgr_add_device(struct vmm_dev_mgr * mgr, struct vm_device * dev);
84 int dev_mgr_remove_device(struct vmm_dev_mgr * mgr, struct vm_device * dev);
88 int dev_mgr_add_io_hook(struct vmm_dev_mgr * mgr, struct dev_io_hook * hook);
89 int dev_mgr_remove_io_hook(struct vmm_dev_mgr * mgr, struct dev_io_hook * hook);
90 int dev_add_io_hook(struct vmm_dev_mgr * mgr, struct dev_io_hook * hook);
91 int dev_remove_io_hook(struct vmm_dev_mgr * mgr, struct dev_io_hook * hook);
92 struct dev_io_hook * dev_find_io_hook(struct vm_device * dev, ushort_t port);
93 struct dev_io_hook * dev_mgr_find_io_hook(struct vmm_dev_mgr * mgr, ushort_t port)
96 void PrintDebugDevMgr(struct vmm_dev_mgr * mgr);
97 void PrintDebugDev(struct vm_device * dev);
98 void PrintDebugDevIO(struct vm_device * dev);
99 void PrintDebugDevMgrIO(struct vmm_dev_mgr * mgr);