x86/mm/cpa/selftest: Fix false positive in CPA self test

If the pmd is not present, _PAGE_PSE will not be set anymore.
Fix the false positive.

Reported-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>
Cc: Stefan Bader <stefan.bader@canonical.com>
Cc: Andy Whitcroft <apw@canonical.com>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Borislav Petkov <bp@alien8.de>
Link: http://lkml.kernel.org/r/1365687369-30802-1-git-send-email-aarcange@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>

authored by Andrea Arcangeli and committed by Ingo Molnar 18699739 f76cfa3c

Changed files
+1 -1
arch
+1 -1
arch/x86/mm/pageattr-test.c
··· 68 68 s->gpg++; 69 69 i += GPS/PAGE_SIZE; 70 70 } else if (level == PG_LEVEL_2M) { 71 - if (!(pte_val(*pte) & _PAGE_PSE)) { 71 + if ((pte_val(*pte) & _PAGE_PRESENT) && !(pte_val(*pte) & _PAGE_PSE)) { 72 72 printk(KERN_ERR 73 73 "%lx level %d but not PSE %Lx\n", 74 74 addr, level, (u64)pte_val(*pte));