|
@@ -502,6 +502,7 @@ static const char * const action_page_types[] = {
|
|
|
[MF_MSG_POISONED_HUGE] = "huge page already hardware poisoned",
|
|
|
[MF_MSG_HUGE] = "huge page",
|
|
|
[MF_MSG_FREE_HUGE] = "free huge page",
|
|
|
+ [MF_MSG_NON_PMD_HUGE] = "non-pmd-sized huge page",
|
|
|
[MF_MSG_UNMAP_FAILED] = "unmapping failed page",
|
|
|
[MF_MSG_DIRTY_SWAPCACHE] = "dirty swapcache page",
|
|
|
[MF_MSG_CLEAN_SWAPCACHE] = "clean swapcache page",
|
|
@@ -1084,6 +1085,21 @@ static int memory_failure_hugetlb(unsigned long pfn, int flags)
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
+ /*
|
|
|
+ * TODO: hwpoison for pud-sized hugetlb doesn't work right now, so
|
|
|
+ * simply disable it. In order to make it work properly, we need
|
|
|
+ * make sure that:
|
|
|
+ * - conversion of a pud that maps an error hugetlb into hwpoison
|
|
|
+ * entry properly works, and
|
|
|
+ * - other mm code walking over page table is aware of pud-aligned
|
|
|
+ * hwpoison entries.
|
|
|
+ */
|
|
|
+ if (huge_page_size(page_hstate(head)) > PMD_SIZE) {
|
|
|
+ action_result(pfn, MF_MSG_NON_PMD_HUGE, MF_IGNORED);
|
|
|
+ res = -EBUSY;
|
|
|
+ goto out;
|
|
|
+ }
|
|
|
+
|
|
|
if (!hwpoison_user_mappings(p, pfn, flags, &head)) {
|
|
|
action_result(pfn, MF_MSG_UNMAP_FAILED, MF_IGNORED);
|
|
|
res = -EBUSY;
|