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.


removed a lot of pointless stuff from the device manager
[palacios.git] / palacios / include / palacios / vm_dev.h
1 /*
2  * This file is part of the Palacios Virtual Machine Monitor developed
3  * by the V3VEE Project with funding from the United States National 
4  * Science Foundation and the Department of Energy.  
5  *
6  * The V3VEE Project is a joint project between Northwestern University
7  * and the University of New Mexico.  You can find out more at 
8  * http://www.v3vee.org
9  *
10  * Copyright (c) 2008, Jack Lange <jarusl@cs.northwestern.edu> 
11  * Copyright (c) 2008, The V3VEE Project <http://www.v3vee.org> 
12  * All rights reserved.
13  *
14  * Author: Jack Lange <jarusl@cs.northwestern.edu>
15  *
16  * This is free software.  You are permitted to use,
17  * redistribute, and modify it as specified in the file "V3VEE_LICENSE".
18  */
19
20 #ifndef __VM_DEV_H
21 #define __VM_DEV_H
22
23 #ifdef __V3VEE__
24
25 #include <palacios/vmm_types.h>
26 #include <palacios/vmm_list.h>
27 #include <palacios/vmm_dev_mgr.h>
28
29 struct guest_info;
30
31
32 struct vm_device;
33
34
35 struct vm_device_ops {
36     int (*init)(struct vm_device *dev);
37     int (*deinit)(struct vm_device *dev);
38
39
40     int (*reset)(struct vm_device *dev);
41
42     int (*start)(struct vm_device *dev);
43     int (*stop)(struct vm_device *dev);
44
45
46     //int (*save)(struct vm_device *dev, struct *iostream);
47     //int (*restore)(struct vm_device *dev, struct *iostream);
48 };
49
50
51
52 struct vm_device {
53     char name[32];
54   
55     void *private_data;
56
57     struct vm_device_ops * ops;
58
59     struct guest_info * vm;
60
61     struct list_head dev_link;
62
63
64     uint_t num_io_hooks;
65     struct list_head io_hooks;
66 };
67
68
69
70
71 struct vm_device * v3_create_device(char * name, struct vm_device_ops * ops, void * private_data);
72 void v3_free_device(struct vm_device * dev);
73
74
75
76 int v3_dev_hook_io(struct vm_device   *dev,
77                    ushort_t            port,
78                    int (*read)(ushort_t port, void * dst, uint_t length, struct vm_device * dev),
79                    int (*write)(ushort_t port, void * src, uint_t length, struct vm_device * dev));
80
81 int v3_dev_unhook_io(struct vm_device   *dev,
82                      ushort_t            port);
83
84
85
86
87
88
89 #endif // ! __V3VEE__
90
91 #endif