Palacios Public Git Repository

To checkout Palacios execute

  git clone http://v3vee.org/palacios/palacios.web/palacios.git
This will give you the master branch. You probably want the devel branch or one of the release branches. To switch to the devel branch, simply execute
  cd palacios
  git checkout --track -b devel origin/devel
The other branches are similar.


lot of changes
[palacios.git] / palacios / include / palacios / vmm_dev_mgr.h
1 #ifndef _VMM_DEV_MGR
2 #define _VMM_DEV_MGR
3
4 #include <palacios/vmm_types.h>
5 #include <palacios/vmm_list.h>
6 #include <palacios/vmm_string.h>
7
8 struct vm_device;
9 struct guest_info;
10
11
12 struct vmm_dev_mgr {
13   uint_t num_devs;
14   struct list_head dev_list;
15
16   uint_t num_io_hooks;
17   struct list_head io_hooks;
18   
19   uint_t num_mem_hooks;
20   struct list_head mem_hooks;
21
22 };
23
24
25
26 struct dev_io_hook {
27   ushort_t port;
28   
29   int (*read)(ushort_t port, void * dst, uint_t length, struct vm_device * dev);
30   int (*write)(ushort_t port, void * src, uint_t length, struct vm_device * dev);
31
32   struct vm_device * dev;
33
34   // Do not touch anything below this  
35
36   struct list_head dev_list;
37   struct list_head mgr_list;
38 };
39
40 struct dev_mem_hook {
41   void  *addr_start;
42   void  *addr_end;
43
44   struct vm_device * dev;
45
46   // Do not touch anything below this
47   struct list_head dev_list;
48   struct list_head mgr_list;
49 };
50
51
52 // Registration of devices
53
54 //
55 // The following device manager functions should only be called
56 // when the guest is stopped
57 //
58
59 int dev_mgr_init(struct vmm_dev_mgr *mgr);
60 int dev_mgr_deinit(struct vmm_dev_mgr * mgr);
61
62
63
64 int attach_device(struct guest_info *vm, struct vm_device * dev);
65 int unattach_device(struct vm_device *dev);
66
67
68 int dev_mgr_add_device(struct vmm_dev_mgr * mgr, struct vm_device * dev);
69 int dev_mgr_remove_device(struct vmm_dev_mgr * mgr, struct vm_device * dev);
70
71
72
73
74 void PrintDebugDevMgr(struct vmm_dev_mgr * mgr);
75 void PrintDebugDev(struct vm_device * dev);
76 void PrintDebugDevIO(struct vm_device * dev);
77 void PrintDebugDevMgrIO(struct vmm_dev_mgr * mgr);
78
79 #endif