• Dave Hansen's avatar
    x86/mm: Ignore A/D bits in pte/pmd/pud_none() · 97e3c602
    Dave Hansen authored
    The erratum we are fixing here can lead to stray setting of the
    A and D bits.  That means that a pte that we cleared might
    suddenly have A/D set.  So, stop considering those bits when
    determining if a pte is pte_none().  The same goes for the
    other pmd_none() and pud_none().  pgd_none() can be skipped
    because it is not affected; we do not use PGD entries for
    anything other than pagetables on affected configurations.
    
    This adds a tiny amount of overhead to all pte_none() checks.
    I doubt we'll be able to measure it anywhere.
    Signed-off-by: default avatarDave Hansen <dave.hansen@linux.intel.com>
    Cc: Andrew Morton <akpm@linux-foundation.org>
    Cc: Andy Lutomirski <luto@kernel.org>
    Cc: Borislav Petkov <bp@alien8.de>
    Cc: Brian Gerst <brgerst@gmail.com>
    Cc: Dave Hansen <dave@sr71.net>
    Cc: Denys Vlasenko <dvlasenk@redhat.com>
    Cc: H. Peter Anvin <hpa@zytor.com>
    Cc: Josh Poimboeuf <jpoimboe@redhat.com>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Luis R. Rodriguez <mcgrof@suse.com>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Cc: Toshi Kani <toshi.kani@hp.com>
    Cc: dave.hansen@intel.com
    Cc: linux-mm@kvack.org
    Cc: mhocko@suse.com
    Link: http://lkml.kernel.org/r/20160708001912.5216F89C@viggo.jf.intel.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
    97e3c602
pgtable.h 22.9 KB