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.
6 * The V3VEE Project is a joint project between Northwestern University
7 * and the University of New Mexico. You can find out more at
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.
14 * Author: Jack Lange <jarusl@cs.northwestern.edu>
16 * This is free software. You are permitted to use,
17 * redistribute, and modify it as specified in the file "V3VEE_LICENSE".
25 #include <palacios/vmm_types.h>
26 #include <palacios/vmm_list.h>
27 #include <palacios/vmm_dev_mgr.h>
35 struct vm_device_ops {
36 int (*init)(struct vm_device *dev);
37 int (*deinit)(struct vm_device *dev);
40 int (*reset)(struct vm_device *dev);
42 int (*start)(struct vm_device *dev);
43 int (*stop)(struct vm_device *dev);
46 //int (*save)(struct vm_device *dev, struct *iostream);
47 //int (*restore)(struct vm_device *dev, struct *iostream);
57 struct vm_device_ops * ops;
59 struct guest_info * vm;
61 struct list_head dev_link;
65 struct list_head io_hooks;
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);
76 int v3_dev_hook_io(struct vm_device *dev,
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));
81 int v3_dev_unhook_io(struct vm_device *dev,