Re: [PATCH] x86, add hypervisor name to dump_stack()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Prarit Bhargava <prarit@xxxxxxxxxx> wrote:

> 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@xxxxxxxxxx>
> Cc: Avi Kivity <avi@xxxxxxxxxx>
> Cc: Gleb Natapov <gleb@xxxxxxxxxx>
> Cc: Alex Williamson <alex.williamson@xxxxxxxxxx>
> Cc: Marcelo Tostatti <mtosatti@xxxxxxxxxx>
> Cc: Ingo Molnar <mingo@xxxxxxxxxx>
> Cc: kvm@xxxxxxxxxxxxxxx
> Cc: x86@xxxxxxxxxx
> ---
>  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);

Looks useful, but please don't waste a full new line on it but 
embedd it in the already existing status line that prints 
details like release and version.

Thanks,

	Ingo
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux