qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Cornelia Huck <cohuck@redhat.com>
To: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	Thomas Huth <thuth@redhat.com>,
	David Hildenbrand <david@redhat.com>,
	Janosch Frank <frankja@linux.vnet.ibm.com>,
	Dan Horak <dhorak@redhat.com>, qemu-devel <qemu-devel@nongnu.org>,
	Christian Ehrhardt <christian.ehrhardt@canonical.com>,
	Alexander Graf <agraf@suse.de>
Subject: Re: [Qemu-devel] [PATCH v2] configure: enable --s390-pgste linker option
Date: Wed, 23 Aug 2017 11:13:58 +0200	[thread overview]
Message-ID: <20170823111358.6d12cd7b.cohuck@redhat.com> (raw)
In-Reply-To: <2e1e1593-9135-7328-5b75-04e4714a3eed@de.ibm.com>

On Wed, 23 Aug 2017 11:05:59 +0200
Christian Borntraeger <borntraeger@de.ibm.com> wrote:

> On 08/23/2017 10:39 AM, Cornelia Huck wrote:
> > On Wed, 23 Aug 2017 10:16:27 +0200
> > Paolo Bonzini <pbonzini@redhat.com> wrote:
> >   
> >> On 23/08/2017 10:06, Thomas Huth wrote:  
> >>> On 23.08.2017 10:00, David Hildenbrand wrote:    
> >>>> On 23.08.2017 08:53, Christian Borntraeger wrote:    
> >   
> >>>>> @@ -6522,6 +6527,20 @@ if test "$target_linux_user" = "yes" -o "$target_bsd_user" = "yes" ; then
> >>>>>    ldflags="$ldflags $textseg_ldflags"
> >>>>>  fi
> >>>>>  
> >>>>> +# Newer kernels on s390 check for an S390_PGSTE program header and
> >>>>> +# enable the pgste page table extensions in that case. This makes
> >>>>> +# the vm.allocate_pgste sysctl unnecessary. We enable this program
> >>>>> +# header if
> >>>>> +#  - we build on s390x
> >>>>> +#  - we build the system emulation for s390x (qemu-system-s390x)
> >>>>> +#  - KVM is enabled
> >>>>> +#  - the linker support --s390-pgste
> >>>>> +if test "$TARGET_ARCH" = "s390x" -a "$target_softmmu" = "yes"  -a "$ARCH" = "s390x" -a "$kvm" = "yes"; then    
> >>>>
> >>>> Wonder if the "$ARCH" check is really necessary: TARGET_ARCH=s390x with
> >>>> kvm=yes should only build on s390x.    
> >>>
> >>> Isn't kvm=yes and TARGET_ARCH=s390x also possible on a x86 host, where
> >>> only the x86_64 target is built with CONFIG_KVM=y, but the s390x target
> >>> with CONFIG_KVM=n ?    
> >>
> >> Yes.  You could use
> >>
> >>   if test "$ARCH" = "s390x" && supported_kvm_target $target; then
> >>     ...
> >>   fi
> >>
> >> Or, in the existing "if supported_kvm_target $target" conditional, add
> >>
> >>   if test "$ARCH" = s390x && ld_has --s390-pgste; then
> >>     ...
> >>   fi  
> > 
> > That conditional is unfortunately before the setup of ldflags; but I
> > like the idea of using supported_kvm_target.  
> 
> This is now bike-shedding, no? :-)
> I think I prefer to write out the the single statements as is.
> I would need to test for supported_kvm_target AND s390 anyway, to prevent
> checking ld on x86 as well.

I prefer the shorter variant, but I don't mind the exploded one either.

> 
> So unless there are complains, I will provide a v3 with the typo fixed.

Fine with me as well.

      reply	other threads:[~2017-08-23  9:14 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-23  6:53 [Qemu-devel] [PATCH v2] configure: enable --s390-pgste linker option Christian Borntraeger
2017-08-23  6:55 ` Christian Borntraeger
2017-08-23  7:38   ` Thomas Huth
2017-08-23  7:28 ` Christian Ehrhardt
2017-08-23  8:48   ` Christian Borntraeger
2017-08-23  8:00 ` David Hildenbrand
2017-08-23  8:06   ` Thomas Huth
2017-08-23  8:16     ` Paolo Bonzini
2017-08-23  8:39       ` Cornelia Huck
2017-08-23  9:05         ` Christian Borntraeger
2017-08-23  9:13           ` Cornelia Huck [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=20170823111358.6d12cd7b.cohuck@redhat.com \
    --to=cohuck@redhat.com \
    --cc=agraf@suse.de \
    --cc=borntraeger@de.ibm.com \
    --cc=christian.ehrhardt@canonical.com \
    --cc=david@redhat.com \
    --cc=dhorak@redhat.com \
    --cc=frankja@linux.vnet.ibm.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@redhat.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;
as well as URLs for NNTP newsgroup(s).