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;
32 int (*read)(ushort_t port, void * dst, uint_t length, struct vm_device * dev);
33 int (*write)(ushort_t port, void * src, uint_t length, struct vm_device * dev);
35 struct vm_device * dev;
37 // Do not touch anything below this
39 struct dev_io_hook *dev_next, *dev_prev;
40 struct dev_io_hook *mgr_next, *mgr_prev;
42 struct list_head dev_list;
43 struct list_head mgr_list;
50 struct vm_device * dev;
52 // Do not touch anything below this
53 struct list_head dev_list;
54 struct list_head mgr_list;
61 int (*handler)(uint_t irq, struct vm_device * dev);
63 struct vm_device * dev;
65 struct list_head dev_list;
66 struct list_head mgr_list;
70 // Registration of devices
73 // The following device manager functions should only be called
74 // when the guest is stopped
77 int dev_mgr_init(struct vmm_dev_mgr *mgr);
78 int dev_mgr_deinit(struct vmm_dev_mgr * mgr);
82 int attach_device(struct guest_info *vm, struct vm_device * dev);
83 int unattach_device(struct vm_device *dev);
86 int dev_mgr_add_device(struct vmm_dev_mgr * mgr, struct vm_device * dev);
87 int dev_mgr_remove_device(struct vmm_dev_mgr * mgr, struct vm_device * dev);
91 int dev_mgr_add_io_hook(struct vmm_dev_mgr * mgr, struct dev_io_hook * hook);
92 int dev_mgr_remove_io_hook(struct vmm_dev_mgr * mgr, struct dev_io_hook * hook);
93 int dev_add_io_hook(struct vmm_dev_mgr * mgr, struct dev_io_hook * hook);
94 int dev_remove_io_hook(struct vmm_dev_mgr * mgr, struct dev_io_hook * hook);
95 struct dev_io_hook * dev_find_io_hook(struct vm_device * dev, ushort_t port);
96 struct dev_io_hook * dev_mgr_find_io_hook(struct vmm_dev_mgr * mgr, ushort_t port)
99 void PrintDebugDevMgr(struct vmm_dev_mgr * mgr);
100 void PrintDebugDev(struct vm_device * dev);
101 void PrintDebugDevIO(struct vm_device * dev);
102 void PrintDebugDevMgrIO(struct vmm_dev_mgr * mgr);