Re: [PATCH] x86: Quark: Switch of CR4.PGE TLB flush use CR3 instead

Bryan O'Donoghue
2014-09-24T10:15:46Z

On 24/09/14 08:12, Ingo Molnar wrote:
>
> * Bryan O'Donoghue <pure.logic@nexus-software.ie> wrote:
>
>> Quark x1000 advertises PGE via the standard CPUID method
>> PGE bits exist in Quark X1000's PTEs. In order to flush
>> an individual PTE it is necessary to reload CR3 irrespective
>> of the PTE.PGE bit.
>>
>> See Quark Core_DevMan_001.pdf section 6.4.11
>>
> How was this bug found?
>
> I'm wondering, how was Linux ever booted on an Intel Quark CPU
> successfully if PGE does not work as advertised? Getting TLB
> flushes wrong is a surefire way to crash the kernel. Was any
> related instability observed?
>
> Thanks,
>
> Ingo

Hi Ingo.

Resending this email...

The received wisdom from the silicon people prior to launch meant it was
never a problem for the Quark/Galileo BSP.

In the reference BSP code for Galileo, which I was involved in making,
this fix is already in place. So pretty much everybody running Linux on
Quark is doing it with the modified 3.8.7 kernel shipping with the
Galileo BSP.

So far there's no related instability - since we've never really run any
torture tests with the wrong TLB flush method in-place.

To get properly Quark X1000 support out-of-the-box in Vanilla Linux
though the TLB flush will need to change.

Best,
Bryan