On 24.05.19 12:33, Christian Borntraeger wrote: > To avoid testcase failures we need to enable the pgstes. This can be > done with /proc/sys/vm/allocate_pgste or with a linker option that > creates an S390_PGSTE program header. > > Signed-off-by: Christian Borntraeger <borntraeger@xxxxxxxxxx> > --- > tools/testing/selftests/kvm/Makefile | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/tools/testing/selftests/kvm/Makefile b/tools/testing/selftests/kvm/Makefile > index aef5bd1166cf..4aac14c1919f 100644 > --- a/tools/testing/selftests/kvm/Makefile > +++ b/tools/testing/selftests/kvm/Makefile > @@ -44,7 +44,10 @@ CFLAGS += -O2 -g -std=gnu99 -fno-stack-protector -fno-PIE -I$(LINUX_TOOL_INCLUDE > no-pie-option := $(call try-run, echo 'int main() { return 0; }' | \ > $(CC) -Werror $(KBUILD_CPPFLAGS) $(CC_OPTION_CFLAGS) -no-pie -x c - -o "$$TMP", -no-pie) > > -LDFLAGS += -pthread $(no-pie-option) > +# On s390, build the testcases KVM-enabled > +pgste-option := $(call cc-ldoption, -Wl$(comma)--s390-pgste) > + > +LDFLAGS += -pthread $(no-pie-option) $(pgste-option) > > # After inclusion, $(OUTPUT) is defined and > # $(TEST_GEN_PROGS) starts with $(OUTPUT)/ > After commit commit 055efab3120bae7ab1ed841317774f3c953f6e1b (kbuild: drop support for cc-ldoption) I had to change that in the following way. diff --git a/tools/testing/selftests/kvm/Makefile b/tools/testing/selftests/kvm/Makefile index 2a73b58fd9e0..a798ea54a434 100644 --- a/tools/testing/selftests/kvm/Makefile +++ b/tools/testing/selftests/kvm/Makefile @@ -48,7 +48,7 @@ no-pie-option := $(call try-run, echo 'int main() { return 0; }' | \ $(CC) -Werror $(KBUILD_CPPFLAGS) $(CC_OPTION_CFLAGS) -no-pie -x c - -o "$$TMP", -no-pie) # On s390, build the testcases KVM-enabled -pgste-option := $(call cc-ldoption, -Wl$(comma)--s390-pgste) +pgste-option := $(call cc-option,-Wl$(comma)--s390-pgste) LDFLAGS += -pthread $(no-pie-option) $(pgste-option) With that pushed out to kvms390/next.