• S
    x86, cpa: srlz cpa(), global flush tlb after splitting big page and before doing cpa · ad5ca55f
    Suresh Siddha 提交于
    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: NSuresh 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: NIngo Molnar <mingo@elte.hu>
    ad5ca55f
pageattr.c 27.0 KB