X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Finclude%2Fpalacios%2Fvmm_dev_mgr.h;h=ed49769b2f3b3b77b3aab655e6d6d5d04f4d7fcd;hb=c502aac6baf363d633aca6ec883b05476634e854;hp=6ea56df1f1be8f10099f2f328a6dcf282a944cd4;hpb=570ad6257ed18fbbc840c17a600f12f2dc44b010;p=palacios.releases.git diff --git a/palacios/include/palacios/vmm_dev_mgr.h b/palacios/include/palacios/vmm_dev_mgr.h index 6ea56df..ed49769 100644 --- a/palacios/include/palacios/vmm_dev_mgr.h +++ b/palacios/include/palacios/vmm_dev_mgr.h @@ -2,37 +2,23 @@ #define _VMM_DEV_MGR #include -#include #include #include - struct vm_device; struct guest_info; -struct vm_dev_list { - struct vm_device * head; - uint_t num_devs; -}; - - -struct dev_io_hook_list { - struct dev_io_hook * head; - uint_t num_hooks; -}; - - -struct dev_mem_hook_list { - struct dev_mem_hook * head; - uint_t num_hooks; -}; +struct vmm_dev_mgr { + uint_t num_devs; + struct list_head dev_list; + uint_t num_io_hooks; + struct list_head io_hooks; + + uint_t num_mem_hooks; + struct list_head mem_hooks; -struct vmm_dev_mgr { - struct vm_dev_list dev_list; - struct dev_io_hook_list io_hooks; - struct dev_mem_hook_list mem_hooks; }; @@ -46,21 +32,23 @@ struct dev_io_hook { struct vm_device * dev; // Do not touch anything below this - struct dev_io_hook *dev_next, *dev_prev; - struct dev_io_hook *mgr_next, *mgr_prev; + + struct list_head dev_list; + struct list_head mgr_list; }; struct dev_mem_hook { - void *addr_start; - void *addr_end; + void *addr_start; + void *addr_end; + + struct vm_device * dev; // Do not touch anything below this - struct dev_mem_hook *dev_next, *dev_prev; - struct dev_mem_hook *mgr_next, *mgr_prev; + struct list_head dev_list; + struct list_head mgr_list; }; - // Registration of devices // @@ -81,6 +69,8 @@ int dev_mgr_add_device(struct vmm_dev_mgr * mgr, struct vm_device * dev); int dev_mgr_remove_device(struct vmm_dev_mgr * mgr, struct vm_device * dev); + + void PrintDebugDevMgr(struct vmm_dev_mgr * mgr); void PrintDebugDev(struct vm_device * dev); void PrintDebugDevIO(struct vm_device * dev);