Re: [PATCH v2 5/5] KVM: s390: Properly reset zero bit in PGSTE
From: Claudio Imbrenda
Date: Tue May 19 2026 - 07:52:53 EST
On Mon, 18 May 2026 13:44:45 +0200
Christian Borntraeger <borntraeger@xxxxxxxxxx> wrote:
> Am 12.05.26 um 19:52 schrieb Claudio Imbrenda:
> > When calling _gmap_ptep_xchg(), always clear the pgste.zero bit. This
> > prevents the page from being accidentally discarded when getting
> > unmapped.
>
> Ideally have some example in the patch description, that makes review easier.>
will do
> > Signed-off-by: Claudio Imbrenda <imbrenda@xxxxxxxxxxxxx>
>
> Was this broken before the rework as well? Do we need a stable backport into 6.19
> and older?
no, this breakage is a product of the gmap rewrite
>
> > ---
> > arch/s390/kvm/gmap.h | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/arch/s390/kvm/gmap.h b/arch/s390/kvm/gmap.hcd R
> > index e490f2995a26..4de9ed8d58ba 100644
> > --- a/arch/s390/kvm/gmap.h
> > +++ b/arch/s390/kvm/gmap.h
> > @@ -199,6 +199,7 @@ static inline union pgste _gmap_ptep_xchg(struct gmap *gmap, union pte *ptep, un
> > }
> > if (!ptep->s.d && newpte.s.d && !newpte.s.s)
> > SetPageDirty(pfn_to_page(newpte.h.pfra));
> > + pgste.zero = 0;
> > return __dat_ptep_xchg(ptep, pgste, newpte, gfn, gmap->asce, uses_skeys(gmap));
> > }
> >
>