qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2] configure: enable --s390-pgste linker option


From: Cornelia Huck
Subject: Re: [Qemu-devel] [PATCH v2] configure: enable --s390-pgste linker option
Date: Wed, 23 Aug 2017 10:39:18 +0200

On Wed, 23 Aug 2017 10:16:27 +0200
Paolo Bonzini <address@hidden> 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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]