X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Finclude%2Fvnet%2Fvnet_host.h;h=ec6a28ceb4467ddda7785bf2a0c83dfe99ac6f90;hb=de5c2110458436a9300aa0a171dbbe83e415ee4d;hp=5ace72943c150b21ae9cc41723a70136e4d352f4;hpb=f31b4ee024b09ded6a5be33a33cca0e2e756b63d;p=palacios.git diff --git a/palacios/include/vnet/vnet_host.h b/palacios/include/vnet/vnet_host.h index 5ace729..ec6a28c 100644 --- a/palacios/include/vnet/vnet_host.h +++ b/palacios/include/vnet/vnet_host.h @@ -38,7 +38,8 @@ typedef void *vnet_intr_flags_t; struct vnet_host_hooks { void *(*thread_start)(int (*fn)(void * arg), void * arg, - char * thread_name); + char * thread_name, + v3_resource_control_t *resource_control); void (*thread_sleep)(long timeout); void (*thread_wakeup)(void * thread); @@ -58,10 +59,10 @@ struct vnet_host_hooks { /* duplicate part from os_hooks */ void (*yield_cpu)(void); - void (*print)(const char * format, ...) - __attribute__ ((format (printf, 1, 2))); + 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); void (*free_pages)(void * page, int num_pages); void *(*malloc)(unsigned int size); @@ -92,7 +93,7 @@ extern struct vnet_host_hooks * host_hooks; /* 4KB-aligned */ static inline void * Vnet_AllocPages(int num_pages){ if ((host_hooks) && host_hooks->allocate_pages) { - return host_hooks->allocate_pages(num_pages, PAGE_SIZE_4KB); + return host_hooks->allocate_pages(num_pages, PAGE_SIZE_4KB,-1); } return NULL; @@ -217,17 +218,17 @@ static inline void vnet_reset_timer(struct vnet_timer * timer, if(level <= net_debug) { \ extern struct vnet_host_hooks * host_hooks; \ if ((host_hooks) && (host_hooks)->print) { \ - (host_hooks)->print((fmt), ##args); \ + (host_hooks)->print(0, -1, (fmt), ##args); \ } \ } \ } while (0) -#define Vnet_Debug(fmt, args...) \ +#define Vnet_Debug(fmt, args...) \ do { \ extern struct vnet_host_hooks * host_hooks; \ if ((host_hooks) && (host_hooks)->print) { \ - (host_hooks)->print((fmt), ##args); \ + (host_hooks)->print(0, -1, (fmt), ##args); \ } \ } while (0)