X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Finclude%2Fpalacios%2Fvmm.h;h=1f6228e753e69747123ebaa8940d70665d04df71;hb=a82645917cee62af80d1f1c3b537a12807c25606;hp=db94298c6f017e951ca49df48766f9bdd07e2004;hpb=ed88df2e8e304ac4b391521d47c192127ad9bc5a;p=palacios.git diff --git a/palacios/include/palacios/vmm.h b/palacios/include/palacios/vmm.h index db94298..1f6228e 100644 --- a/palacios/include/palacios/vmm.h +++ b/palacios/include/palacios/vmm.h @@ -192,7 +192,7 @@ int v3_get_vcore(struct guest_info *); -#define V3_CREATE_THREAD(fn, arg, name) ({ \ +#define V3_CREATE_AND_START_THREAD(fn, arg, name) ({ \ void * thread = NULL; \ extern struct v3_os_hooks * os_hooks; \ if ((os_hooks) && (os_hooks)->start_kernel_thread) { \ @@ -230,6 +230,14 @@ int v3_get_vcore(struct guest_info *); } \ }) +#define V3_CREATE_AND_START_THREAD_ON_CPU(cpu, fn, arg, name) ({ \ + void *thread = V3_CREATE_THREAD_ON_CPU(cpu,fn,arg,name); \ + if (thread) { \ + V3_START_THREAD(thread); \ + } \ + thread; \ + }) + #define V3_MOVE_THREAD_TO_CPU(pcpu, thread) ({ \ int ret = -1; \ extern struct v3_os_hooks * os_hooks; \ @@ -425,7 +433,7 @@ void Init_V3(struct v3_os_hooks * hooks, char * cpus, int num_cpus, char *option void Shutdown_V3( void ); -struct v3_vm_info * v3_create_vm(void * cfg, void * priv_data, char * name); +struct v3_vm_info * v3_create_vm(void * cfg, void * priv_data, char * name, unsigned int cpu_mask); int v3_start_vm(struct v3_vm_info * vm, unsigned int cpu_mask); int v3_stop_vm(struct v3_vm_info * vm); int v3_pause_vm(struct v3_vm_info * vm);