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] [day] [month] [year] [list]
Date:	Sat, 14 Aug 2010 09:21:08 -0700
From:	Alok Kataria <akataria@...are.com>
To:	Sven Joachim <svenjoac@....de>
CC:	Greg KH <gregkh@...e.de>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"stable@...nel.org" <stable@...nel.org>,
	"stable-review@...nel.org" <stable-review@...nel.org>,
	"torvalds@...ux-foundation.org" <torvalds@...ux-foundation.org>,
	"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
	"alan@...rguk.ukuu.org.uk" <alan@...rguk.ukuu.org.uk>,
	"H. Peter Anvin" <hpa@...ux.intel.com>
Subject: Re: [01/54] x86, vmware: Preset lpj values when on VMware.



On Aug 14, 2010, at 5:22 AM, "Sven Joachim" <svenjoac@....de> wrote:

> On 2010-08-12 02:00 +0200, Greg KH wrote:
> 
>> 2.6.34-stable review patch.  If anyone has any objections, please let us know.
> 
> Sorry for being a bit late -- I didn't get around to build 2.6.34.4-rc1
> in time. :-(
> 
>> From: Alok Kataria <akataria@...are.com>
>> 
>> commit 9f242dc10e0c3c1eb32d8c83c18650a35fd7f80d upstream.
>> 
>> When running on VMware's platform, we have seen situations where
>> the AP's try to calibrate the lpj values and fail to get good calibration
>> runs becasue of timing issues. As a result delays don't work correctly
>> on all cpus.
>> 
>> The solutions is to set preset_lpj value based on the current tsc frequency
>> value. This is similar to what KVM does as well.
>> 
>> Signed-off-by: Alok N Kataria <akataria@...are.com>
>> LKML-Reference: <1280790637.14933.29.camel@...32.eng.vmware.com>
>> Signed-off-by: H. Peter Anvin <hpa@...ux.intel.com>
>> Signed-off-by: Greg Kroah-Hartman <gregkh@...e.de>
>> 
>> ---
>> arch/x86/kernel/cpu/vmware.c |    9 ++++++++-
>> 1 file changed, 8 insertions(+), 1 deletion(-)
>> 
>> --- a/arch/x86/kernel/cpu/vmware.c
>> +++ b/arch/x86/kernel/cpu/vmware.c
>> @@ -51,7 +51,7 @@ static inline int __vmware_platform(void
>> 
>> static unsigned long vmware_get_tsc_khz(void)
>> {
>> -    uint64_t tsc_hz;
>> +    uint64_t tsc_hz, lpj;
>>    uint32_t eax, ebx, ecx, edx;
>> 
>>    VMWARE_PORT(GETHZ, eax, ebx, ecx, edx);
>> @@ -62,6 +62,13 @@ static unsigned long vmware_get_tsc_khz(
>>    printk(KERN_INFO "TSC freq read from hypervisor : %lu.%03lu MHz\n",
>>             (unsigned long) tsc_hz / 1000,
>>             (unsigned long) tsc_hz % 1000);
>> +
>> +    if (!preset_lpj) {
>> +        lpj = ((u64)tsc_hz * 1000);
>> +        do_div(lpj, HZ);
> 
> This led to a build failure for me because HZ is not defined in the
> attached configuration.  Note that this problem did not show up in
> 2.6.35.2 with a very similar .config file.

You might want to include jiffies.h in this file.
Can you please check if this is needed for 2.6.33-stable too ? AFAIK 2.6.32 already has it.

Thanks,
Alok
> 
>> +        preset_lpj = lpj;
>> +    }
>> +
>>    return tsc_hz;
>> }
> 
> Regards,
>        Sven
> 
> 
> <ATT05198.config>
--
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