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