[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2] configure: enable --s390-pgste linker option
From: |
Christian Borntraeger |
Subject: |
Re: [Qemu-devel] [PATCH v2] configure: enable --s390-pgste linker option |
Date: |
Wed, 23 Aug 2017 11:05:59 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 |
On 08/23/2017 10:39 AM, Cornelia Huck wrote:
> 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.
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.
So unless there are complains, I will provide a v3 with the typo fixed.
Christian