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.


source code clean up,
[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 struct vmm_dev_mgr {
12   uint_t num_devs;
13   struct list_head dev_list;
14
15   uint_t num_io_hooks;
16   struct list_head io_hooks;
17   
18   uint_t num_mem_hooks;
19   struct list_head mem_hooks;
20
21 };
22
23
24 int dev_mgr_init(struct vmm_dev_mgr *mgr);
25 int dev_mgr_deinit(struct vmm_dev_mgr * mgr);
26
27
28 // Registration of devices
29
30 //
31 // The following device manager functions should only be called
32 // when the guest is stopped
33 //
34
35 int v3_attach_device(struct guest_info *vm, struct vm_device * dev);
36 int v3_unattach_device(struct vm_device *dev);
37
38
39 void PrintDebugDevMgr(struct vmm_dev_mgr * mgr);
40
41 #ifdef __V3VEE__
42
43 struct dev_io_hook {
44   ushort_t port;
45   
46   int (*read)(ushort_t port, void * dst, uint_t length, struct vm_device * dev);
47   int (*write)(ushort_t port, void * src, uint_t length, struct vm_device * dev);
48
49   struct vm_device * dev;
50
51   // Do not touch anything below this  
52
53   struct list_head dev_list;
54   struct list_head mgr_list;
55 };
56
57 struct dev_mem_hook {
58   void  *addr_start;
59   void  *addr_end;
60
61   struct vm_device * dev;
62
63   // Do not touch anything below this
64   struct list_head dev_list;
65   struct list_head mgr_list;
66 };
67
68
69
70
71 void PrintDebugDev(struct vm_device * dev);
72 void PrintDebugDevIO(struct vm_device * dev);
73 void PrintDebugDevMgrIO(struct vmm_dev_mgr * mgr);
74
75 #endif // ! __V3VEE__
76
77 #endif