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