X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?p=palacios.git;a=blobdiff_plain;f=palacios%2Finclude%2Fpalacios%2Fvmm.h;h=746faba3fe62927362e1b23632d4ad1d06856e2f;hp=d81f4b682ad1d6d4616e646b1396d79f74d3b627;hb=570ad6257ed18fbbc840c17a600f12f2dc44b010;hpb=33bc3aea893607276b82cc2f1237f88a9e435dc1 diff --git a/palacios/include/palacios/vmm.h b/palacios/include/palacios/vmm.h index d81f4b6..746faba 100644 --- a/palacios/include/palacios/vmm.h +++ b/palacios/include/palacios/vmm.h @@ -42,11 +42,11 @@ /* This clearly won't work, we need some way to get a return value out of it */ -#define VMMMalloc(size) \ +#define VMMMalloc(type, var, size) \ do { \ extern struct vmm_os_hooks * os_hooks; \ if ((os_hooks) && (os_hooks)->malloc) { \ - (os_hooks)->malloc(size); \ + var = (type)(os_hooks)->malloc(size); \ } \ } while (0) \ @@ -70,11 +70,6 @@ - - - -/* We need a memory map and an IO device map */ - /* This will contain function pointers that provide OS services */ struct vmm_os_hooks { void (*print_info)(const char * format, ...); @@ -90,13 +85,14 @@ struct vmm_os_hooks { void *(*paddr_to_vaddr)(void *addr); void *(*vaddr_to_paddr)(void *addr); + // Do we need this here? + void (*snprintf)(char * dst, char * format, int len, ...); void (*start_kernel_thread)(); // include pointer to function }; - /* This will contain Function pointers that control the VMs */ struct vmm_ctrl_ops { int (*init_guest)(struct guest_info* info); @@ -108,8 +104,6 @@ struct vmm_ctrl_ops { - - void Init_VMM(struct vmm_os_hooks * hooks, struct vmm_ctrl_ops * vmm_ops);