X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=linux_module%2Fpalacios-vnet.c;h=d4f09b030f593df0e4286c387bb22bb792c01768;hb=471edd59ca70371e97cbad759e1710433f35990d;hp=25537aa7f8734ef164777296b5b72e626dc34abe;hpb=07aa8f3c18a33af0961e7546980a63ab5f6fba4f;p=palacios.git diff --git a/linux_module/palacios-vnet.c b/linux_module/palacios-vnet.c index 25537aa..d4f09b0 100644 --- a/linux_module/palacios-vnet.c +++ b/linux_module/palacios-vnet.c @@ -14,8 +14,8 @@ #include #include -#include "mm.h" #include "palacios.h" +#include "mm.h" #include "palacios-vnet.h" #include "linux-exts.h" @@ -116,7 +116,7 @@ host_start_timer(void * vnet_timer){ static void host_reset_timer(void * vnet_timer, unsigned long interval){ - struct host_timer * timer = (struct host_timer *)timer; + struct host_timer * timer = (struct host_timer *)vnet_timer; timer->interval = interval; } @@ -139,6 +139,12 @@ host_del_timer(void * vnet_timer){ } +static void * +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, node_id, constraint); +} @@ -149,7 +155,7 @@ static struct vnet_host_hooks vnet_host_hooks = { .timer_stop = host_stop_timer, .timer_reset = host_reset_timer, - .thread_start = palacios_start_kernel_thread, + .thread_start = palacios_create_and_start_kernel_thread, .thread_sleep = host_kthread_sleep, .thread_wakeup = host_kthread_wakeup, .thread_stop = host_kthread_stop, @@ -161,9 +167,11 @@ 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, - .allocate_pages = palacios_allocate_pages, + .print = palacios_print_scoped, + .allocate_pages = host_allocate_pages, .free_pages = palacios_free_pages, .malloc = palacios_alloc, .free = palacios_free,