public inbox for linux-s390@vger.kernel.org
 help / color / mirror / Atom feed
From: Heiko Carstens <hca@linux.ibm.com>
To: Claudio Imbrenda <imbrenda@linux.ibm.com>
Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org,
	linux-s390@vger.kernel.org, frankja@linux.ibm.com,
	borntraeger@de.ibm.com, seiden@linux.ibm.com, nsg@linux.ibm.com,
	nrb@linux.ibm.com, david@redhat.com, agordeev@linux.ibm.com,
	svens@linux.ibm.com, gor@linux.ibm.com, schlameuss@linux.ibm.com
Subject: Re: [PATCH v2 4/5] KVM: s390: refactor and split some gmap helpers
Date: Wed, 21 May 2025 18:26:13 +0200	[thread overview]
Message-ID: <20250521162613.11483E44-hca@linux.ibm.com> (raw)
In-Reply-To: <20250520182639.80013-5-imbrenda@linux.ibm.com>

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.

  reply	other threads:[~2025-05-21 16:26 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-20 18:26 [PATCH v2 0/5] KVM: s390: some cleanup and small fixes Claudio Imbrenda
2025-05-20 18:26 ` [PATCH v2 1/5] s390: remove unneeded includes Claudio Imbrenda
2025-05-20 18:26 ` [PATCH v2 2/5] KVM: s390: remove unneeded srcu lock Claudio Imbrenda
2025-05-22 13:07   ` Christoph Schlameuss
2025-05-20 18:26 ` [PATCH v2 3/5] KVM: s390: refactor some functions in priv.c Claudio Imbrenda
2025-05-21 15:52   ` Heiko Carstens
2025-05-27  7:18   ` Nico Boehr
2025-05-27  9:14     ` Claudio Imbrenda
2025-05-20 18:26 ` [PATCH v2 4/5] KVM: s390: refactor and split some gmap helpers Claudio Imbrenda
2025-05-21 16:26   ` Heiko Carstens [this message]
2025-05-26 11:17   ` Janosch Frank
2025-05-26 11:59     ` Heiko Carstens
2025-05-26 13:21     ` Claudio Imbrenda
2025-05-20 18:26 ` [PATCH v2 5/5] KVM: s390: simplify and move pv code Claudio Imbrenda

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250521162613.11483E44-hca@linux.ibm.com \
    --to=hca@linux.ibm.com \
    --cc=agordeev@linux.ibm.com \
    --cc=borntraeger@de.ibm.com \
    --cc=david@redhat.com \
    --cc=frankja@linux.ibm.com \
    --cc=gor@linux.ibm.com \
    --cc=imbrenda@linux.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=nrb@linux.ibm.com \
    --cc=nsg@linux.ibm.com \
    --cc=schlameuss@linux.ibm.com \
    --cc=seiden@linux.ibm.com \
    --cc=svens@linux.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox