[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Wed, 10 Oct 2012 10:27:48 -0400
From: Prarit Bhargava <prarit@...hat.com>
To: linux-kernel@...r.kernel.org
Cc: Prarit Bhargava <prarit@...hat.com>, Avi Kivity <avi@...hat.com>,
Gleb Natapov <gleb@...hat.com>,
Alex Williamson <alex.williamson@...hat.com>,
Marcelo Tostatti <mtosatti@...hat.com>,
Ingo Molnar <mingo@...hat.com>, kvm@...r.kernel.org,
x86@...nel.org
Subject: [PATCH] x86, add hypervisor name to dump_stack()
Debugging crash, panics, stack trace WARN_ONs, etc., from both virtual and
bare-metal boots can get difficult very quickly. While there are ways to
decipher the output and determine if the output is from a virtual guest,
the in-kernel hypervisors now have a single registration point and set
x86_hyper. We can use this to output a single extra line on virtual
machines that indicates the hypervisor type.
Signed-off-by: Prarit Bhargava <prarit@...hat.com>
Cc: Avi Kivity <avi@...hat.com>
Cc: Gleb Natapov <gleb@...hat.com>
Cc: Alex Williamson <alex.williamson@...hat.com>
Cc: Marcelo Tostatti <mtosatti@...hat.com>
Cc: Ingo Molnar <mingo@...hat.com>
Cc: kvm@...r.kernel.org
Cc: x86@...nel.org
---
arch/x86/kernel/dumpstack.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/x86/kernel/dumpstack.c b/arch/x86/kernel/dumpstack.c
index ae42418b..75a635e 100644
--- a/arch/x86/kernel/dumpstack.c
+++ b/arch/x86/kernel/dumpstack.c
@@ -17,6 +17,7 @@
#include <linux/sysfs.h>
#include <asm/stacktrace.h>
+#include <asm/hypervisor.h>
int panic_on_unrecovered_nmi;
@@ -193,6 +194,8 @@ void dump_stack(void)
init_utsname()->release,
(int)strcspn(init_utsname()->version, " "),
init_utsname()->version);
+ if (x86_hyper && x86_hyper->name)
+ printk("Hypervisor: %s\n", x86_hyper->name);
show_trace(NULL, NULL, &stack, bp);
}
EXPORT_SYMBOL(dump_stack);
--
1.7.9.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists