Re: [PATCH] Use global TLB flushes in MTRR code

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Andi Kleen <andi@...>
Cc: <davej@...>, <tglx@...>, <linux-kernel@...>, H. Peter Anvin <hpa@...>
Date: Thursday, February 7, 2008 - 3:13 pm

* Andi Kleen <andi@firstfloor.org> wrote:


no, your patch is not needed:


read the complete code:

        /*  Save value of CR4 and clear Page Global Enable (bit 7)  */
        if ( cpu_has_pge ) {
                cr4 = read_cr4();
                write_cr4(cr4 & ~X86_CR4_PGE);
        }

        /* Flush all TLBs via a mov %cr3, %reg; mov %reg, %cr3 */
        __flush_tlb();

first first turn off PGE and do a cr3 flush - that gets rid of all TLBs.

but even if it didnt get rid of it, the mirror image function, 
post_set(), we turn PGE back on in the cr4 _after_ we've flushed the 
TLBs via the cr3 - that will flush all TLBs again.

	Ingo
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] Use global TLB flushes in MTRR code, Andi Kleen, (Thu Feb 7, 3:02 pm)
Re: [PATCH] Use global TLB flushes in MTRR code, Ingo Molnar, (Thu Feb 7, 3:13 pm)
Re: [PATCH] Use global TLB flushes in MTRR code, Andi Kleen, (Thu Feb 7, 4:03 pm)
Re: [PATCH] Use global TLB flushes in MTRR code, Ingo Molnar, (Thu Feb 7, 4:37 pm)
Re: [PATCH] Use global TLB flushes in MTRR code, Andi Kleen, (Fri Feb 8, 7:44 am)
Re: [PATCH] Use global TLB flushes in MTRR code, Ingo Molnar, (Sat Feb 9, 5:40 am)
Re: [PATCH] Use global TLB flushes in MTRR code, Andi Kleen, (Sat Feb 9, 7:48 am)
Re: [PATCH] Use global TLB flushes in MTRR code, Ingo Molnar, (Sat Feb 9, 7:47 am)
Re: [PATCH] Use global TLB flushes in MTRR code, Andi Kleen, (Sat Feb 9, 10:12 am)
Re: [PATCH] Use global TLB flushes in MTRR code, Oliver Pinter, (Thu Feb 7, 3:08 pm)