Skip to contentSkip to conversation

cpa: pageattr-test: fix false positive in CPA self test

PATCH New Andrea Arcangeli 2 participants 2 messages Apr 11, 2013 – Apr 14, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cpa: pageattr-test: fix false positive in CPA self test

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

---
 arch/x86/mm/pageattr-test.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/mm/pageattr-test.c +1 -1
index b008656..0e38951 100644
@@ -68,7 +68,7 @@ static int print_split(struct split_state *s)
 			s->gpg++;
 			i += GPS/PAGE_SIZE;
 		} else if (level == PG_LEVEL_2M) {
-			if (!(pte_val(*pte) & _PAGE_PSE)) {
+			if ((pte_val(*pte) & _PAGE_PRESENT) && !(pte_val(*pte) & _PAGE_PSE)) {
 				printk(KERN_ERR
 					"%lx level %d but not PSE %Lx\n",
 					addr, level, (u64)pte_val(*pte));
#1 lore raw

[tip:x86/urgent] x86/mm/cpa/selftest: Fix false positive in CPA self test

x86/mm/cpa/selftest: Fix false positive in CPA self test
Commit-ID:  18699739b60cb60230153ff5475b2ba92be185f9
Gitweb:     http://git.kernel.org/tip/18699739b60cb60230153ff5475b2ba92be185f9
Author:     Andrea Arcangeli <[email protected]>
AuthorDate: Thu, 11 Apr 2013 15:36:09 +0200
Committer:  Ingo Molnar <[email protected]>
CommitDate: Fri, 12 Apr 2013 06:39:20 +0200

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.

---
 arch/x86/mm/pageattr-test.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/mm/pageattr-test.c +1 -1
index b008656..0e38951 100644
@@ -68,7 +68,7 @@ static int print_split(struct split_state *s)
 			s->gpg++;
 			i += GPS/PAGE_SIZE;
 		} else if (level == PG_LEVEL_2M) {
-			if (!(pte_val(*pte) & _PAGE_PSE)) {
+			if ((pte_val(*pte) & _PAGE_PRESENT) && !(pte_val(*pte) & _PAGE_PSE)) {
 				printk(KERN_ERR
 					"%lx level %d but not PSE %Lx\n",
 					addr, level, (u64)pte_val(*pte));