1f05356f8SPhilippe Mathieu-Daudésystem_virtio_ss = ss.source_set() 2f05356f8SPhilippe Mathieu-Daudésystem_virtio_ss.add(files('virtio-bus.c')) 3b50629c3SStefan Hajnoczisystem_virtio_ss.add(files('iothread-vq-mapping.c')) 4f05356f8SPhilippe Mathieu-Daudésystem_virtio_ss.add(when: 'CONFIG_VIRTIO_PCI', if_true: files('virtio-pci.c')) 5f05356f8SPhilippe Mathieu-Daudésystem_virtio_ss.add(when: 'CONFIG_VIRTIO_MMIO', if_true: files('virtio-mmio.c')) 6f05356f8SPhilippe Mathieu-Daudésystem_virtio_ss.add(when: 'CONFIG_VIRTIO_CRYPTO', if_true: files('virtio-crypto.c')) 7f05356f8SPhilippe Mathieu-Daudésystem_virtio_ss.add(when: 'CONFIG_VHOST_VSOCK_COMMON', if_true: files('vhost-vsock-common.c')) 8f05356f8SPhilippe Mathieu-Daudésystem_virtio_ss.add(when: 'CONFIG_VIRTIO_IOMMU', if_true: files('virtio-iommu.c')) 9f05356f8SPhilippe Mathieu-Daudésystem_virtio_ss.add(when: 'CONFIG_VHOST_VDPA_DEV', if_true: files('vdpa-dev.c')) 10be786d2fSMarc-André Lureau 1174a45163SPhilippe Mathieu-Daudéspecific_virtio_ss = ss.source_set() 1274a45163SPhilippe Mathieu-Daudéspecific_virtio_ss.add(files('virtio.c')) 1328b629abSPhilippe Mathieu-Daudéspecific_virtio_ss.add(files('virtio-config-io.c', 'virtio-qmp.c')) 1443b6d7eeSPaolo Bonzini 1543b6d7eeSPaolo Bonziniif have_vhost 16f05356f8SPhilippe Mathieu-Daudé system_virtio_ss.add(files('vhost.c')) 177a0903f7SPhilippe Mathieu-Daudé specific_virtio_ss.add(files('vhost-backend.c', 'vhost-iova-tree.c')) 1843b6d7eeSPaolo Bonzini if have_vhost_user 19eee77809SAlex Bennée # fixme - this really should be generic 2074a45163SPhilippe Mathieu-Daudé specific_virtio_ss.add(files('vhost-user.c')) 2162759896SAlex Bennée system_virtio_ss.add(files('vhost-user-base.c')) 22233412bfSAlex Bennée 23233412bfSAlex Bennée # MMIO Stubs 24eee77809SAlex Bennée system_virtio_ss.add(files('vhost-user-device.c')) 255ba58758SAlex Bennée system_virtio_ss.add(when: 'CONFIG_VHOST_USER_GPIO', if_true: files('vhost-user-gpio.c')) 26a50616b5SAlex Bennée system_virtio_ss.add(when: 'CONFIG_VHOST_USER_I2C', if_true: files('vhost-user-i2c.c')) 27233412bfSAlex Bennée system_virtio_ss.add(when: 'CONFIG_VHOST_USER_RNG', if_true: files('vhost-user-rng.c')) 284ae0fc18SManos Pitsidianakis system_virtio_ss.add(when: 'CONFIG_VHOST_USER_SND', if_true: files('vhost-user-snd.c')) 2987c7fb78SLeo Yan system_virtio_ss.add(when: 'CONFIG_VHOST_USER_INPUT', if_true: files('vhost-user-input.c')) 30233412bfSAlex Bennée 31233412bfSAlex Bennée # PCI Stubs 32eee77809SAlex Bennée system_virtio_ss.add(when: 'CONFIG_VIRTIO_PCI', if_true: files('vhost-user-device-pci.c')) 335ba58758SAlex Bennée system_virtio_ss.add(when: ['CONFIG_VIRTIO_PCI', 'CONFIG_VHOST_USER_GPIO'], 345ba58758SAlex Bennée if_true: files('vhost-user-gpio-pci.c')) 35a50616b5SAlex Bennée system_virtio_ss.add(when: ['CONFIG_VIRTIO_PCI', 'CONFIG_VHOST_USER_I2C'], 36a50616b5SAlex Bennée if_true: files('vhost-user-i2c-pci.c')) 37233412bfSAlex Bennée system_virtio_ss.add(when: ['CONFIG_VIRTIO_PCI', 'CONFIG_VHOST_USER_RNG'], 38233412bfSAlex Bennée if_true: files('vhost-user-rng-pci.c')) 394ae0fc18SManos Pitsidianakis system_virtio_ss.add(when: ['CONFIG_VIRTIO_PCI', 'CONFIG_VHOST_USER_SND'], 404ae0fc18SManos Pitsidianakis if_true: files('vhost-user-snd-pci.c')) 4187c7fb78SLeo Yan system_virtio_ss.add(when: ['CONFIG_VIRTIO_PCI', 'CONFIG_VHOST_USER_INPUT'], 4287c7fb78SLeo Yan if_true: files('vhost-user-input-pci.c')) 4343b6d7eeSPaolo Bonzini endif 4443b6d7eeSPaolo Bonzini if have_vhost_vdpa 45f05356f8SPhilippe Mathieu-Daudé system_virtio_ss.add(files('vhost-vdpa.c')) 4605632635SPhilippe Mathieu-Daudé specific_virtio_ss.add(files('vhost-shadow-virtqueue.c')) 4743b6d7eeSPaolo Bonzini endif 4843b6d7eeSPaolo Bonzinielse 49f05356f8SPhilippe Mathieu-Daudé system_virtio_ss.add(files('vhost-stub.c')) 5043b6d7eeSPaolo Bonziniendif 5143b6d7eeSPaolo Bonzini 5274a45163SPhilippe Mathieu-Daudéspecific_virtio_ss.add(when: 'CONFIG_VIRTIO_BALLOON', if_true: files('virtio-balloon.c')) 5374a45163SPhilippe Mathieu-Daudéspecific_virtio_ss.add(when: 'CONFIG_VHOST_USER_FS', if_true: files('vhost-user-fs.c')) 5474a45163SPhilippe Mathieu-Daudéspecific_virtio_ss.add(when: 'CONFIG_VIRTIO_PMEM', if_true: files('virtio-pmem.c')) 556df95629SPhilippe Mathieu-Daudéspecific_virtio_ss.add(when: 'CONFIG_VHOST_VSOCK', if_true: files('vhost-vsock.c')) 566df95629SPhilippe Mathieu-Daudéspecific_virtio_ss.add(when: 'CONFIG_VHOST_USER_VSOCK', if_true: files('vhost-user-vsock.c')) 5774a45163SPhilippe Mathieu-Daudéspecific_virtio_ss.add(when: 'CONFIG_VIRTIO_RNG', if_true: files('virtio-rng.c')) 58bb154e3eSDorjoy Chowdhuryspecific_virtio_ss.add(when: 'CONFIG_VIRTIO_NSM', if_true: [files('virtio-nsm.c', 'cbor-helpers.c'), libcbor]) 5974a45163SPhilippe Mathieu-Daudéspecific_virtio_ss.add(when: 'CONFIG_VIRTIO_MEM', if_true: files('virtio-mem.c')) 60a5dab090SMilan Zamazalspecific_virtio_ss.add(when: 'CONFIG_VHOST_USER_SCMI', if_true: files('vhost-user-scmi.c')) 61c46b20cfSMilan Zamazalspecific_virtio_ss.add(when: ['CONFIG_VIRTIO_PCI', 'CONFIG_VHOST_USER_SCMI'], if_true: files('vhost-user-scmi-pci.c')) 62be786d2fSMarc-André Lureau 63be786d2fSMarc-André Lureauvirtio_pci_ss = ss.source_set() 64be786d2fSMarc-André Lureauvirtio_pci_ss.add(when: 'CONFIG_VHOST_VSOCK', if_true: files('vhost-vsock-pci.c')) 65be786d2fSMarc-André Lureauvirtio_pci_ss.add(when: 'CONFIG_VHOST_USER_VSOCK', if_true: files('vhost-user-vsock-pci.c')) 66be786d2fSMarc-André Lureauvirtio_pci_ss.add(when: 'CONFIG_VHOST_USER_BLK', if_true: files('vhost-user-blk-pci.c')) 67be786d2fSMarc-André Lureauvirtio_pci_ss.add(when: 'CONFIG_VHOST_USER_SCSI', if_true: files('vhost-user-scsi-pci.c')) 68be786d2fSMarc-André Lureauvirtio_pci_ss.add(when: 'CONFIG_VHOST_SCSI', if_true: files('vhost-scsi-pci.c')) 6910925d06SPaolo Bonzinivirtio_pci_ss.add(when: 'CONFIG_VHOST_USER_FS', if_true: files('vhost-user-fs-pci.c')) 7010925d06SPaolo Bonzini 7110925d06SPaolo Bonzinivirtio_pci_ss.add(when: 'CONFIG_VIRTIO_CRYPTO', if_true: files('virtio-crypto-pci.c')) 72be786d2fSMarc-André Lureauvirtio_pci_ss.add(when: 'CONFIG_VIRTIO_INPUT_HOST', if_true: files('virtio-input-host-pci.c')) 73be786d2fSMarc-André Lureauvirtio_pci_ss.add(when: 'CONFIG_VIRTIO_INPUT', if_true: files('virtio-input-pci.c')) 74be786d2fSMarc-André Lureauvirtio_pci_ss.add(when: 'CONFIG_VIRTIO_RNG', if_true: files('virtio-rng-pci.c')) 75bb154e3eSDorjoy Chowdhuryvirtio_pci_ss.add(when: 'CONFIG_VIRTIO_NSM', if_true: [files('virtio-nsm-pci.c', 'cbor-helpers.c'), libcbor]) 76be786d2fSMarc-André Lureauvirtio_pci_ss.add(when: 'CONFIG_VIRTIO_BALLOON', if_true: files('virtio-balloon-pci.c')) 77be786d2fSMarc-André Lureauvirtio_pci_ss.add(when: 'CONFIG_VIRTIO_9P', if_true: files('virtio-9p-pci.c')) 78be786d2fSMarc-André Lureauvirtio_pci_ss.add(when: 'CONFIG_VIRTIO_SCSI', if_true: files('virtio-scsi-pci.c')) 79be786d2fSMarc-André Lureauvirtio_pci_ss.add(when: 'CONFIG_VIRTIO_BLK', if_true: files('virtio-blk-pci.c')) 80be786d2fSMarc-André Lureauvirtio_pci_ss.add(when: 'CONFIG_VIRTIO_NET', if_true: files('virtio-net-pci.c')) 81be786d2fSMarc-André Lureauvirtio_pci_ss.add(when: 'CONFIG_VIRTIO_SERIAL', if_true: files('virtio-serial-pci.c')) 82be786d2fSMarc-André Lureauvirtio_pci_ss.add(when: 'CONFIG_VIRTIO_PMEM', if_true: files('virtio-pmem-pci.c')) 83be786d2fSMarc-André Lureauvirtio_pci_ss.add(when: 'CONFIG_VIRTIO_IOMMU', if_true: files('virtio-iommu-pci.c')) 84be786d2fSMarc-André Lureauvirtio_pci_ss.add(when: 'CONFIG_VIRTIO_MEM', if_true: files('virtio-mem-pci.c')) 85fedda617SLongpengvirtio_pci_ss.add(when: 'CONFIG_VHOST_VDPA_DEV', if_true: files('vdpa-dev-pci.c')) 8618129c15SDavid Hildenbrandvirtio_pci_ss.add(when: 'CONFIG_VIRTIO_MD', if_true: files('virtio-md-pci.c')) 87be786d2fSMarc-André Lureau 8874a45163SPhilippe Mathieu-Daudéspecific_virtio_ss.add_all(when: 'CONFIG_VIRTIO_PCI', if_true: virtio_pci_ss) 89be786d2fSMarc-André Lureau 90f05356f8SPhilippe Mathieu-Daudésystem_ss.add_all(when: 'CONFIG_VIRTIO', if_true: system_virtio_ss) 91de6cd759SPhilippe Mathieu-Daudésystem_ss.add(when: 'CONFIG_VIRTIO', if_false: files('vhost-stub.c')) 92de6cd759SPhilippe Mathieu-Daudésystem_ss.add(when: 'CONFIG_VIRTIO', if_false: files('virtio-stub.c')) 93*c1a6bff2SThomas Huthsystem_ss.add(when: ['CONFIG_VIRTIO_MD', 'CONFIG_VIRTIO_PCI'], 94*c1a6bff2SThomas Huth if_false: files('virtio-md-stubs.c')) 95f2604d85SPaolo Bonzini 96de6cd759SPhilippe Mathieu-Daudésystem_ss.add(files('virtio-hmp-cmds.c')) 9774a45163SPhilippe Mathieu-Daudé 9874a45163SPhilippe Mathieu-Daudéspecific_ss.add_all(when: 'CONFIG_VIRTIO', if_true: specific_virtio_ss) 9957ba8436SSunil V Lsystem_ss.add(when: 'CONFIG_ACPI', if_true: files('virtio-acpi.c')) 100