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