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.


Lock checking enhancements
[palacios.git] / linux_module / palacios-vnet.c
index 297852d..bdc88a1 100644 (file)
@@ -86,7 +86,12 @@ static void *
 host_create_timer(unsigned long interval, 
                  void (* timer_fun)(void * priv_data), 
                  void * data){
-    struct host_timer * timer = (struct host_timer *)kmalloc(sizeof(struct host_timer), GFP_KERNEL);
+    struct host_timer * timer = (struct host_timer *)palacios_alloc(sizeof(struct host_timer));
+
+    if (!timer) { 
+       ERROR("Unable to allocate timer in VNET\n");
+       return NULL;
+    }
 
     timer->interval = interval;
     timer->timer_fun = timer_fun;
@@ -130,13 +135,11 @@ host_del_timer(void * vnet_timer){
 
     del_timer(&(timer->timer));
 
-    kfree(timer);
+    palacios_free(timer);
 }
 
 
 
-
-
 static struct vnet_host_hooks vnet_host_hooks = {
     .timer_create              = host_create_timer,
     .timer_del                 = host_del_timer,
@@ -156,8 +159,10 @@ static struct vnet_host_hooks vnet_host_hooks = {
     .mutex_free                        = palacios_mutex_free,
     .mutex_lock                        = palacios_mutex_lock, 
     .mutex_unlock              = palacios_mutex_unlock,
+    .mutex_lock_irqsave         = palacios_mutex_lock_irqsave, 
+    .mutex_unlock_irqrestore    = palacios_mutex_unlock_irqrestore,
 
-    .print                     = palacios_print,
+    .print                     = palacios_print_scoped,
     .allocate_pages            = palacios_allocate_pages,
     .free_pages                        = palacios_free_pages,
     .malloc                    = palacios_alloc,