X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?p=palacios.git;a=blobdiff_plain;f=palacios%2Finclude%2Fpalacios%2Fvmm.h;h=878966f7669954507865738c8725903b09c2db40;hp=989806632bae1e6fe04a4dba82e13cdd6312502f;hb=4f0bb09709fcff0e08aef60c1f0253bbef91f608;hpb=316c417125ed34aaa60f9fc5486a6d8dec4fb361 diff --git a/palacios/include/palacios/vmm.h b/palacios/include/palacios/vmm.h index 9898066..878966f 100644 --- a/palacios/include/palacios/vmm.h +++ b/palacios/include/palacios/vmm.h @@ -38,57 +38,34 @@ /* utility definitions */ +#define V3_Print(fmt, args...) \ + do { \ + extern struct v3_os_hooks * os_hooks; \ + if ((os_hooks) && (os_hooks)->print) { \ + (os_hooks)->print((fmt), ##args); \ + } \ + } while (0) + + #define PrintDebug(fmt, args...) \ do { \ extern struct v3_os_hooks * os_hooks; \ - if ((os_hooks) && (os_hooks)->print_debug) { \ - (os_hooks)->print_debug((fmt), ##args); \ + if ((os_hooks) && (os_hooks)->print) { \ + (os_hooks)->print((fmt), ##args); \ } \ } while (0) -#if 1 -#else -#define PrintDebug(fmt,args ...) -#endif - - #define PrintError(fmt, args...) \ do { \ extern struct v3_os_hooks * os_hooks; \ - if ((os_hooks) && (os_hooks)->print_debug) { \ - (os_hooks)->print_debug("%s(%d): " fmt, __FILE__, __LINE__, ##args); \ + if ((os_hooks) && (os_hooks)->print) { \ + (os_hooks)->print("%s(%d): " fmt, __FILE__, __LINE__, ##args); \ } \ } while (0) -#ifdef VMM_INFO -#define PrintInfo(fmt, args...) \ - do { \ - extern struct v3_os_hooks * os_hooks; \ - if ((os_hooks) && (os_hooks)->print_info) { \ - (os_hooks)->print_info((fmt), ##args); \ - } \ - } while (0) -#else -#define PrintInfo(fmt, args...) -#endif - - -#ifdef VMM_TRACE -#define PrintTrace(fmt, args...) \ - do { \ - extern struct v3_os_hooks * os_hooks; \ - if ((os_hooks) && (os_hooks)->print_trace) { \ - (os_hooks)->print_trace(fmt, ##args); \ - } \ - } while (0) -#else -#define PrintTrace(fmt, args...) -#endif - - #define V3_AllocPages(num_pages) \ ({ \ extern struct v3_os_hooks * os_hooks; \ @@ -229,11 +206,7 @@ struct guest_info; /* This will contain function pointers that provide OS services */ struct v3_os_hooks { - void (*print_info)(const char * format, ...) - __attribute__ ((format (printf, 1, 2))); - void (*print_debug)(const char * format, ...) - __attribute__ ((format (printf, 1, 2))); - void (*print_trace)(const char * format, ...) + void (*print)(const char * format, ...) __attribute__ ((format (printf, 1, 2))); void *(*allocate_pages)(int numPages);