[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250521162613.11483E44-hca@linux.ibm.com>
Date: Wed, 21 May 2025 18:26:13 +0200
From: Heiko Carstens <hca@...ux.ibm.com>
To: Claudio Imbrenda <imbrenda@...ux.ibm.com>
Cc: linux-kernel@...r.kernel.org, kvm@...r.kernel.org,
linux-s390@...r.kernel.org, frankja@...ux.ibm.com,
borntraeger@...ibm.com, seiden@...ux.ibm.com, nsg@...ux.ibm.com,
nrb@...ux.ibm.com, david@...hat.com, agordeev@...ux.ibm.com,
svens@...ux.ibm.com, gor@...ux.ibm.com, schlameuss@...ux.ibm.com
Subject: Re: [PATCH v2 4/5] KVM: s390: refactor and split some gmap helpers
On Tue, May 20, 2025 at 08:26:38PM +0200, Claudio Imbrenda wrote:
> +void __gmap_helper_set_unused(struct mm_struct *mm, unsigned long vmaddr)
> +{
> + spinlock_t *ptl;
> + pmd_t *pmdp;
> + pte_t *ptep;
> +
> + mmap_assert_locked(mm);
> +
> + if (pmd_lookup(mm, vmaddr, &pmdp))
> + return;
> + ptl = pmd_lock(mm, pmdp);
> + if (!pmd_present(*pmdp) || pmd_leaf(*pmdp)) {
> + spin_unlock(ptl);
> + return;
> + }
> + spin_unlock(ptl);
> +
> + ptep = pte_offset_map_lock(mm, pmdp, vmaddr, &ptl);
> + if (!ptep)
> + return;
> + /* The last byte of a pte can be changed freely without ipte */
> + __atomic64_or(_PAGE_UNUSED, (long *)ptep);
> + pte_unmap_unlock(ptep, ptl);
> +}
> +EXPORT_SYMBOL_GPL(__gmap_helper_set_unused);
This is unused, as far as I can tell. I'm not sure if it is a good approach to
do all this code movements / refactorings now. Especially if you also add
(now?) dead code. I guess that e.g. this function is required for your rework
that will come later?
Imho this series causes quite a bit confusion and is not about "cleanups and
small fixes" like advertised.
Powered by blists - more mailing lists