]> git.baikalelectronics.ru Git - kernel.git/commit
x86, cpa: srlz cpa(), global flush tlb after splitting big page and before doing cpa
authorSuresh Siddha <suresh.b.siddha@intel.com>
Tue, 23 Sep 2008 21:00:42 +0000 (14:00 -0700)
committerIngo Molnar <mingo@elte.hu>
Fri, 10 Oct 2008 17:29:17 +0000 (19:29 +0200)
commitbfe20d33554c2fa47cb8b29e66d5c958f03611a2
tree20ab9e06e840c939da21f6cd352cc5700c9bc9da
parentcea8449c1a0cc4312ff74a736c88d09a3b83571c
x86, cpa: srlz cpa(), global flush tlb after splitting big page and before doing cpa

Do a global flush tlb after splitting the large page and before we do the
actual change page attribute in the PTE.

With out this, we violate the TLB application note, which says
    "The TLBs may contain both ordinary and large-page translations for
     a 4-KByte range of linear addresses. This may occur if software
     modifies the paging structures so that the page size used for the
     address range changes. If the two translations differ with respect
     to page frame or attributes (e.g., permissions), processor behavior
     is undefined and may be implementation-specific."

And also serialize cpa() (for !DEBUG_PAGEALLOC which uses large identity
mappings) using cpa_lock. So that we don't allow any other cpu, with stale
large tlb entries change the page attribute in parallel to some other cpu
splitting a large page entry along with changing the attribute.

Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: arjan@linux.intel.com
Cc: venkatesh.pallipadi@intel.com
Cc: jeremy@goop.org
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/mm/pageattr.c