| 1 | system_virtio_ss = ss.source_set() |
| 2 | system_virtio_ss.add(files('virtio-bus.c')) |
| 3 | system_virtio_ss.add(files('iothread-vq-mapping.c')) |
| 4 | system_virtio_ss.add(files('virtio-config-io.c')) |
| 5 | system_virtio_ss.add(when: 'CONFIG_VIRTIO_PCI', if_true: files('virtio-pci.c')) |
| 6 | system_virtio_ss.add(when: 'CONFIG_VIRTIO_MMIO', if_true: files('virtio-mmio.c')) |
| 7 | system_virtio_ss.add(when: 'CONFIG_VIRTIO_CRYPTO', if_true: files('virtio-crypto.c')) |
| 8 | system_virtio_ss.add(when: 'CONFIG_VHOST_VSOCK_COMMON', if_true: files('vhost-vsock-common.c')) |
| 9 | system_virtio_ss.add(when: 'CONFIG_VIRTIO_IOMMU', if_true: files('virtio-iommu.c')) |
| 10 | system_virtio_ss.add(when: 'CONFIG_VHOST_VDPA_DEV', if_true: files('vdpa-dev.c')) |
| 11 | |
| 12 | system_virtio_ss.add(files('virtio.c')) |
| 13 | system_virtio_ss.add(files('virtio-qmp.c')) |
| 14 | |
| 15 | if have_vhost |
| 16 | system_virtio_ss.add(files('vhost.c')) |
| 17 | system_virtio_ss.add(files('vhost-kernel.c', 'vhost-iova-tree.c')) |
| 18 | if have_vhost_user |
| 19 | system_virtio_ss.add(files('vhost-user.c')) |
| 20 | system_virtio_ss.add(files('vhost-user-base.c')) |
| 21 | |
| 22 | # MMIO Stubs |
| 23 | system_virtio_ss.add(when: 'CONFIG_VHOST_USER_TEST', if_true: files('vhost-user-test-device.c')) |
| 24 | system_virtio_ss.add(when: 'CONFIG_VHOST_USER_GPIO', if_true: files('vhost-user-gpio.c')) |
| 25 | system_virtio_ss.add(when: 'CONFIG_VHOST_USER_I2C', if_true: files('vhost-user-i2c.c')) |
| 26 | system_virtio_ss.add(when: 'CONFIG_VHOST_USER_RNG', if_true: files('vhost-user-rng.c')) |
| 27 | system_virtio_ss.add(when: 'CONFIG_VHOST_USER_SND', if_true: files('vhost-user-snd.c')) |
| 28 | system_virtio_ss.add(when: 'CONFIG_VHOST_USER_INPUT', if_true: files('vhost-user-input.c')) |
| 29 | system_virtio_ss.add(when: 'CONFIG_VHOST_USER_SPI', if_true: files('vhost-user-spi.c')) |
| 30 | system_virtio_ss.add(when: 'CONFIG_VHOST_USER_RTC', if_true: files('vhost-user-rtc.c')) |
| 31 | |
| 32 | # PCI Stubs |
| 33 | system_virtio_ss.add(when: ['CONFIG_VIRTIO_PCI', 'CONFIG_VHOST_USER_TEST'], |
| 34 | if_true: files('vhost-user-test-device-pci.c')) |
| 35 | system_virtio_ss.add(when: ['CONFIG_VIRTIO_PCI', 'CONFIG_VHOST_USER_GPIO'], |
| 36 | if_true: files('vhost-user-gpio-pci.c')) |
| 37 | system_virtio_ss.add(when: ['CONFIG_VIRTIO_PCI', 'CONFIG_VHOST_USER_I2C'], |
| 38 | if_true: files('vhost-user-i2c-pci.c')) |
| 39 | system_virtio_ss.add(when: ['CONFIG_VIRTIO_PCI', 'CONFIG_VHOST_USER_RNG'], |
| 40 | if_true: files('vhost-user-rng-pci.c')) |
| 41 | system_virtio_ss.add(when: ['CONFIG_VIRTIO_PCI', 'CONFIG_VHOST_USER_SND'], |
| 42 | if_true: files('vhost-user-snd-pci.c')) |
| 43 | system_virtio_ss.add(when: ['CONFIG_VIRTIO_PCI', 'CONFIG_VHOST_USER_INPUT'], |
| 44 | if_true: files('vhost-user-input-pci.c')) |
| 45 | system_virtio_ss.add(when: ['CONFIG_VIRTIO_PCI', 'CONFIG_VHOST_USER_SPI'], |
| 46 | if_true: files('vhost-user-spi-pci.c')) |
| 47 | system_virtio_ss.add(when: ['CONFIG_VIRTIO_PCI', 'CONFIG_VHOST_USER_RTC'], |
| 48 | if_true: files('vhost-user-rtc-pci.c')) |
| 49 | endif |
| 50 | if have_vhost_vdpa |
| 51 | system_virtio_ss.add(files('vhost-vdpa.c')) |
| 52 | system_virtio_ss.add(files('vhost-shadow-virtqueue.c')) |
| 53 | endif |
| 54 | endif |
| 55 | system_virtio_ss.add(when: 'CONFIG_VHOST_USER_VSOCK', if_true: files('vhost-user-vsock.c')) |
| 56 | system_virtio_ss.add(when: 'CONFIG_VIRTIO_RNG', if_true: files('virtio-rng.c')) |
| 57 | system_virtio_ss.add(when: 'CONFIG_VIRTIO_RTC', if_true: files('virtio-rtc.c')) |
| 58 | |
| 59 | system_virtio_ss.add(when: 'CONFIG_VIRTIO_BALLOON', if_true: files('virtio-balloon.c')) |
| 60 | system_virtio_ss.add(when: 'CONFIG_VHOST_USER_FS', if_true: files('vhost-user-fs.c')) |
| 61 | system_virtio_ss.add(when: 'CONFIG_VIRTIO_PMEM', if_true: files('virtio-pmem.c')) |
| 62 | system_virtio_ss.add(when: 'CONFIG_VHOST_VSOCK', if_true: files('vhost-vsock.c')) |
| 63 | system_virtio_ss.add(when: 'CONFIG_VIRTIO_MEM', if_true: files('virtio-mem.c')) |
| 64 | system_virtio_ss.add(when: 'CONFIG_VIRTIO_NSM', if_true: files('virtio-nsm.c')) |
| 65 | system_virtio_ss.add(when: 'CONFIG_VIRTIO_NSM', if_true: [files('cbor-helpers.c'), libcbor]) |
| 66 | system_virtio_ss.add(when: 'CONFIG_VHOST_USER_SCMI', if_true: files('vhost-user-scmi.c')) |
| 67 | |
| 68 | virtio_pci_ss = ss.source_set() |
| 69 | virtio_pci_ss.add(when: 'CONFIG_VHOST_VSOCK', if_true: files('vhost-vsock-pci.c')) |
| 70 | virtio_pci_ss.add(when: 'CONFIG_VHOST_USER_VSOCK', if_true: files('vhost-user-vsock-pci.c')) |
| 71 | virtio_pci_ss.add(when: 'CONFIG_VHOST_USER_BLK', if_true: files('vhost-user-blk-pci.c')) |
| 72 | virtio_pci_ss.add(when: 'CONFIG_VHOST_USER_SCSI', if_true: files('vhost-user-scsi-pci.c')) |
| 73 | virtio_pci_ss.add(when: 'CONFIG_VHOST_SCSI', if_true: files('vhost-scsi-pci.c')) |
| 74 | virtio_pci_ss.add(when: 'CONFIG_VHOST_USER_FS', if_true: files('vhost-user-fs-pci.c')) |
| 75 | virtio_pci_ss.add(when: 'CONFIG_VHOST_USER_SCMI', if_true: files('vhost-user-scmi-pci.c')) |
| 76 | |
| 77 | virtio_pci_ss.add(when: 'CONFIG_VIRTIO_CRYPTO', if_true: files('virtio-crypto-pci.c')) |
| 78 | virtio_pci_ss.add(when: 'CONFIG_VIRTIO_INPUT_HOST', if_true: files('virtio-input-host-pci.c')) |
| 79 | virtio_pci_ss.add(when: 'CONFIG_VIRTIO_INPUT', if_true: files('virtio-input-pci.c')) |
| 80 | virtio_pci_ss.add(when: 'CONFIG_VIRTIO_RNG', if_true: files('virtio-rng-pci.c')) |
| 81 | virtio_pci_ss.add(when: 'CONFIG_VIRTIO_RTC', if_true: files('virtio-rtc-pci.c')) |
| 82 | virtio_pci_ss.add(when: 'CONFIG_VIRTIO_NSM', if_true: [files('virtio-nsm-pci.c', 'cbor-helpers.c'), libcbor]) |
| 83 | virtio_pci_ss.add(when: 'CONFIG_VIRTIO_BALLOON', if_true: files('virtio-balloon-pci.c')) |
| 84 | virtio_pci_ss.add(when: 'CONFIG_VIRTIO_9P', if_true: files('virtio-9p-pci.c')) |
| 85 | virtio_pci_ss.add(when: 'CONFIG_VIRTIO_SCSI', if_true: files('virtio-scsi-pci.c')) |
| 86 | virtio_pci_ss.add(when: 'CONFIG_VIRTIO_BLK', if_true: files('virtio-blk-pci.c')) |
| 87 | virtio_pci_ss.add(when: 'CONFIG_VIRTIO_NET', if_true: files('virtio-net-pci.c')) |
| 88 | virtio_pci_ss.add(when: 'CONFIG_VIRTIO_SERIAL', if_true: files('virtio-serial-pci.c')) |
| 89 | virtio_pci_ss.add(when: 'CONFIG_VIRTIO_PMEM', if_true: files('virtio-pmem-pci.c')) |
| 90 | virtio_pci_ss.add(when: 'CONFIG_VIRTIO_IOMMU', if_true: files('virtio-iommu-pci.c')) |
| 91 | virtio_pci_ss.add(when: 'CONFIG_VIRTIO_MEM', if_true: files('virtio-mem-pci.c')) |
| 92 | virtio_pci_ss.add(when: 'CONFIG_VHOST_VDPA_DEV', if_true: files('vdpa-dev-pci.c')) |
| 93 | virtio_pci_ss.add(when: 'CONFIG_VIRTIO_MD', if_true: files('virtio-md-pci.c')) |
| 94 | |
| 95 | system_virtio_ss.add_all(when: 'CONFIG_VIRTIO_PCI', if_true: virtio_pci_ss) |
| 96 | |
| 97 | system_ss.add_all(when: 'CONFIG_VIRTIO', if_true: system_virtio_ss) |
| 98 | stub_ss.add(files('vhost-stub.c')) |
| 99 | stub_ss.add(files('vhost-user-stub.c')) |
| 100 | stub_ss.add(files('virtio-stub.c')) |
| 101 | stub_ss.add(files('virtio-md-stubs.c')) |
| 102 | |
| 103 | if have_hmp |
| 104 | system_ss.add(files('virtio-hmp-cmds.c')) |
| 105 | endif |
| 106 | |
| 107 | system_ss.add(when: 'CONFIG_ACPI', if_true: files('virtio-acpi.c')) |