| 1 | i386_ss = ss.source_set() |
| 2 | i386_ss.add(files( |
| 3 | 'cpu.c', |
| 4 | 'gdbstub.c', |
| 5 | 'helper.c', |
| 6 | 'cpu-dump.c', |
| 7 | )) |
| 8 | i386_ss.add(when: 'CONFIG_SEV', if_true: files('host-cpu.c', 'confidential-guest.c')) |
| 9 | |
| 10 | # x86 cpu type |
| 11 | i386_ss.add(when: 'CONFIG_KVM', if_true: files('xsave_helper.c', 'host-cpu.c')) |
| 12 | i386_ss.add(when: 'CONFIG_HVF', if_true: files('xsave_helper.c', 'host-cpu.c')) |
| 13 | i386_ss.add(when: 'CONFIG_WHPX', if_true: files('xsave_helper.c', 'host-cpu.c')) |
| 14 | i386_ss.add(when: 'CONFIG_NVMM', if_true: files('host-cpu.c')) |
| 15 | i386_ss.add(when: 'CONFIG_MSHV', if_true: files('xsave_helper.c', 'host-cpu.c')) |
| 16 | |
| 17 | i386_system_ss = ss.source_set() |
| 18 | i386_system_ss.add(files( |
| 19 | 'arch_dump.c', |
| 20 | 'arch_memory_mapping.c', |
| 21 | 'machine.c', |
| 22 | 'monitor.c', |
| 23 | 'cpu-apic.c', |
| 24 | 'cpu-system.c', |
| 25 | )) |
| 26 | i386_system_ss.add(when: 'CONFIG_SEV', if_true: files('sev.c'), |
| 27 | if_false: files('sev-system-stub.c')) |
| 28 | if igvm.found() |
| 29 | i386_system_ss.add(files('igvm.c')) |
| 30 | endif |
| 31 | |
| 32 | i386_user_ss = ss.source_set() |
| 33 | |
| 34 | subdir('kvm') |
| 35 | subdir('whpx') |
| 36 | subdir('nvmm') |
| 37 | subdir('hvf') |
| 38 | subdir('tcg') |
| 39 | subdir('emulate') |
| 40 | subdir('mshv') |
| 41 | |
| 42 | target_arch += {'i386': i386_ss} |
| 43 | target_system_arch += {'i386': i386_system_ss} |
| 44 | target_user_arch += {'i386': i386_user_ss} |