xref: /qemu/hw/virtio/meson.build (revision a50616b50d0107c3bbdf9fae5ac1f3659dfc70f3)
1f05356f8SPhilippe Mathieu-Daudésystem_virtio_ss = ss.source_set()
2f05356f8SPhilippe Mathieu-Daudésystem_virtio_ss.add(files('virtio-bus.c'))
3f05356f8SPhilippe Mathieu-Daudésystem_virtio_ss.add(when: 'CONFIG_VIRTIO_PCI', if_true: files('virtio-pci.c'))
4f05356f8SPhilippe Mathieu-Daudésystem_virtio_ss.add(when: 'CONFIG_VIRTIO_MMIO', if_true: files('virtio-mmio.c'))
5f05356f8SPhilippe Mathieu-Daudésystem_virtio_ss.add(when: 'CONFIG_VIRTIO_CRYPTO', if_true: files('virtio-crypto.c'))
6f05356f8SPhilippe Mathieu-Daudésystem_virtio_ss.add(when: 'CONFIG_VHOST_VSOCK_COMMON', if_true: files('vhost-vsock-common.c'))
7f05356f8SPhilippe Mathieu-Daudésystem_virtio_ss.add(when: 'CONFIG_VIRTIO_IOMMU', if_true: files('virtio-iommu.c'))
8f05356f8SPhilippe Mathieu-Daudésystem_virtio_ss.add(when: 'CONFIG_VHOST_VDPA_DEV', if_true: files('vdpa-dev.c'))
9be786d2fSMarc-André Lureau
1074a45163SPhilippe Mathieu-Daudéspecific_virtio_ss = ss.source_set()
1174a45163SPhilippe Mathieu-Daudéspecific_virtio_ss.add(files('virtio.c'))
1228b629abSPhilippe Mathieu-Daudéspecific_virtio_ss.add(files('virtio-config-io.c', 'virtio-qmp.c'))
1343b6d7eeSPaolo Bonzini
1443b6d7eeSPaolo Bonziniif have_vhost
15f05356f8SPhilippe Mathieu-Daudé  system_virtio_ss.add(files('vhost.c'))
167a0903f7SPhilippe Mathieu-Daudé  specific_virtio_ss.add(files('vhost-backend.c', 'vhost-iova-tree.c'))
1743b6d7eeSPaolo Bonzini  if have_vhost_user
18eee77809SAlex Bennée    # fixme - this really should be generic
1974a45163SPhilippe Mathieu-Daudé    specific_virtio_ss.add(files('vhost-user.c'))
2062759896SAlex Bennée    system_virtio_ss.add(files('vhost-user-base.c'))
21233412bfSAlex Bennée
22233412bfSAlex Bennée    # MMIO Stubs
23eee77809SAlex Bennée    system_virtio_ss.add(files('vhost-user-device.c'))
245ba58758SAlex Bennée    system_virtio_ss.add(when: 'CONFIG_VHOST_USER_GPIO', if_true: files('vhost-user-gpio.c'))
25*a50616b5SAlex Bennée    system_virtio_ss.add(when: 'CONFIG_VHOST_USER_I2C', if_true: files('vhost-user-i2c.c'))
26233412bfSAlex Bennée    system_virtio_ss.add(when: 'CONFIG_VHOST_USER_RNG', if_true: files('vhost-user-rng.c'))
27233412bfSAlex Bennée
28233412bfSAlex Bennée    # PCI Stubs
29eee77809SAlex Bennée    system_virtio_ss.add(when: 'CONFIG_VIRTIO_PCI', if_true: files('vhost-user-device-pci.c'))
305ba58758SAlex Bennée    system_virtio_ss.add(when: ['CONFIG_VIRTIO_PCI', 'CONFIG_VHOST_USER_GPIO'],
315ba58758SAlex Bennée                         if_true: files('vhost-user-gpio-pci.c'))
32*a50616b5SAlex Bennée    system_virtio_ss.add(when: ['CONFIG_VIRTIO_PCI', 'CONFIG_VHOST_USER_I2C'],
33*a50616b5SAlex Bennée                         if_true: files('vhost-user-i2c-pci.c'))
34233412bfSAlex Bennée    system_virtio_ss.add(when: ['CONFIG_VIRTIO_PCI', 'CONFIG_VHOST_USER_RNG'],
35233412bfSAlex Bennée                         if_true: files('vhost-user-rng-pci.c'))
3643b6d7eeSPaolo Bonzini  endif
3743b6d7eeSPaolo Bonzini  if have_vhost_vdpa
38f05356f8SPhilippe Mathieu-Daudé    system_virtio_ss.add(files('vhost-vdpa.c'))
3905632635SPhilippe Mathieu-Daudé    specific_virtio_ss.add(files('vhost-shadow-virtqueue.c'))
4043b6d7eeSPaolo Bonzini  endif
4143b6d7eeSPaolo Bonzinielse
42f05356f8SPhilippe Mathieu-Daudé  system_virtio_ss.add(files('vhost-stub.c'))
4343b6d7eeSPaolo Bonziniendif
4443b6d7eeSPaolo Bonzini
4574a45163SPhilippe Mathieu-Daudéspecific_virtio_ss.add(when: 'CONFIG_VIRTIO_BALLOON', if_true: files('virtio-balloon.c'))
4674a45163SPhilippe Mathieu-Daudéspecific_virtio_ss.add(when: 'CONFIG_VHOST_USER_FS', if_true: files('vhost-user-fs.c'))
4774a45163SPhilippe Mathieu-Daudéspecific_virtio_ss.add(when: 'CONFIG_VIRTIO_PMEM', if_true: files('virtio-pmem.c'))
486df95629SPhilippe Mathieu-Daudéspecific_virtio_ss.add(when: 'CONFIG_VHOST_VSOCK', if_true: files('vhost-vsock.c'))
496df95629SPhilippe Mathieu-Daudéspecific_virtio_ss.add(when: 'CONFIG_VHOST_USER_VSOCK', if_true: files('vhost-user-vsock.c'))
5074a45163SPhilippe Mathieu-Daudéspecific_virtio_ss.add(when: 'CONFIG_VIRTIO_RNG', if_true: files('virtio-rng.c'))
5174a45163SPhilippe Mathieu-Daudéspecific_virtio_ss.add(when: 'CONFIG_VIRTIO_MEM', if_true: files('virtio-mem.c'))
52a5dab090SMilan Zamazalspecific_virtio_ss.add(when: 'CONFIG_VHOST_USER_SCMI', if_true: files('vhost-user-scmi.c'))
53c46b20cfSMilan Zamazalspecific_virtio_ss.add(when: ['CONFIG_VIRTIO_PCI', 'CONFIG_VHOST_USER_SCMI'], if_true: files('vhost-user-scmi-pci.c'))
54be786d2fSMarc-André Lureau
55be786d2fSMarc-André Lureauvirtio_pci_ss = ss.source_set()
56be786d2fSMarc-André Lureauvirtio_pci_ss.add(when: 'CONFIG_VHOST_VSOCK', if_true: files('vhost-vsock-pci.c'))
57be786d2fSMarc-André Lureauvirtio_pci_ss.add(when: 'CONFIG_VHOST_USER_VSOCK', if_true: files('vhost-user-vsock-pci.c'))
58be786d2fSMarc-André Lureauvirtio_pci_ss.add(when: 'CONFIG_VHOST_USER_BLK', if_true: files('vhost-user-blk-pci.c'))
59be786d2fSMarc-André Lureauvirtio_pci_ss.add(when: 'CONFIG_VHOST_USER_INPUT', if_true: files('vhost-user-input-pci.c'))
60be786d2fSMarc-André Lureauvirtio_pci_ss.add(when: 'CONFIG_VHOST_USER_SCSI', if_true: files('vhost-user-scsi-pci.c'))
61be786d2fSMarc-André Lureauvirtio_pci_ss.add(when: 'CONFIG_VHOST_SCSI', if_true: files('vhost-scsi-pci.c'))
6210925d06SPaolo Bonzinivirtio_pci_ss.add(when: 'CONFIG_VHOST_USER_FS', if_true: files('vhost-user-fs-pci.c'))
6310925d06SPaolo Bonzini
6410925d06SPaolo Bonzinivirtio_pci_ss.add(when: 'CONFIG_VIRTIO_CRYPTO', if_true: files('virtio-crypto-pci.c'))
65be786d2fSMarc-André Lureauvirtio_pci_ss.add(when: 'CONFIG_VIRTIO_INPUT_HOST', if_true: files('virtio-input-host-pci.c'))
66be786d2fSMarc-André Lureauvirtio_pci_ss.add(when: 'CONFIG_VIRTIO_INPUT', if_true: files('virtio-input-pci.c'))
67be786d2fSMarc-André Lureauvirtio_pci_ss.add(when: 'CONFIG_VIRTIO_RNG', if_true: files('virtio-rng-pci.c'))
68be786d2fSMarc-André Lureauvirtio_pci_ss.add(when: 'CONFIG_VIRTIO_BALLOON', if_true: files('virtio-balloon-pci.c'))
69be786d2fSMarc-André Lureauvirtio_pci_ss.add(when: 'CONFIG_VIRTIO_9P', if_true: files('virtio-9p-pci.c'))
70be786d2fSMarc-André Lureauvirtio_pci_ss.add(when: 'CONFIG_VIRTIO_SCSI', if_true: files('virtio-scsi-pci.c'))
71be786d2fSMarc-André Lureauvirtio_pci_ss.add(when: 'CONFIG_VIRTIO_BLK', if_true: files('virtio-blk-pci.c'))
72be786d2fSMarc-André Lureauvirtio_pci_ss.add(when: 'CONFIG_VIRTIO_NET', if_true: files('virtio-net-pci.c'))
73be786d2fSMarc-André Lureauvirtio_pci_ss.add(when: 'CONFIG_VIRTIO_SERIAL', if_true: files('virtio-serial-pci.c'))
74be786d2fSMarc-André Lureauvirtio_pci_ss.add(when: 'CONFIG_VIRTIO_PMEM', if_true: files('virtio-pmem-pci.c'))
75be786d2fSMarc-André Lureauvirtio_pci_ss.add(when: 'CONFIG_VIRTIO_IOMMU', if_true: files('virtio-iommu-pci.c'))
76be786d2fSMarc-André Lureauvirtio_pci_ss.add(when: 'CONFIG_VIRTIO_MEM', if_true: files('virtio-mem-pci.c'))
77fedda617SLongpengvirtio_pci_ss.add(when: 'CONFIG_VHOST_VDPA_DEV', if_true: files('vdpa-dev-pci.c'))
7818129c15SDavid Hildenbrandvirtio_pci_ss.add(when: 'CONFIG_VIRTIO_MD', if_true: files('virtio-md-pci.c'))
79be786d2fSMarc-André Lureau
8074a45163SPhilippe Mathieu-Daudéspecific_virtio_ss.add_all(when: 'CONFIG_VIRTIO_PCI', if_true: virtio_pci_ss)
81be786d2fSMarc-André Lureau
82f05356f8SPhilippe Mathieu-Daudésystem_ss.add_all(when: 'CONFIG_VIRTIO', if_true: system_virtio_ss)
83de6cd759SPhilippe Mathieu-Daudésystem_ss.add(when: 'CONFIG_VIRTIO', if_false: files('vhost-stub.c'))
84de6cd759SPhilippe Mathieu-Daudésystem_ss.add(when: 'CONFIG_VIRTIO', if_false: files('virtio-stub.c'))
85de6cd759SPhilippe Mathieu-Daudésystem_ss.add(files('virtio-hmp-cmds.c'))
8674a45163SPhilippe Mathieu-Daudé
8774a45163SPhilippe Mathieu-Daudéspecific_ss.add_all(when: 'CONFIG_VIRTIO', if_true: specific_virtio_ss)
8857ba8436SSunil V Lsystem_ss.add(when: 'CONFIG_ACPI', if_true: files('virtio-acpi.c'))
89