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.


VNET memory interface and deinit cleanup
Peter Dinda [Fri, 4 Oct 2013 15:18:03 +0000 (10:18 -0500)]
linux_module/palacios-vnet.c
palacios/include/vnet/vnet_host.h
palacios/src/devices/lnx_virtio_nic.c

index 077eeda..4b23772 100644 (file)
@@ -140,10 +140,10 @@ host_del_timer(void * vnet_timer){
 
 
 static void *
-host_allocate_pages(int num_pages, unsigned int alignment)
+host_allocate_pages(int num_pages, unsigned int alignment, int node_id, int constraint)
 {
     // allocates pages preferentially on the caller's node
-    return palacios_allocate_pages(num_pages, alignment, -1);
+    return palacios_allocate_pages(num_pages, alignment, node_id, constraint);
 }
 
 
index 9ab151d..548a252 100644 (file)
@@ -61,7 +61,7 @@ struct vnet_host_hooks {
     void (*print)(void *vm , int core, const char * format, ...)
        __attribute__ ((format (printf, 3, 4)));
   
-    void *(*allocate_pages)(int num_pages, unsigned int alignment);
+    void *(*allocate_pages)(int num_pages, unsigned int alignment, int node_id, int constraints);
     void (*free_pages)(void * page, int num_pages);
 
     void *(*malloc)(unsigned int size);
index 7ead43d..636d8a5 100644 (file)
@@ -198,6 +198,11 @@ static int virtio_deinit_state(struct guest_info *core, struct virtio_net_state
     if (ns->timer) { 
        v3_remove_timer(core,ns->timer);
     }
+
+    v3_lock_deinit(&(ns->rx_lock));
+    v3_lock_deinit(&(ns->tx_lock));
+
+
     return 0;
 }
 
@@ -753,9 +758,6 @@ static int virtio_free(struct virtio_dev_state * virtio) {
        V3_Free(backend);
     }
 
-    v3_lock_deinit(&(virtio->rx_lock));
-    v3_lock_deinit(&(virtio->tx_lock));
-
     V3_Free(virtio);
 
     return 0;