Re: [PATCH v2 09/20] KVM: s390: KVM page table management functions: clear and replace

Heiko Carstens
2025-09-16T17:27:24Z

On Tue, Sep 16, 2025 at 07:04:10PM +0200, Claudio Imbrenda wrote:
> On Tue, 16 Sep 2025 18:47:31 +0200
> Heiko Carstens <hca@linux.ibm.com> wrote:
> > > +bool dat_crstep_xchg_atomic(union crste *crstep, union crste old, union crste new, gfn_t gfn,
> > > + union asce asce)
> > > +{
> > > + if (old.h.i)
> > > + return arch_try_cmpxchg((long *)crstep, &old.val, new.val);
> > > + if (cpu_has_edat2())
> > > + return crdte_crste(crstep, old, new, gfn, asce);
> > > + if (cpu_has_idte())
> > > + return cspg_crste(crstep, old, new);
> >
> > FWIW, CSPG is present if EDAT1 is installed. So this should be
> > cpu_has_edat1() instead, I would guess.
>
> no, CSPG is present with the DAT-Enhancement facility (z990), which also
> brings IDTE. EDAT1 is more modern (z10)

Right you are. The PoP says "DAT-Enhancement facility 1", which
translatedto me to EDAT-1, but that is of course something completely
different. Sorry for the noise.