Re: [RFC PATCH 1/5] hugetlb: add hugetlb helpers for soft dirty support

From: Gerald Schaefer
Date: Wed Feb 24 2021 - 11:58:16 EST


On Wed, 24 Feb 2021 17:46:08 +0100
Gerald Schaefer <gerald.schaefer@xxxxxxxxxxxxx> wrote:

[...]
> Then we fundamentally changed the way how we deal with that "hugetlb code
> is treating pmds as ptes" issue. Instead of caring about that in all
> huge_pte_xxx primitives, huge_ptep_get() will now return a nicely faked pte
> for s390, i.e. something that looks like a pte would look like, and not the
> real pmd/pud value. With that, hugetlb code can do all its pte handling on
> that fake pte, and the conversion back to a proper pmd/pud is done in
> set_huge_pte().

BTW, in case anybody is wondering, this conversion from and to pmd for s390
will also care about the soft dirty bit, even though it was not really used
before for hugetlb. So Mikes approach to add the default primitives for s390
should work fine.