All of lore.kernel.org
 help / color / mirror / Atom feed
From: Claudio Imbrenda <imbrenda@linux.ibm.com>
To: Matthew Rosato <mjrosato@linux.ibm.com>
Cc: qemu-devel@nongnu.org, qemu-s390x@nongnu.org,
	borntraeger@de.ibm.com, frankja@linux.ibm.com,
	pasic@linux.ibm.com, mhartmay@linux.ibm.com, david@kernel.org,
	farman@linux.ibm.com, richard.henderson@linaro.org,
	iii@linux.ibm.com, cohuck@redhat.com
Subject: Re: [PATCH v2 1/1] target/s390x: Allow 2G hugepages guest backing
Date: Thu, 30 Jul 2026 14:20:01 +0200	[thread overview]
Message-ID: <20260730142001.760e057c@p-imbrenda> (raw)
In-Reply-To: <d186d6e1-a820-490e-b616-2ac521d3a20e@linux.ibm.com>

On Wed, 29 Jul 2026 13:53:01 -0400
Matthew Rosato <mjrosato@linux.ibm.com> wrote:

> > -        if (kvm_enabled() && kvm_s390_get_hpage_1m()) {
> > +        if (kvm_enabled() && kvm_s390_get_hpage()) {  
> 
> ...
> 
> >  
> > -    cap_hpage_1m = 1;
> > +int kvm_s390_get_hpage(void)
> > +{
> > +    return cap_hpage;
> >  }
> >  
> >  int kvm_s390_get_hpage_1m(void)
> >  {
> > -    return cap_hpage_1m;
> > +    return cap_hpage == 1;
> > +}
> > +
> > +int kvm_s390_get_hpage_2g(void)
> > +{
> > +    return cap_hpage == 2;
> >  }  
> 
> Hey Claudio,
> 
> Thanks for changing things to differentiate between 1m and 2g for the cap.
> 
> Overall LGTM but this patch now makes kvm_s390_get_hpage_1m() dead code
> (not referenced anywhere) as well as introduces a new function
> kvm_s390_get_hpage_2g() that is also unused.
> 
> Since this patch is by itself, why not just remove the functions
> until/if they are needed and only provide kvm_s390_get_hpage()?
> 
> Do you have planned future patches that you are confident will soon make
> use of these get_hpage_1m() and get_hpage_2g() helpers?

yes, which is why I put them there :)

but I understand that dead code is annoying, if you want I can simply
respin without the unused functions, and introduce them later when they
are actually needed.

> 
> Thanks,
> Matt
> 
> 
> 



      reply	other threads:[~2026-07-30 12:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-29 16:30 [PATCH v2 0/1] target/s390x: Allow 2G hugepages guest backing Claudio Imbrenda
2026-07-29 16:30 ` [PATCH v2 1/1] " Claudio Imbrenda
2026-07-29 17:53   ` Matthew Rosato
2026-07-30 12:20     ` Claudio Imbrenda [this message]

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=20260730142001.760e057c@p-imbrenda \
    --to=imbrenda@linux.ibm.com \
    --cc=borntraeger@de.ibm.com \
    --cc=cohuck@redhat.com \
    --cc=david@kernel.org \
    --cc=farman@linux.ibm.com \
    --cc=frankja@linux.ibm.com \
    --cc=iii@linux.ibm.com \
    --cc=mhartmay@linux.ibm.com \
    --cc=mjrosato@linux.ibm.com \
    --cc=pasic@linux.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-s390x@nongnu.org \
    --cc=richard.henderson@linaro.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.