X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=linux_module%2Fpalacios-stubs.c;h=92b3767a303e9e05bc693b0e1f74b3ffcbdd1a77;hb=700ce14388ea852b7599b73b0d5a9f94fd873045;hp=5bf69a1ee54557eff2cccdc4810c86ee95b030ed;hpb=3f777ee2e04c359758b0658b04ff8f076d38f2f9;p=palacios.git diff --git a/linux_module/palacios-stubs.c b/linux_module/palacios-stubs.c index 5bf69a1..92b3767 100644 --- a/linux_module/palacios-stubs.c +++ b/linux_module/palacios-stubs.c @@ -87,7 +87,7 @@ static int init_print_buffers(void) /** * Prints a message to the console. */ -void palacios_print(const char *fmt, ...) { +void palacios_print_scoped(void * vm, int vcore, const char *fmt, ...) { #if V3_PRINTK_OLD_STYLE_OUTPUT @@ -104,6 +104,7 @@ void palacios_print(const char *fmt, ...) { va_list ap; char *buf; unsigned int cpu = palacios_get_cpu(); + struct v3_guest *guest = (struct v3_guest *)vm; buf = print_buffer[cpu]; @@ -132,8 +133,25 @@ void palacios_print(const char *fmt, ...) { } #endif - printk(KERN_INFO "palacios (pcore %u): %s",cpu,buf); - + if (guest) { + if (vcore>=0) { + printk(KERN_INFO "palacios (pcore %u vm %s vcore %u): %s", + cpu, + guest->name, + vcore, + buf); + } else { + printk(KERN_INFO "palacios (pcore %u vm %s): %s", + cpu, + guest->name, + buf); + } + } else { + printk(KERN_INFO "palacios (pcore %u): %s", + cpu, + buf); + } + return; #endif @@ -141,7 +159,6 @@ void palacios_print(const char *fmt, ...) { } - /* * Allocates a contiguous region of pages of the requested size. * Returns the physical address of the first page in the region. @@ -663,7 +680,7 @@ palacios_mutex_unlock_irqrestore(void *mutex, void *flags) * Structure used by the Palacios hypervisor to interface with the host kernel. */ static struct v3_os_hooks palacios_os_hooks = { - .print = palacios_print, + .print = palacios_print_scoped, .allocate_pages = palacios_allocate_pages, .free_pages = palacios_free_pages, .malloc = palacios_alloc,