[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4DD3414B.2020602@zytor.com>
Date: Tue, 17 May 2011 20:47:23 -0700
From: "H. Peter Anvin" <hpa@...or.com>
To: Andi Kleen <andi@...stfloor.org>
CC: Fenghua Yu <fenghua.yu@...el.com>, Ingo Molnar <mingo@...e.hu>,
Thomas Gleixner <tglx@...utronix.de>,
Asit K Mallick <asit.k.mallick@...el.com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Avi Kivity <avi@...hat.com>,
Arjan van de Ven <arjan@...radead.org>,
Andrew Morton <akpm@...ux-foundation.org>,
linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/9] x86/kernel/cpu/intel.c: Initialize Enhanced REP MOVSB/STOSBenhanced
On 05/17/2011 07:46 PM, Andi Kleen wrote:
>> From: Fenghua Yu <fenghua.yu@...el.com>
>>
>> If kernel intends to use enhanced REP MOVSB/STOSB, it must ensure
>> IA32_MISC_ENABLE.Fast_String_Enable (bit 0) is set and CPUID.(EAX=07H,
>> ECX=0H):
>> EBX[bit 9] also reports 1.
>
> I suspect the check at this place is not too useful because it will
> only work for the BSP. For all others it's too late -- the patching
> has already happened.
>
> So either this is a problem and then it should be checked on all CPUs.
> Or maybe not at all.
>
> The problem is that the alternative patching currently relies on being
> run early with no other CPUs. It has no race protections, support
> for cross modification etc.
>
> While it would be possible to fix that it would be quite complicated
> I bet.
>
> So I think it's better to just remove it unless it's a real problem
> in the field.
>
The reason for having it is that if the BIOS has a chicken switch that
disables FAST_STRING (and it's the BIOS' responsibility to do it on all
CPUs) then this will make the kernel honor this.
-hpa
--
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