1s390x_ss = ss.source_set() 2s390x_ss.add(files( 3 'cpu.c', 4 'cpu_features.c', 5 'cpu_models.c', 6 'gdbstub.c', 7 'helper.c', 8 'interrupt.c', 9 'cpu-dump.c', 10)) 11 12s390x_ss.add(when: 'CONFIG_KVM', if_true: files('kvm.c'), if_false: files('kvm-stub.c')) 13 14gen_features = executable('gen-features', 'gen-features.c', native: true, 15 build_by_default: false) 16 17gen_features_h = custom_target('gen-features.h', 18 output: 'gen-features.h', 19 capture: true, 20 command: gen_features) 21 22s390x_ss.add(gen_features_h) 23 24s390x_softmmu_ss = ss.source_set() 25s390x_softmmu_ss.add(files( 26 'arch_dump.c', 27 'diag.c', 28 'ioinst.c', 29 'machine.c', 30 'mmu_helper.c', 31 'sigp.c', 32 'cpu-sysemu.c', 33)) 34 35# Newer kernels on s390 check for an S390_PGSTE program header and 36# enable the pgste page table extensions in that case. This makes 37# the vm.allocate_pgste sysctl unnecessary. We enable this program 38# header if 39# - we build on s390x 40# - we build the system emulation for s390x (qemu-system-s390x) 41# - KVM is enabled 42# - the linker supports --s390-pgste 43if host_machine.cpu_family() == 's390x' and cc.has_link_argument('-Wl,--s390-pgste') 44 s390x_softmmu_ss.add(when: 'CONFIG_KVM', 45 if_true: declare_dependency(link_args: ['-Wl,--s390-pgste'])) 46endif 47 48s390x_user_ss = ss.source_set() 49 50subdir('tcg') 51 52target_arch += {'s390x': s390x_ss} 53target_softmmu_arch += {'s390x': s390x_softmmu_ss} 54target_user_arch += {'s390x': s390x_user_ss} 55