lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090904074938.GE20598@elte.hu>
Date:	Fri, 4 Sep 2009 09:49:38 +0200
From:	Ingo Molnar <mingo@...e.hu>
To:	Alok Kataria <akataria@...are.com>,
	Thomas Gleixner <tglx@...utronix.de>
Cc:	the arch/x86 maintainers <x86@...nel.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH: x86] Print the hypervisor returned tsc_khz during boot.


* Alok Kataria <akataria@...are.com> wrote:

> On an AMD-64 system the processor frequency that is printed during 
> system boot, may be different than the tsc frequency that was 
> returned by the hypervisor, due to value returned from 
> calibrate_cpu. For debugging timekeeping or other related issues 
> it might be better to get the tsc_khz value returned by the 
> hypervisor.
> 
> The patch below now prints the tsc frequency that the hypervisor 
> returned. Please consider for tip.
> 
> --
> Signed-off-by: Alok N Kataria <akataria@...are.com>
> 
> Index: linux-tip-master/arch/x86/kernel/tsc.c
> ===================================================================
> --- linux-tip-master.orig/arch/x86/kernel/tsc.c	2009-08-23 17:53:44.000000000 -0700
> +++ linux-tip-master/arch/x86/kernel/tsc.c	2009-08-23 17:55:08.000000000 -0700
> @@ -405,7 +405,10 @@ unsigned long native_calibrate_tsc(void)
>  
>  	hv_tsc_khz = get_hypervisor_tsc_freq();
>  	if (hv_tsc_khz) {
> -		printk(KERN_INFO "TSC: Frequency read from the hypervisor\n");
> +		printk(KERN_INFO "TSC: Frequency read from the hypervisor : "
> +				"%lu.%03lu MHz\n",
> +				(unsigned long) hv_tsc_khz / 1000,
> +				(unsigned long) hv_tsc_khz % 1000);
>  		return hv_tsc_khz;
>  	}

Makes sense. Note, arch/x86/kernel/tsc.c changed recently so this 
patch does not apply anymore - mind merging it on top of that and 
re-send it?

Thanks,

	Ingo
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ