Re: [PATCH v2 4/6] s390/mm: Make PTC and UV call order consistent
From: Alexander Gordeev
Date: Fri Apr 24 2026 - 07:36:24 EST
On Thu, Apr 23, 2026 at 12:54:09PM +0200, Heiko Carstens wrote:
> On Wed, Apr 15, 2026 at 05:01:22PM +0200, Alexander Gordeev wrote:
> > In various code paths, page_table_check_pte_clear() is called
> > before converting a secure page, while in others it is called
> > after. Make this consistent and always perform the conversion
> > after the PTC hook has been called. Also make all conversion‑
> > eligibility condition checks look the same, and rework the one
> > in ptep_get_and_clear_full() slightly.
> >
> > Acked-by: Claudio Imbrenda <imbrenda@xxxxxxxxxxxxx>
> > Signed-off-by: Alexander Gordeev <agordeev@xxxxxxxxxxxxx>
> > ---
> > arch/s390/include/asm/pgtable.h | 39 +++++++++++++++------------------
> > 1 file changed, 18 insertions(+), 21 deletions(-)
>
> Why is this required for this series? It is anything but obvious to
> me. If it is required please add some reasoning e.g. in the cover
> letter or to the above changelog.
This is because changes to ptep_get_and_clear() and ptep_clear_flush()
look much more clean with this patch. Otherwise, I would have to move
page_table_check_pte_clear() before the UV check, which is strictly
speaking worth a separate patch - this patch.
It also makes sense as a cleanup. I would prefer to see it as part of
the PTC series, but at the time I did not realize it was worthwhile.