| 1 | # SPDX-License-Identifier: GPL-2.0-or-later |
| 2 | |
| 3 | vfio_ss = ss.source_set() |
| 4 | vfio_ss.add(files( |
| 5 | 'listener.c', |
| 6 | 'container.c', |
| 7 | 'container-legacy.c', |
| 8 | 'helpers.c', |
| 9 | )) |
| 10 | vfio_ss.add(when: 'CONFIG_KVM', if_true: files('kvm-helpers.c')) |
| 11 | stub_ss.add(files('kvm-stubs.c')) |
| 12 | vfio_ss.add(when: 'CONFIG_PSERIES', if_true: files('spapr.c')) |
| 13 | vfio_ss.add(when: ['CONFIG_KVM', 'CONFIG_PSERIES'], if_true: files('kvm-spapr.c')) |
| 14 | vfio_ss.add(when: 'CONFIG_VFIO_PCI', if_true: files( |
| 15 | 'pci-quirks.c', |
| 16 | 'pci.c', |
| 17 | )) |
| 18 | vfio_ss.add(when: 'CONFIG_VFIO_CCW', if_true: files('ccw.c')) |
| 19 | vfio_ss.add(when: 'CONFIG_VFIO_AP', if_true: files('ap.c')) |
| 20 | vfio_ss.add(when: 'CONFIG_VFIO_IGD', if_true: files('igd.c')) |
| 21 | stub_ss.add(files('igd-stubs.c')) |
| 22 | |
| 23 | system_ss.add_all(when: 'CONFIG_VFIO', if_true: vfio_ss) |
| 24 | |
| 25 | system_ss.add(when: 'CONFIG_VFIO', if_true: files( |
| 26 | 'cpr.c', |
| 27 | 'cpr-legacy.c', |
| 28 | 'device.c', |
| 29 | 'migration.c', |
| 30 | 'migration-multifd.c', |
| 31 | 'region.c', |
| 32 | )) |
| 33 | system_ss.add(when: ['CONFIG_VFIO', 'CONFIG_IOMMUFD'], if_true: files( |
| 34 | 'iommufd.c', |
| 35 | 'cpr-iommufd.c', |
| 36 | )) |
| 37 | stub_ss.add(files('iommufd-stubs.c')) |
| 38 | system_ss.add(when: 'CONFIG_VFIO_PCI', if_true: files( |
| 39 | 'display.c', |
| 40 | )) |