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.


restructured device manager deinitialization
[palacios.git] / palacios / src / palacios / vmm_dev_mgr.c
index 6f80ba9..d41c331 100644 (file)
@@ -44,7 +44,7 @@ static int dev_eq_fn(addr_t key1, addr_t key2) {
 }
 
 
-int v3_init_devices() {
+int V3_init_devices() {
     extern struct v3_device_info __start__v3_devices[];
     extern struct v3_device_info __stop__v3_devices[];
     struct v3_device_info * tmp_dev =  __start__v3_devices;
@@ -108,15 +108,21 @@ int v3_init_dev_mgr(struct v3_vm_info * vm) {
 }
 
 
-int v3_dev_mgr_deinit(struct v3_vm_info * vm) {
-    struct vm_device * dev;
+int v3_free_vm_devices(struct v3_vm_info * vm) {
     struct vmm_dev_mgr * mgr = &(vm->dev_mgr);
+    struct vm_device * dev;
     struct vm_device * tmp;
 
     list_for_each_entry_safe(dev, tmp, &(mgr->dev_list), dev_link) {
        v3_remove_device(dev);
     }
 
+    return 0;
+}
+
+int v3_deinit_dev_mgr(struct v3_vm_info * vm) {
+    struct vmm_dev_mgr * mgr = &(vm->dev_mgr);
+
     v3_free_htable(mgr->blk_table, 0, 0);
     v3_free_htable(mgr->net_table, 0, 0);
     v3_free_htable(mgr->char_table, 0, 0);