167043607SCho, Yu-Chen 267043607SCho, Yu-Chens390x_ss.add(when: 'CONFIG_KVM', if_true: files( 367043607SCho, Yu-Chen 'kvm.c' 4*ad3b2e69SJanosch Frank), if_false: files( 5*ad3b2e69SJanosch Frank 'stubs.c' 667043607SCho, Yu-Chen)) 767043607SCho, Yu-Chen 867043607SCho, Yu-Chen# Newer kernels on s390 check for an S390_PGSTE program header and 967043607SCho, Yu-Chen# enable the pgste page table extensions in that case. This makes 1067043607SCho, Yu-Chen# the vm.allocate_pgste sysctl unnecessary. We enable this program 1167043607SCho, Yu-Chen# header if 1267043607SCho, Yu-Chen# - we build on s390x 1367043607SCho, Yu-Chen# - we build the system emulation for s390x (qemu-system-s390x) 1467043607SCho, Yu-Chen# - KVM is enabled 1567043607SCho, Yu-Chen# - the linker supports --s390-pgste 1667043607SCho, Yu-Chenif host_machine.cpu_family() == 's390x' and cc.has_link_argument('-Wl,--s390-pgste') 1767043607SCho, Yu-Chen s390x_softmmu_ss.add(when: 'CONFIG_KVM', 1867043607SCho, Yu-Chen if_true: declare_dependency(link_args: ['-Wl,--s390-pgste'])) 1967043607SCho, Yu-Chenendif 20