1*67043607SCho, Yu-Chen 2*67043607SCho, Yu-Chens390x_ss.add(when: 'CONFIG_KVM', if_true: files( 3*67043607SCho, Yu-Chen 'kvm.c' 4*67043607SCho, Yu-Chen)) 5*67043607SCho, Yu-Chen 6*67043607SCho, Yu-Chen# Newer kernels on s390 check for an S390_PGSTE program header and 7*67043607SCho, Yu-Chen# enable the pgste page table extensions in that case. This makes 8*67043607SCho, Yu-Chen# the vm.allocate_pgste sysctl unnecessary. We enable this program 9*67043607SCho, Yu-Chen# header if 10*67043607SCho, Yu-Chen# - we build on s390x 11*67043607SCho, Yu-Chen# - we build the system emulation for s390x (qemu-system-s390x) 12*67043607SCho, Yu-Chen# - KVM is enabled 13*67043607SCho, Yu-Chen# - the linker supports --s390-pgste 14*67043607SCho, Yu-Chenif host_machine.cpu_family() == 's390x' and cc.has_link_argument('-Wl,--s390-pgste') 15*67043607SCho, Yu-Chen s390x_softmmu_ss.add(when: 'CONFIG_KVM', 16*67043607SCho, Yu-Chen if_true: declare_dependency(link_args: ['-Wl,--s390-pgste'])) 17*67043607SCho, Yu-Chenendif 18