1abff1abfSPaolo Bonzinis390x_ss = ss.source_set() 2abff1abfSPaolo Bonzinis390x_ss.add(files( 3abff1abfSPaolo Bonzini 'cpu.c', 4abff1abfSPaolo Bonzini 'cpu_features.c', 5abff1abfSPaolo Bonzini 'cpu_models.c', 6abff1abfSPaolo Bonzini 'gdbstub.c', 7abff1abfSPaolo Bonzini 'helper.c', 8abff1abfSPaolo Bonzini 'interrupt.c', 9abff1abfSPaolo Bonzini)) 10abff1abfSPaolo Bonzini 11abff1abfSPaolo Bonzinis390x_ss.add(when: 'CONFIG_TCG', if_true: files( 12abff1abfSPaolo Bonzini 'cc_helper.c', 13abff1abfSPaolo Bonzini 'crypto_helper.c', 14abff1abfSPaolo Bonzini 'excp_helper.c', 15abff1abfSPaolo Bonzini 'fpu_helper.c', 16abff1abfSPaolo Bonzini 'int_helper.c', 17abff1abfSPaolo Bonzini 'mem_helper.c', 18abff1abfSPaolo Bonzini 'misc_helper.c', 19abff1abfSPaolo Bonzini 'translate.c', 20abff1abfSPaolo Bonzini 'vec_fpu_helper.c', 21abff1abfSPaolo Bonzini 'vec_helper.c', 22abff1abfSPaolo Bonzini 'vec_int_helper.c', 23abff1abfSPaolo Bonzini 'vec_string_helper.c', 24abff1abfSPaolo Bonzini), if_false: 'tcg-stub.c') 25abff1abfSPaolo Bonzini 26abff1abfSPaolo Bonzinis390x_ss.add(when: 'CONFIG_KVM', if_true: files('kvm.c'), if_false: files('kvm-stub.c')) 27abff1abfSPaolo Bonzini 28d3b18480SMarc-André Lureaugen_features = executable('gen-features', 'gen-features.c', native: true, 29d3b18480SMarc-André Lureau build_by_default: false) 30d3b18480SMarc-André Lureau 31d3b18480SMarc-André Lureaugen_features_h = custom_target('gen-features.h', 32d3b18480SMarc-André Lureau output: 'gen-features.h', 33d3b18480SMarc-André Lureau capture: true, 34d3b18480SMarc-André Lureau command: gen_features) 35d3b18480SMarc-André Lureau 36abff1abfSPaolo Bonzinis390x_ss.add(gen_features_h) 37abff1abfSPaolo Bonzini 38abff1abfSPaolo Bonzinis390x_softmmu_ss = ss.source_set() 39abff1abfSPaolo Bonzinis390x_softmmu_ss.add(files( 40abff1abfSPaolo Bonzini 'arch_dump.c', 41abff1abfSPaolo Bonzini 'diag.c', 42abff1abfSPaolo Bonzini 'ioinst.c', 43abff1abfSPaolo Bonzini 'machine.c', 44abff1abfSPaolo Bonzini 'mmu_helper.c', 45abff1abfSPaolo Bonzini 'sigp.c', 46abff1abfSPaolo Bonzini)) 47abff1abfSPaolo Bonzini 48*64ed6f92SPaolo Bonzini# Newer kernels on s390 check for an S390_PGSTE program header and 49*64ed6f92SPaolo Bonzini# enable the pgste page table extensions in that case. This makes 50*64ed6f92SPaolo Bonzini# the vm.allocate_pgste sysctl unnecessary. We enable this program 51*64ed6f92SPaolo Bonzini# header if 52*64ed6f92SPaolo Bonzini# - we build on s390x 53*64ed6f92SPaolo Bonzini# - we build the system emulation for s390x (qemu-system-s390x) 54*64ed6f92SPaolo Bonzini# - KVM is enabled 55*64ed6f92SPaolo Bonzini# - the linker supports --s390-pgste 56*64ed6f92SPaolo Bonziniif host_machine.cpu_family() == 's390x' and cc.has_link_argument('-Wl,--s390-pgste') 57*64ed6f92SPaolo Bonzini s390x_softmmu_ss.add(when: 'CONFIG_KVM', 58*64ed6f92SPaolo Bonzini if_true: declare_dependency(link_args: ['-Wl,--s390-pgste'])) 59*64ed6f92SPaolo Bonziniendif 60*64ed6f92SPaolo Bonzini 61abff1abfSPaolo Bonzinitarget_arch += {'s390x': s390x_ss} 62abff1abfSPaolo Bonzinitarget_softmmu_arch += {'s390x': s390x_softmmu_ss} 63