Skip to contentSkip to conversation

Meson integration for 5.2

PATCH Superseded Paolo Bonzini 10 participants 198 messages Aug 10, 2020 – Aug 12, 2020 Page 2 of 3

Subsystems (10)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#69 lore raw

PATCH 66/147 meson: convert tests/qtest to meson

In reply to Paolo Bonzini
---
 meson.build                                      |   3 +
 tests/Makefile.include                           |  47 +---
 tests/meson.build                                |   1 +
 tests/qtest/Makefile.include                     | 332 -----------------------
 tests/qtest/ac97-test.c                          |   2 +-
 tests/qtest/acpi-utils.h                         |   2 +-
 tests/qtest/ahci-test.c                          |   2 +-
 tests/qtest/arm-cpu-features.c                   |   2 +-
 tests/qtest/boot-order-test.c                    |   2 +-
 tests/qtest/boot-sector.c                        |   2 +-
 tests/qtest/boot-sector.h                        |   2 +-
 tests/qtest/boot-serial-test.c                   |   2 +-
 tests/qtest/cdrom-test.c                         |   2 +-
 tests/qtest/dbus-vmstate-test.c                  |   2 +-
 tests/qtest/device-introspect-test.c             |   2 +-
 tests/qtest/device-plug-test.c                   |   2 +-
 tests/qtest/drive_del-test.c                     |   2 +-
 tests/qtest/ds1338-test.c                        |   2 +-
 tests/qtest/e1000-test.c                         |   2 +-
 tests/qtest/eepro100-test.c                      |   2 +-
 tests/qtest/endianness-test.c                    |   2 +-
 tests/qtest/es1370-test.c                        |   2 +-
 tests/qtest/fuzz/fuzz.c                          |   2 +-
 tests/qtest/fuzz/fuzz.h                          |   2 +-
 tests/qtest/fuzz/i440fx_fuzz.c                   |   2 +-
 tests/qtest/fuzz/qos_fuzz.c                      |   2 +-
 tests/qtest/fuzz/virtio_net_fuzz.c               |   2 +-
 tests/qtest/fw_cfg-test.c                        |   2 +-
 tests/qtest/hd-geo-test.c                        |   2 +-
 tests/qtest/hexloader-test.c                     |   2 +-
 tests/qtest/ide-test.c                           |   2 +-
 tests/qtest/ipoctal232-test.c                    |   2 +-
 tests/qtest/ivshmem-test.c                       |   2 +-
 tests/qtest/libqos/aarch64-xlnx-zcu102-machine.c |   4 +-
 tests/qtest/libqos/ahci.c                        |   6 +-
 tests/qtest/libqos/ahci.h                        |   6 +-
 tests/qtest/libqos/arm-imx25-pdk-machine.c       |   6 +-
 tests/qtest/libqos/arm-n800-machine.c            |   6 +-
 tests/qtest/libqos/arm-raspi2-machine.c          |   4 +-
 tests/qtest/libqos/arm-sabrelite-machine.c       |   4 +-
 tests/qtest/libqos/arm-smdkc210-machine.c        |   4 +-
 tests/qtest/libqos/arm-virt-machine.c            |   6 +-
 tests/qtest/libqos/arm-xilinx-zynq-a9-machine.c  |   4 +-
 tests/qtest/libqos/e1000e.c                      |   6 +-
 tests/qtest/libqos/e1000e.h                      |   2 +-
 tests/qtest/libqos/fw_cfg.c                      |   2 +-
 tests/qtest/libqos/i2c-imx.c                     |   2 +-
 tests/qtest/libqos/i2c-omap.c                    |   2 +-
 tests/qtest/libqos/i2c.c                         |   2 +-
 tests/qtest/libqos/i2c.h                         |   2 +-
 tests/qtest/libqos/libqos-pc.c                   |   6 +-
 tests/qtest/libqos/libqos-pc.h                   |   2 +-
 tests/qtest/libqos/libqos-spapr.c                |   6 +-
 tests/qtest/libqos/libqos-spapr.h                |   2 +-
 tests/qtest/libqos/libqos.c                      |   4 +-
 tests/qtest/libqos/libqos.h                      |   4 +-
 tests/qtest/{ => libqos}/libqtest.h              |   0
 tests/qtest/libqos/malloc-pc.c                   |   4 +-
 tests/qtest/libqos/malloc-pc.h                   |   2 +-
 tests/qtest/libqos/malloc-spapr.c                |   2 +-
 tests/qtest/libqos/malloc-spapr.h                |   2 +-
 tests/qtest/libqos/malloc.c                      |   2 +-
 tests/qtest/libqos/meson.build                   |  57 ++++
 tests/qtest/libqos/pci-pc.c                      |   2 +-
 tests/qtest/libqos/pci-pc.h                      |   6 +-
 tests/qtest/libqos/pci-spapr.c                   |   6 +-
 tests/qtest/libqos/pci-spapr.h                   |   6 +-
 tests/qtest/libqos/pci.c                         |   4 +-
 tests/qtest/libqos/pci.h                         |   2 +-
 tests/qtest/libqos/ppc64_pseries-machine.c       |   4 +-
 tests/qtest/libqos/qgraph.c                      |   4 +-
 tests/qtest/libqos/qgraph.h                      |   6 +-
 tests/qtest/libqos/qgraph_internal.h             |   4 +-
 tests/qtest/libqos/qos_external.c                |   8 +-
 tests/qtest/libqos/qos_external.h                |   4 +-
 tests/qtest/libqos/rtas.c                        |   2 +-
 tests/qtest/libqos/rtas.h                        |   2 +-
 tests/qtest/libqos/sdhci.c                       |   2 +-
 tests/qtest/libqos/sdhci.h                       |   2 +-
 tests/qtest/libqos/tpci200.c                     |   4 +-
 tests/qtest/libqos/usb.c                         |   2 +-
 tests/qtest/libqos/usb.h                         |   2 +-
 tests/qtest/libqos/virtio-9p.c                   |   4 +-
 tests/qtest/libqos/virtio-9p.h                   |   6 +-
 tests/qtest/libqos/virtio-balloon.c              |   4 +-
 tests/qtest/libqos/virtio-balloon.h              |   6 +-
 tests/qtest/libqos/virtio-blk.c                  |   4 +-
 tests/qtest/libqos/virtio-blk.h                  |   6 +-
 tests/qtest/libqos/virtio-mmio.c                 |   8 +-
 tests/qtest/libqos/virtio-mmio.h                 |   4 +-
 tests/qtest/libqos/virtio-net.c                  |   4 +-
 tests/qtest/libqos/virtio-net.h                  |   6 +-
 tests/qtest/libqos/virtio-pci.c                  |  14 +-
 tests/qtest/libqos/virtio-pci.h                  |   6 +-
 tests/qtest/libqos/virtio-rng.c                  |   4 +-
 tests/qtest/libqos/virtio-rng.h                  |   6 +-
 tests/qtest/libqos/virtio-scsi.c                 |   4 +-
 tests/qtest/libqos/virtio-scsi.h                 |   6 +-
 tests/qtest/libqos/virtio-serial.c               |   4 +-
 tests/qtest/libqos/virtio-serial.h               |   6 +-
 tests/qtest/libqos/virtio.c                      |   2 +-
 tests/qtest/libqos/virtio.h                      |   2 +-
 tests/qtest/libqos/x86_64_pc-machine.c           |   2 +-
 tests/qtest/libqtest-single.h                    |   2 +-
 tests/qtest/libqtest.c                           |   2 +-
 tests/qtest/m48t59-test.c                        |   2 +-
 tests/qtest/machine-none-test.c                  |   2 +-
 tests/qtest/megasas-test.c                       |   2 +-
 tests/qtest/meson.build                          | 257 ++++++++++++++++++
 tests/qtest/microbit-test.c                      |   2 +-
 tests/qtest/migration-helpers.h                  |   2 +-
 tests/qtest/migration-test.c                     |   4 +-
 tests/qtest/modules-test.c                       |   2 +-
 tests/qtest/ne2000-test.c                        |   2 +-
 tests/qtest/numa-test.c                          |   2 +-
 tests/qtest/nvme-test.c                          |   2 +-
 tests/qtest/pca9552-test.c                       |   2 +-
 tests/qtest/pci-test.c                           |   2 +-
 tests/qtest/pcnet-test.c                         |   2 +-
 tests/qtest/pflash-cfi02-test.c                  |   2 +-
 tests/qtest/pnv-xscom-test.c                     |   2 +-
 tests/qtest/prom-env-test.c                      |   2 +-
 tests/qtest/pvpanic-test.c                       |   2 +-
 tests/qtest/pxe-test.c                           |   2 +-
 tests/qtest/q35-test.c                           |   2 +-
 tests/qtest/qmp-cmd-test.c                       |   2 +-
 tests/qtest/qmp-test.c                           |   2 +-
 tests/qtest/qom-test.c                           |   2 +-
 tests/qtest/rtas-test.c                          |   2 +-
 tests/qtest/sdhci-test.c                         |   2 +-
 tests/qtest/spapr-phb-test.c                     |   2 +-
 tests/qtest/tco-test.c                           |   2 +-
 tests/qtest/test-filter-mirror.c                 |   2 +-
 tests/qtest/test-filter-redirector.c             |   2 +-
 tests/qtest/test-hmp.c                           |   2 +-
 tests/qtest/tpm-crb-swtpm-test.c                 |   2 +-
 tests/qtest/tpm-tis-device-swtpm-test.c          |   2 +-
 tests/qtest/tpm-tis-swtpm-test.c                 |   2 +-
 tests/qtest/tpm-util.c                           |   2 +-
 tests/qtest/tulip-test.c                         |   2 +-
 tests/qtest/virtio-rng-test.c                    |   2 +-
 tests/qtest/virtio-test.c                        |   2 +-
 tests/qtest/vmgenid-test.c                       |   2 +-
 tests/qtest/vmxnet3-test.c                       |   2 +-
 tests/qtest/wdt_ib700-test.c                     |   2 +-
 tests/test-qga.c                                 |   2 +-
 tests/test-qgraph.c                              |   5 +-
 147 files changed, 541 insertions(+), 589 deletions(-)
 delete mode 100644 tests/qtest/Makefile.include
 rename tests/qtest/{ => libqos}/libqtest.h (100%)
 create mode 100644 tests/qtest/libqos/meson.build
 create mode 100644 tests/qtest/meson.build
meson.build +3 -0
index 534ed4c..2ff1be0 100644
@@ -523,6 +523,9 @@ subdir('nbd')
 subdir('scsi')
 subdir('block')
 
+# needed for fuzzing binaries
+subdir('tests/qtest/libqos')
+
 mods = []
 block_mods = []
 softmmu_mods = []
tests/Makefile.include +6 -41

105 lines not on this page · raw message

tests/meson.build +1 -0
index 8be9c22..d724402 100644
@@ -8,3 +8,4 @@ if 'CONFIG_TCG' in config_host
 endif
 
 subdir('qapi-schema')
+subdir('qtest')
tests/qtest/Makefile.include deleted +0 -332

332 lines not on this page · raw message

tests/qtest/ac97-test.c +1 -1
index b084e31..e09f249 100644
@@ -8,7 +8,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "qemu/module.h"
 #include "libqos/qgraph.h"
 #include "libqos/pci.h"
tests/qtest/acpi-utils.h +1 -1
index 0c86780..261784d 100644
@@ -13,7 +13,7 @@
 #ifndef TEST_ACPI_UTILS_H
 #define TEST_ACPI_UTILS_H
 
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 
 /* DSDT and SSDTs format */
 typedef struct {
tests/qtest/ahci-test.c +1 -1
index c8d42ce..ca4294f 100644
@@ -25,7 +25,7 @@
 #include "qemu/osdep.h"
 #include <getopt.h>
 
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "libqos/libqos-pc.h"
 #include "libqos/ahci.h"
 #include "libqos/pci-pc.h"
tests/qtest/arm-cpu-features.c +1 -1
index f7e062c..77b5e30 100644
@@ -10,7 +10,7 @@
  */
 #include "qemu/osdep.h"
 #include "qemu/bitops.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "qapi/qmp/qdict.h"
 #include "qapi/qmp/qjson.h"
 
tests/qtest/boot-order-test.c +1 -1
index 2f1c072..fac580d 100644
@@ -12,7 +12,7 @@
 
 #include "qemu/osdep.h"
 #include "libqos/fw_cfg.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "qapi/qmp/qdict.h"
 #include "standard-headers/linux/qemu_fw_cfg.h"
 
tests/qtest/boot-sector.c +1 -1
index 9e66c6d..24df5c4 100644
@@ -13,7 +13,7 @@
 #include "qemu/osdep.h"
 #include "boot-sector.h"
 #include "qemu-common.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 
 #define LOW(x) ((x) & 0xff)
 #define HIGH(x) ((x) >> 8)
tests/qtest/boot-sector.h +1 -1
index 6ee6bb4..b339fde 100644
@@ -14,7 +14,7 @@
 #ifndef TEST_BOOT_SECTOR_H
 #define TEST_BOOT_SECTOR_H
 
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 
 /* Create boot disk file. fname must be a suitable string for mkstemp() */
 int boot_sector_init(char *fname);
tests/qtest/boot-serial-test.c +1 -1
index bfe7624..b6b1c23 100644
@@ -14,7 +14,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "libqos/libqos-spapr.h"
 
 static const uint8_t bios_avr[] = {
tests/qtest/cdrom-test.c +1 -1
index 833a050..e9afab6 100644
@@ -11,7 +11,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "boot-sector.h"
 #include "qapi/qmp/qdict.h"
 
tests/qtest/dbus-vmstate-test.c +1 -1
index 2e5e47d..aca9b98 100644
@@ -1,7 +1,7 @@
 #include "qemu/osdep.h"
 #include <glib/gstdio.h>
 #include <gio/gio.h>
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "qemu-common.h"
 #include "dbus-vmstate1.h"
 #include "migration-helpers.h"
tests/qtest/device-introspect-test.c +1 -1
index d68b785..9f22340 100644
@@ -22,7 +22,7 @@
 #include "qapi/qmp/qstring.h"
 #include "qapi/qmp/qdict.h"
 #include "qapi/qmp/qlist.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 
 const char common_args[] = "-nodefaults -machine none";
 
tests/qtest/device-plug-test.c +1 -1
index 318e422..9214892 100644
@@ -11,7 +11,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "qapi/qmp/qdict.h"
 #include "qapi/qmp/qstring.h"
 
tests/qtest/drive_del-test.c +1 -1
index 5f8839b..2ab11ad 100644
@@ -11,7 +11,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "libqos/virtio.h"
 #include "qapi/qmp/qdict.h"
 
tests/qtest/ds1338-test.c +1 -1
index f6ade9a..c5d46bc 100644
@@ -18,7 +18,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "libqos/i2c.h"
 
 #define DS1338_ADDR 0x68
tests/qtest/e1000-test.c +1 -1
index c387984..ea286d1 100644
@@ -8,7 +8,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "qemu/module.h"
 #include "libqos/qgraph.h"
 #include "libqos/pci.h"
tests/qtest/eepro100-test.c +1 -1
index 8dbffff..d72ad09 100644
@@ -8,7 +8,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "qemu/module.h"
 #include "libqos/qgraph.h"
 #include "libqos/pci.h"
tests/qtest/endianness-test.c +1 -1
index cc088ac..4e79e22 100644
@@ -13,7 +13,7 @@
 
 #include "qemu/osdep.h"
 
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "qemu/bswap.h"
 
 typedef struct TestCase TestCase;
tests/qtest/es1370-test.c +1 -1
index adccdac..2fd7fd2 100644
@@ -8,7 +8,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "qemu/module.h"
 #include "libqos/qgraph.h"
 #include "libqos/pci.h"
tests/qtest/fuzz/fuzz.c +1 -1
index 031594a..1ceea84 100644
@@ -20,7 +20,7 @@
 #include "sysemu/sysemu.h"
 #include "qemu/main-loop.h"
 #include "qemu/rcu.h"
-#include "tests/qtest/libqtest.h"
+#include "tests/qtest/libqos/libqtest.h"
 #include "tests/qtest/libqos/qgraph.h"
 #include "fuzz.h"
 
tests/qtest/fuzz/fuzz.h +1 -1
index 9ca3d10..8eb765e 100644
@@ -18,7 +18,7 @@
 #include "qemu/units.h"
 #include "qapi/error.h"
 
-#include "tests/qtest/libqtest.h"
+#include "tests/qtest/libqos/libqtest.h"
 
 /**
  * A libfuzzer fuzzing target
tests/qtest/fuzz/i440fx_fuzz.c +1 -1
index bf966d4..f45373f 100644
@@ -13,7 +13,7 @@
 #include "qemu/osdep.h"
 
 #include "qemu/main-loop.h"
-#include "tests/qtest/libqtest.h"
+#include "tests/qtest/libqos/libqtest.h"
 #include "tests/qtest/libqos/pci.h"
 #include "tests/qtest/libqos/pci-pc.h"
 #include "fuzz.h"
tests/qtest/fuzz/qos_fuzz.c +1 -1
index d52f3eb..b943577 100644
@@ -25,7 +25,7 @@
 #include "sysemu/sysemu.h"
 #include "qemu/main-loop.h"
 
-#include "tests/qtest/libqtest.h"
+#include "tests/qtest/libqos/libqtest.h"
 #include "tests/qtest/libqos/malloc.h"
 #include "tests/qtest/libqos/qgraph.h"
 #include "tests/qtest/libqos/qgraph_internal.h"
tests/qtest/fuzz/virtio_net_fuzz.c +1 -1
index a33bd73..277a9e2 100644
@@ -13,7 +13,7 @@
 #include "qemu/osdep.h"
 
 #include "standard-headers/linux/virtio_config.h"
-#include "tests/qtest/libqtest.h"
+#include "tests/qtest/libqos/libqtest.h"
 #include "tests/qtest/libqos/virtio-net.h"
 #include "fuzz.h"
 #include "fork_fuzz.h"
tests/qtest/fw_cfg-test.c +1 -1
index 5dc807b..95b3907 100644
@@ -12,7 +12,7 @@
 
 #include "qemu/osdep.h"
 
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "standard-headers/linux/qemu_fw_cfg.h"
 #include "libqos/fw_cfg.h"
 #include "qemu/bswap.h"
tests/qtest/hd-geo-test.c +1 -1
index 48e8e02..f7b7cfb 100644
@@ -19,7 +19,7 @@
 #include "qemu-common.h"
 #include "qemu/bswap.h"
 #include "qapi/qmp/qlist.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "libqos/fw_cfg.h"
 #include "libqos/libqos.h"
 #include "standard-headers/linux/qemu_fw_cfg.h"
tests/qtest/hexloader-test.c +1 -1
index 8b7aa2d..5615020 100644
@@ -10,7 +10,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 
 /* Load 'test.hex' and verify that the in-memory contents are as expected.
  * 'test.hex' is a memory test pattern stored in Hexadecimal Object
tests/qtest/ide-test.c +1 -1
index 5cfd97f..3f8081e 100644
@@ -25,7 +25,7 @@
 #include "qemu/osdep.h"
 
 
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "libqos/libqos.h"
 #include "libqos/pci-pc.h"
 #include "libqos/malloc-pc.h"
tests/qtest/ipoctal232-test.c +1 -1
index 53a8c9b..65ce10b 100644
@@ -8,7 +8,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "qemu/module.h"
 #include "libqos/qgraph.h"
 
tests/qtest/ivshmem-test.c +1 -1
index ecda256..d5c8b9f 100644
@@ -13,7 +13,7 @@
 #include "contrib/ivshmem-server/ivshmem-server.h"
 #include "libqos/libqos-pc.h"
 #include "libqos/libqos-spapr.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "qemu-common.h"
 
 #define TMPSHMSIZE (1 << 20)
tests/qtest/libqos/aarch64-xlnx-zcu102-machine.c +2 -2
index 8f827ae..79631cc 100644
@@ -19,8 +19,8 @@
 #include "qemu/osdep.h"
 #include "libqtest.h"
 #include "qemu/module.h"
-#include "libqos/malloc.h"
-#include "libqos/qgraph.h"
+#include "malloc.h"
+#include "qgraph.h"
 #include "sdhci.h"
 
 typedef struct QXlnxZCU102Machine QXlnxZCU102Machine;
tests/qtest/libqos/ahci.c +3 -3
index cc1b08e..2946abc 100644
@@ -25,8 +25,8 @@
 #include "qemu/osdep.h"
 
 #include "libqtest.h"
-#include "libqos/ahci.h"
-#include "libqos/pci-pc.h"
+#include "ahci.h"
+#include "pci-pc.h"
 
 #include "qemu-common.h"
 #include "qemu/host-utils.h"
@@ -579,7 +579,7 @@ void ahci_write_fis(AHCIQState *ahci, AHCICommand *cmd)
     /* NCQ commands use exclusively 8 bit fields and needs no adjustment.
      * Only the count field needs to be adjusted for non-NCQ commands.
      * The auxiliary FIS fields are defined per-command and are not currently
-     * implemented in libqos/ahci.o, but may or may not need to be flipped. */
+     * implemented in ahci.o, but may or may not need to be flipped. */
     if (!cmd->props->ncq) {
         tmp.count = cpu_to_le16(tmp.count);
     }
tests/qtest/libqos/ahci.h +3 -3
index 44ab110..88835b6 100644
@@ -25,9 +25,9 @@
  * THE SOFTWARE.
  */
 
-#include "libqos/libqos.h"
-#include "libqos/pci.h"
-#include "libqos/malloc-pc.h"
+#include "libqos.h"
+#include "pci.h"
+#include "malloc-pc.h"
 
 /*** Supplementary PCI Config Space IDs & Masks ***/
 #define PCI_DEVICE_ID_INTEL_Q35_AHCI   (0x2922)
tests/qtest/libqos/arm-imx25-pdk-machine.c +3 -3
index 0da3f19..6692adf 100644
@@ -20,9 +20,9 @@
 
 #include "qemu/osdep.h"
 #include "libqtest.h"
-#include "libqos/malloc.h"
-#include "libqos/qgraph.h"
-#include "libqos/i2c.h"
+#include "malloc.h"
+#include "qgraph.h"
+#include "i2c.h"
 
 #define ARM_PAGE_SIZE            4096
 #define IMX25_PDK_RAM_START      0x80000000
tests/qtest/libqos/arm-n800-machine.c +3 -3
index 35f8207..ff2049c 100644
@@ -20,9 +20,9 @@
 
 #include "qemu/osdep.h"
 #include "libqtest.h"
-#include "libqos/malloc.h"
-#include "libqos/qgraph.h"
-#include "libqos/i2c.h"
+#include "malloc.h"
+#include "qgraph.h"
+#include "i2c.h"
 
 #define ARM_PAGE_SIZE            4096
 #define N800_RAM_START      0x80000000
tests/qtest/libqos/arm-raspi2-machine.c +2 -2
index 8480d80..35bb470 100644
@@ -19,8 +19,8 @@
 #include "qemu/osdep.h"
 #include "libqtest.h"
 #include "qemu/module.h"
-#include "libqos/malloc.h"
-#include "libqos/qgraph.h"
+#include "malloc.h"
+#include "qgraph.h"
 #include "sdhci.h"
 
 #define ARM_PAGE_SIZE             4096
tests/qtest/libqos/arm-sabrelite-machine.c +2 -2
index f6e403b..72425f0 100644
@@ -19,8 +19,8 @@
 #include "qemu/osdep.h"
 #include "libqtest.h"
 #include "qemu/module.h"
-#include "libqos/malloc.h"
-#include "libqos/qgraph.h"
+#include "malloc.h"
+#include "qgraph.h"
 #include "sdhci.h"
 
 #define ARM_PAGE_SIZE            4096
tests/qtest/libqos/arm-smdkc210-machine.c +2 -2
index eebac7f..321b882 100644
@@ -19,8 +19,8 @@
 #include "qemu/osdep.h"
 #include "libqtest.h"
 #include "qemu/module.h"
-#include "libqos/malloc.h"
-#include "libqos/qgraph.h"
+#include "malloc.h"
+#include "qgraph.h"
 #include "sdhci.h"
 
 #define ARM_PAGE_SIZE             4096
tests/qtest/libqos/arm-virt-machine.c +3 -3
index 9316598..e0f5932 100644
@@ -19,9 +19,9 @@
 #include "qemu/osdep.h"
 #include "libqtest.h"
 #include "qemu/module.h"
-#include "libqos/malloc.h"
-#include "libqos/qgraph.h"
-#include "libqos/virtio-mmio.h"
+#include "malloc.h"
+#include "qgraph.h"
+#include "virtio-mmio.h"
 
 #define ARM_PAGE_SIZE               4096
 #define VIRTIO_MMIO_BASE_ADDR       0x0A003E00
tests/qtest/libqos/arm-xilinx-zynq-a9-machine.c +2 -2
index 473acce..56e53c7 100644
@@ -19,8 +19,8 @@
 #include "qemu/osdep.h"
 #include "libqtest.h"
 #include "qemu/module.h"
-#include "libqos/malloc.h"
-#include "libqos/qgraph.h"
+#include "malloc.h"
+#include "qgraph.h"
 #include "sdhci.h"
 
 typedef struct QXilinxZynqA9Machine QXilinxZynqA9Machine;
tests/qtest/libqos/e1000e.c +3 -3
index e2927ed..a451f61 100644
@@ -18,13 +18,13 @@
 
 #include "qemu/osdep.h"
 #include "libqtest.h"
-#include "libqos/pci-pc.h"
+#include "pci-pc.h"
 #include "qemu/sockets.h"
 #include "qemu/iov.h"
 #include "qemu/module.h"
 #include "qemu/bitops.h"
-#include "libqos/malloc.h"
-#include "libqos/qgraph.h"
+#include "malloc.h"
+#include "qgraph.h"
 #include "e1000e.h"
 
 #define E1000E_IMS      (0x00d0)
tests/qtest/libqos/e1000e.h +1 -1
index 35183b2..a22f5fd 100644
@@ -19,7 +19,7 @@
 #ifndef QGRAPH_E1000E_H
 #define QGRAPH_E1000E_H
 
-#include "libqos/qgraph.h"
+#include "qgraph.h"
 #include "pci.h"
 
 #define E1000E_RX0_MSG_ID           (0)
tests/qtest/libqos/fw_cfg.c +1 -1
index 1f46258..6b8e1ba 100644
@@ -13,7 +13,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqos/fw_cfg.h"
+#include "fw_cfg.h"
 #include "libqtest.h"
 #include "qemu/bswap.h"
 #include "hw/nvram/fw_cfg.h"
tests/qtest/libqos/i2c-imx.c +1 -1
index f33ece5..8f9a7e3 100644
@@ -18,7 +18,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqos/i2c.h"
+#include "i2c.h"
 
 
 #include "libqtest.h"
tests/qtest/libqos/i2c-omap.c +1 -1
index 9ae8214..eb4e453 100644
@@ -7,7 +7,7 @@
  * See the COPYING file in the top-level directory.
  */
 #include "qemu/osdep.h"
-#include "libqos/i2c.h"
+#include "i2c.h"
 
 
 #include "qemu/bswap.h"
tests/qtest/libqos/i2c.c +1 -1
index 38f800d..ade1bdb 100644
@@ -7,7 +7,7 @@
  * See the COPYING file in the top-level directory.
  */
 #include "qemu/osdep.h"
-#include "libqos/i2c.h"
+#include "i2c.h"
 #include "libqtest.h"
 
 void qi2c_send(QI2CDevice *i2cdev, const uint8_t *buf, uint16_t len)
tests/qtest/libqos/i2c.h +1 -1
index c65f087..1341bac 100644
@@ -10,7 +10,7 @@
 #define LIBQOS_I2C_H
 
 #include "libqtest.h"
-#include "libqos/qgraph.h"
+#include "qgraph.h"
 
 typedef struct I2CAdapter I2CAdapter;
 struct I2CAdapter {
tests/qtest/libqos/libqos-pc.c +3 -3
index d04abc5..db420a5 100644
@@ -1,7 +1,7 @@
 #include "qemu/osdep.h"
-#include "libqos/libqos-pc.h"
-#include "libqos/malloc-pc.h"
-#include "libqos/pci-pc.h"
+#include "libqos-pc.h"
+#include "malloc-pc.h"
+#include "pci-pc.h"
 
 static QOSOps qos_ops = {
     .alloc_init = pc_alloc_init,
tests/qtest/libqos/libqos-pc.h +1 -1
index a0e4c45..1a9923e 100644
@@ -1,7 +1,7 @@
 #ifndef LIBQOS_PC_H
 #define LIBQOS_PC_H
 
-#include "libqos/libqos.h"
+#include "libqos.h"
 
 QOSState *qtest_pc_vboot(const char *cmdline_fmt, va_list ap);
 QOSState *qtest_pc_boot(const char *cmdline_fmt, ...);
tests/qtest/libqos/libqos-spapr.c +3 -3
index 8766d54..db0e87b 100644
@@ -1,7 +1,7 @@
 #include "qemu/osdep.h"
-#include "libqos/libqos-spapr.h"
-#include "libqos/malloc-spapr.h"
-#include "libqos/pci-spapr.h"
+#include "libqos-spapr.h"
+#include "malloc-spapr.h"
+#include "pci-spapr.h"
 
 static QOSOps qos_ops = {
     .alloc_init = spapr_alloc_init,
tests/qtest/libqos/libqos-spapr.h +1 -1
index 49bd72d..c613389 100644
@@ -1,7 +1,7 @@
 #ifndef LIBQOS_SPAPR_H
 #define LIBQOS_SPAPR_H
 
-#include "libqos/libqos.h"
+#include "libqos.h"
 
 QOSState *qtest_spapr_vboot(const char *cmdline_fmt, va_list ap);
 QOSState *qtest_spapr_boot(const char *cmdline_fmt, ...);
tests/qtest/libqos/libqos.c +2 -2
index f229eb2..2251e86 100644
@@ -2,8 +2,8 @@
 #include <sys/wait.h>
 
 #include "libqtest.h"
-#include "libqos/libqos.h"
-#include "libqos/pci.h"
+#include "libqos.h"
+#include "pci.h"
 #include "qapi/qmp/qdict.h"
 
 /*** Test Setup & Teardown ***/
tests/qtest/libqos/libqos.h +2 -2
index 8e971c2..e0b2bfe 100644
@@ -2,8 +2,8 @@
 #define LIBQOS_H
 
 #include "libqtest.h"
-#include "libqos/pci.h"
-#include "libqos/malloc.h"
+#include "pci.h"
+#include "malloc.h"
 
 typedef struct QOSState QOSState;
 
tests/qtest/libqos/libqtest.h renamed from tests/qtest/libqtest.h +0 -0
similarity index 100%
rename from tests/qtest/libqtest.h
rename to tests/qtest/libqos/libqtest.h
tests/qtest/libqos/malloc-pc.c +2 -2
index 6f92ce4..16ff960 100644
@@ -11,8 +11,8 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqos/malloc-pc.h"
-#include "libqos/fw_cfg.h"
+#include "malloc-pc.h"
+#include "fw_cfg.h"
 
 #include "standard-headers/linux/qemu_fw_cfg.h"
 
tests/qtest/libqos/malloc-pc.h +1 -1
index 21e75ae..d8d7985 100644
@@ -13,7 +13,7 @@
 #ifndef LIBQOS_MALLOC_PC_H
 #define LIBQOS_MALLOC_PC_H
 
-#include "libqos/malloc.h"
+#include "malloc.h"
 
 void pc_alloc_init(QGuestAllocator *s, QTestState *qts, QAllocOpts flags);
 
tests/qtest/libqos/malloc-spapr.c +1 -1
index 2a6b7e3..84862e4 100644
@@ -6,7 +6,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqos/malloc-spapr.h"
+#include "malloc-spapr.h"
 
 #include "qemu-common.h"
 
tests/qtest/libqos/malloc-spapr.h +1 -1
index e5fe9bf..f99572f 100644
@@ -8,7 +8,7 @@
 #ifndef LIBQOS_MALLOC_SPAPR_H
 #define LIBQOS_MALLOC_SPAPR_H
 
-#include "libqos/malloc.h"
+#include "malloc.h"
 
 void spapr_alloc_init(QGuestAllocator *s, QTestState *qts, QAllocOpts flags);
 
tests/qtest/libqos/malloc.c +1 -1
index 615422a..f708b01 100644
@@ -11,7 +11,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqos/malloc.h"
+#include "malloc.h"
 #include "qemu-common.h"
 #include "qemu/host-utils.h"
 
tests/qtest/libqos/meson.build new file +57 -0

57 lines not on this page · raw message

tests/qtest/libqos/pci-pc.c +1 -1
index 3bb2eb3..f978442 100644
@@ -12,7 +12,7 @@
 
 #include "qemu/osdep.h"
 #include "libqtest.h"
-#include "libqos/pci-pc.h"
+#include "pci-pc.h"
 #include "qapi/qmp/qdict.h"
 #include "hw/pci/pci_regs.h"
 
tests/qtest/libqos/pci-pc.h +3 -3
index 4690005..49ec950 100644
@@ -13,9 +13,9 @@
 #ifndef LIBQOS_PCI_PC_H
 #define LIBQOS_PCI_PC_H
 
-#include "libqos/pci.h"
-#include "libqos/malloc.h"
-#include "libqos/qgraph.h"
+#include "pci.h"
+#include "malloc.h"
+#include "qgraph.h"
 
 typedef struct QPCIBusPC {
     QOSGraphObject obj;
tests/qtest/libqos/pci-spapr.c +3 -3
index d6f8c01..2622269 100644
@@ -7,9 +7,9 @@
 
 #include "qemu/osdep.h"
 #include "libqtest.h"
-#include "libqos/pci-spapr.h"
-#include "libqos/rtas.h"
-#include "libqos/qgraph.h"
+#include "pci-spapr.h"
+#include "rtas.h"
+#include "qgraph.h"
 
 #include "hw/pci/pci_regs.h"
 
tests/qtest/libqos/pci-spapr.h +3 -3
index d9e2563..20a4371 100644
@@ -8,9 +8,9 @@
 #ifndef LIBQOS_PCI_SPAPR_H
 #define LIBQOS_PCI_SPAPR_H
 
-#include "libqos/malloc.h"
-#include "libqos/pci.h"
-#include "libqos/qgraph.h"
+#include "malloc.h"
+#include "pci.h"
+#include "qgraph.h"
 
 /* From include/hw/pci-host/spapr.h */
 
tests/qtest/libqos/pci.c +2 -2
index 2309a72..e1e9618 100644
@@ -11,11 +11,11 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqos/pci.h"
+#include "pci.h"
 
 #include "hw/pci/pci_regs.h"
 #include "qemu/host-utils.h"
-#include "libqos/qgraph.h"
+#include "qgraph.h"
 
 void qpci_device_foreach(QPCIBus *bus, int vendor_id, int device_id,
                          void (*func)(QPCIDevice *dev, int devfn, void *data),
tests/qtest/libqos/pci.h +1 -1
index 590c175..ee64fde 100644
@@ -14,7 +14,7 @@
 #define LIBQOS_PCI_H
 
 #include "libqtest.h"
-#include "libqos/qgraph.h"
+#include "qgraph.h"
 
 #define QPCI_PIO_LIMIT    0x10000
 
tests/qtest/libqos/ppc64_pseries-machine.c +2 -2
index 5d7bd88..24ca179 100644
@@ -18,10 +18,10 @@
 
 #include "qemu/osdep.h"
 #include "libqtest.h"
-#include "libqos/qgraph.h"
+#include "qgraph.h"
 #include "pci-spapr.h"
 #include "qemu/module.h"
-#include "libqos/malloc-spapr.h"
+#include "malloc-spapr.h"
 
 typedef struct QSPAPR_pci_host QSPAPR_pci_host;
 typedef struct Qppc64_pseriesMachine Qppc64_pseriesMachine;
tests/qtest/libqos/qgraph.c +2 -2
index eb0af8a..fc49cfa 100644
@@ -19,8 +19,8 @@
 #include "qemu/osdep.h"
 #include "libqtest.h"
 #include "qemu/queue.h"
-#include "libqos/qgraph_internal.h"
-#include "libqos/qgraph.h"
+#include "qgraph_internal.h"
+#include "qgraph.h"
 
 #define QGRAPH_PRINT_DEBUG 0
 #define QOS_ROOT ""
tests/qtest/libqos/qgraph.h +3 -3
index db1244e..1054326 100644
@@ -106,7 +106,7 @@ typedef void *(*QOSBeforeTest) (GString *cmd_line, void *arg);
  * <example>
  *   <title>Creating new driver an its interface</title>
  *   <programlisting>
- #include "libqos/qgraph.h"
+ #include "qgraph.h"
 
  struct My_driver {
      QOSGraphObject obj;
@@ -190,7 +190,7 @@ typedef void *(*QOSBeforeTest) (GString *cmd_line, void *arg);
  * <example>
  *   <title>Creating new test</title>
  *   <programlisting>
- * #include "libqos/qgraph.h"
+ * #include "qgraph.h"
  *
  * static void my_test_function(void *obj, void *data)
  * {
@@ -230,7 +230,7 @@ typedef void *(*QOSBeforeTest) (GString *cmd_line, void *arg);
  * a valid test path will be:
  * "/x86_64/pc/other_node/my_driver/my_interface/my_test".
  *
- * Additional examples are also in libqos/test-qgraph.c
+ * Additional examples are also in test-qgraph.c
  *
  * Command line:
  * Command line is built by using node names and optional arguments
tests/qtest/libqos/qgraph_internal.h +2 -2
index aa3123f..968fa69 100644
@@ -20,11 +20,11 @@
 #define QGRAPH_INTERNAL_H
 
 /* This header is declaring additional helper functions defined in
- * libqos/qgraph.c
+ * qgraph.c
  * It should not be included in tests
  */
 
-#include "libqos/qgraph.h"
+#include "qgraph.h"
 
 typedef struct QOSGraphMachine QOSGraphMachine;
 typedef enum QOSEdgeType QOSEdgeType;
tests/qtest/libqos/qos_external.c +4 -4
index 0dfc05c..10ee0f7 100644
@@ -24,10 +24,10 @@
 #include "qapi/qmp/qstring.h"
 #include "qemu/module.h"
 #include "qapi/qmp/qlist.h"
-#include "libqos/malloc.h"
-#include "libqos/qgraph.h"
-#include "libqos/qgraph_internal.h"
-#include "libqos/qos_external.h"
+#include "malloc.h"
+#include "qgraph.h"
+#include "qgraph_internal.h"
+#include "qos_external.h"
 
 static void machine_apply_to_node(const char *name)
 {
tests/qtest/libqos/qos_external.h +3 -1
index 56a2f37..8446e3d 100644
@@ -19,7 +19,9 @@
 #ifndef QOS_EXTERNAL_H
 #define QOS_EXTERNAL_H
 
-#include "libqos/malloc.h"
+#include "qgraph.h"
+
+#include "malloc.h"
 #include "qapi/qapi-types-machine.h"
 #include "qapi/qapi-types-qom.h"
 
tests/qtest/libqos/rtas.c +1 -1
index d81ff42..db29d55 100644
@@ -5,7 +5,7 @@
 
 #include "qemu/osdep.h"
 #include "libqtest.h"
-#include "libqos/rtas.h"
+#include "rtas.h"
 
 static void qrtas_copy_args(QTestState *qts, uint64_t target_args,
                             uint32_t nargs, uint32_t *args)
tests/qtest/libqos/rtas.h +1 -1
index 459e23a..f38f99d 100644
@@ -5,7 +5,7 @@
 
 #ifndef LIBQOS_RTAS_H
 #define LIBQOS_RTAS_H
-#include "libqos/malloc.h"
+#include "malloc.h"
 
 int qrtas_get_time_of_day(QTestState *qts, QGuestAllocator *alloc,
                           struct tm *tm, uint32_t *ns);
tests/qtest/libqos/sdhci.c +1 -1
index fbf2e36..65f0d07 100644
@@ -18,7 +18,7 @@
 
 #include "qemu/osdep.h"
 #include "libqtest.h"
-#include "libqos/qgraph.h"
+#include "qgraph.h"
 #include "pci.h"
 #include "qemu/module.h"
 #include "sdhci.h"
tests/qtest/libqos/sdhci.h +1 -1
index 1acd309..22d647b 100644
@@ -19,7 +19,7 @@
 #ifndef QGRAPH_QSDHCI_H
 #define QGRAPH_QSDHCI_H
 
-#include "libqos/qgraph.h"
+#include "qgraph.h"
 #include "pci.h"
 
 typedef struct QSDHCI QSDHCI;
tests/qtest/libqos/tpci200.c +2 -2
index ae590a4..1787b1f 100644
@@ -10,8 +10,8 @@
 #include "qemu/osdep.h"
 #include "libqtest.h"
 #include "qemu/module.h"
-#include "libqos/qgraph.h"
-#include "libqos/pci.h"
+#include "qgraph.h"
+#include "pci.h"
 
 typedef struct QTpci200 QTpci200;
 typedef struct QIpack QIpack;
tests/qtest/libqos/usb.c +1 -1
index d7a9cb3..8b45b02 100644
@@ -14,7 +14,7 @@
 #include "qemu/osdep.h"
 #include "libqtest.h"
 #include "hw/usb/uhci-regs.h"
-#include "libqos/usb.h"
+#include "usb.h"
 
 void qusb_pci_init_one(QPCIBus *pcibus, struct qhc *hc, uint32_t devfn, int bar)
 {
tests/qtest/libqos/usb.h +1 -1
index eeced39..50030d7 100644
@@ -1,7 +1,7 @@
 #ifndef LIBQOS_USB_H
 #define LIBQOS_USB_H
 
-#include "libqos/pci-pc.h"
+#include "pci-pc.h"
 
 struct qhc {
     QPCIDevice *dev;
tests/qtest/libqos/virtio-9p.c +2 -2
index c87b561..2e30006 100644
@@ -20,8 +20,8 @@
 #include "libqtest.h"
 #include "qemu/module.h"
 #include "standard-headers/linux/virtio_ids.h"
-#include "libqos/virtio-9p.h"
-#include "libqos/qgraph.h"
+#include "virtio-9p.h"
+#include "qgraph.h"
 
 static QGuestAllocator *alloc;
 
tests/qtest/libqos/virtio-9p.h +3 -3
index be9621a..b1e6bad 100644
@@ -19,9 +19,9 @@
 #ifndef TESTS_LIBQOS_VIRTIO_9P_H
 #define TESTS_LIBQOS_VIRTIO_9P_H
 
-#include "libqos/qgraph.h"
-#include "libqos/virtio.h"
-#include "libqos/virtio-pci.h"
+#include "qgraph.h"
+#include "virtio.h"
+#include "virtio-pci.h"
 
 typedef struct QVirtio9P QVirtio9P;
 typedef struct QVirtio9PPCI QVirtio9PPCI;
tests/qtest/libqos/virtio-balloon.c +2 -2
index 9745f4a..a3da5c2 100644
@@ -19,8 +19,8 @@
 #include "qemu/osdep.h"
 #include "libqtest.h"
 #include "qemu/module.h"
-#include "libqos/qgraph.h"
-#include "libqos/virtio-balloon.h"
+#include "qgraph.h"
+#include "virtio-balloon.h"
 
 /* virtio-balloon-device */
 static void *qvirtio_balloon_get_driver(QVirtioBalloon *v_balloon,
tests/qtest/libqos/virtio-balloon.h +3 -3
index 5b91930..309894c 100644
@@ -19,9 +19,9 @@
 #ifndef TESTS_LIBQOS_VIRTIO_BALLOON_H
 #define TESTS_LIBQOS_VIRTIO_BALLOON_H
 
-#include "libqos/qgraph.h"
-#include "libqos/virtio.h"
-#include "libqos/virtio-pci.h"
+#include "qgraph.h"
+#include "virtio.h"
+#include "virtio-pci.h"
 
 typedef struct QVirtioBalloon QVirtioBalloon;
 typedef struct QVirtioBalloonPCI QVirtioBalloonPCI;
tests/qtest/libqos/virtio-blk.c +2 -2
index 5fc6940..5da0259 100644
@@ -20,8 +20,8 @@
 #include "libqtest.h"
 #include "qemu/module.h"
 #include "standard-headers/linux/virtio_blk.h"
-#include "libqos/qgraph.h"
-#include "libqos/virtio-blk.h"
+#include "qgraph.h"
+#include "virtio-blk.h"
 
 #define PCI_SLOT                0x04
 #define PCI_FN                  0x00
tests/qtest/libqos/virtio-blk.h +3 -3
index 5170f13..dcef388 100644
@@ -19,9 +19,9 @@
 #ifndef TESTS_LIBQOS_VIRTIO_BLK_H
 #define TESTS_LIBQOS_VIRTIO_BLK_H
 
-#include "libqos/qgraph.h"
-#include "libqos/virtio.h"
-#include "libqos/virtio-pci.h"
+#include "qgraph.h"
+#include "virtio.h"
+#include "virtio-pci.h"
 
 typedef struct QVirtioBlk QVirtioBlk;
 typedef struct QVirtioBlkPCI QVirtioBlkPCI;
tests/qtest/libqos/virtio-mmio.c +4 -4
index e0a2bd7..75efda3 100644
@@ -10,10 +10,10 @@
 #include "qemu/osdep.h"
 #include "libqtest.h"
 #include "qemu/module.h"
-#include "libqos/virtio.h"
-#include "libqos/virtio-mmio.h"
-#include "libqos/malloc.h"
-#include "libqos/qgraph.h"
+#include "virtio.h"
+#include "virtio-mmio.h"
+#include "malloc.h"
+#include "qgraph.h"
 #include "standard-headers/linux/virtio_ring.h"
 
 static uint8_t qvirtio_mmio_config_readb(QVirtioDevice *d, uint64_t off)
tests/qtest/libqos/virtio-mmio.h +2 -2
index 0e45778..30803bc 100644
@@ -10,8 +10,8 @@
 #ifndef LIBQOS_VIRTIO_MMIO_H
 #define LIBQOS_VIRTIO_MMIO_H
 
-#include "libqos/virtio.h"
-#include "libqos/qgraph.h"
+#include "virtio.h"
+#include "qgraph.h"
 
 #define QVIRTIO_MMIO_MAGIC_VALUE        0x000
 #define QVIRTIO_MMIO_VERSION            0x004
tests/qtest/libqos/virtio-net.c +2 -2
index a9e253a..1cae07f 100644
@@ -19,8 +19,8 @@
 #include "qemu/osdep.h"
 #include "libqtest.h"
 #include "qemu/module.h"
-#include "libqos/qgraph.h"
-#include "libqos/virtio-net.h"
+#include "qgraph.h"
+#include "virtio-net.h"
 #include "hw/virtio/virtio-net.h"
 
 
tests/qtest/libqos/virtio-net.h +3 -3
index b8cbec0..5ba2161 100644
@@ -19,9 +19,9 @@
 #ifndef TESTS_LIBQOS_VIRTIO_NET_H
 #define TESTS_LIBQOS_VIRTIO_NET_H
 
-#include "libqos/qgraph.h"
-#include "libqos/virtio.h"
-#include "libqos/virtio-pci.h"
+#include "qgraph.h"
+#include "virtio.h"
+#include "virtio-pci.h"
 
 typedef struct QVirtioNet QVirtioNet;
 typedef struct QVirtioNetPCI QVirtioNetPCI;
tests/qtest/libqos/virtio-pci.c +7 -7
index 62851c2..cd3c0f5 100644
@@ -9,13 +9,13 @@
 
 #include "qemu/osdep.h"
 #include "libqtest.h"
-#include "libqos/virtio.h"
-#include "libqos/virtio-pci.h"
-#include "libqos/pci.h"
-#include "libqos/pci-pc.h"
-#include "libqos/malloc.h"
-#include "libqos/malloc-pc.h"
-#include "libqos/qgraph.h"
+#include "virtio.h"
+#include "virtio-pci.h"
+#include "pci.h"
+#include "pci-pc.h"
+#include "malloc.h"
+#include "malloc-pc.h"
+#include "qgraph.h"
 #include "standard-headers/linux/virtio_ring.h"
 #include "standard-headers/linux/virtio_pci.h"
 
tests/qtest/libqos/virtio-pci.h +3 -3
index 294d556..f5115ca 100644
@@ -10,9 +10,9 @@
 #ifndef LIBQOS_VIRTIO_PCI_H
 #define LIBQOS_VIRTIO_PCI_H
 
-#include "libqos/virtio.h"
-#include "libqos/pci.h"
-#include "libqos/qgraph.h"
+#include "virtio.h"
+#include "pci.h"
+#include "qgraph.h"
 
 typedef struct QVirtioPCIMSIXOps QVirtioPCIMSIXOps;
 
tests/qtest/libqos/virtio-rng.c +2 -2
index 46f8d95..2e09dd7 100644
@@ -19,8 +19,8 @@
 #include "qemu/osdep.h"
 #include "libqtest.h"
 #include "qemu/module.h"
-#include "libqos/qgraph.h"
-#include "libqos/virtio-rng.h"
+#include "qgraph.h"
+#include "virtio-rng.h"
 
 /* virtio-rng-device */
 static void *qvirtio_rng_get_driver(QVirtioRng *v_rng,
tests/qtest/libqos/virtio-rng.h +3 -3
index 9342372..9ca102b 100644
@@ -19,9 +19,9 @@
 #ifndef TESTS_LIBQOS_VIRTIO_RNG_H
 #define TESTS_LIBQOS_VIRTIO_RNG_H
 
-#include "libqos/qgraph.h"
-#include "libqos/virtio.h"
-#include "libqos/virtio-pci.h"
+#include "qgraph.h"
+#include "virtio.h"
+#include "virtio-pci.h"
 
 typedef struct QVirtioRng QVirtioRng;
 typedef struct QVirtioRngPCI QVirtioRngPCI;
tests/qtest/libqos/virtio-scsi.c +2 -2
index c8c3598..5644e32 100644
@@ -20,8 +20,8 @@
 #include "libqtest.h"
 #include "qemu/module.h"
 #include "standard-headers/linux/virtio_ids.h"
-#include "libqos/qgraph.h"
-#include "libqos/virtio-scsi.h"
+#include "qgraph.h"
+#include "virtio-scsi.h"
 
 /* virtio-scsi-device */
 static void *qvirtio_scsi_get_driver(QVirtioSCSI *v_scsi,
tests/qtest/libqos/virtio-scsi.h +3 -3
index 9e3774d..531315e 100644
@@ -19,9 +19,9 @@
 #ifndef TESTS_LIBQOS_VIRTIO_SCSI_H
 #define TESTS_LIBQOS_VIRTIO_SCSI_H
 
-#include "libqos/qgraph.h"
-#include "libqos/virtio.h"
-#include "libqos/virtio-pci.h"
+#include "qgraph.h"
+#include "virtio.h"
+#include "virtio-pci.h"
 
 typedef struct QVirtioSCSI QVirtioSCSI;
 typedef struct QVirtioSCSIPCI QVirtioSCSIPCI;
tests/qtest/libqos/virtio-serial.c +2 -2
index b956540..ee34afd 100644
@@ -19,8 +19,8 @@
 #include "qemu/osdep.h"
 #include "libqtest.h"
 #include "qemu/module.h"
-#include "libqos/qgraph.h"
-#include "libqos/virtio-serial.h"
+#include "qgraph.h"
+#include "virtio-serial.h"
 
 static void *qvirtio_serial_get_driver(QVirtioSerial *v_serial,
                                        const char *interface)
tests/qtest/libqos/virtio-serial.h +3 -3
index 3328c6c..3db43b2 100644
@@ -19,9 +19,9 @@
 #ifndef TESTS_LIBQOS_VIRTIO_SERIAL_H
 #define TESTS_LIBQOS_VIRTIO_SERIAL_H
 
-#include "libqos/qgraph.h"
-#include "libqos/virtio.h"
-#include "libqos/virtio-pci.h"
+#include "qgraph.h"
+#include "virtio.h"
+#include "virtio-pci.h"
 
 typedef struct QVirtioSerial QVirtioSerial;
 typedef struct QVirtioSerialPCI QVirtioSerialPCI;
tests/qtest/libqos/virtio.c +1 -1
index 9aa3606..6fe7bf9 100644
@@ -10,7 +10,7 @@
 #include "qemu/osdep.h"
 #include "qemu/bswap.h"
 #include "libqtest.h"
-#include "libqos/virtio.h"
+#include "virtio.h"
 #include "standard-headers/linux/virtio_config.h"
 #include "standard-headers/linux/virtio_ring.h"
 
tests/qtest/libqos/virtio.h +1 -1
index 529ef75..b8bd06e 100644
@@ -10,7 +10,7 @@
 #ifndef LIBQOS_VIRTIO_H
 #define LIBQOS_VIRTIO_H
 
-#include "libqos/malloc.h"
+#include "malloc.h"
 #include "standard-headers/linux/virtio_ring.h"
 
 #define QVIRTIO_F_BAD_FEATURE           0x40000000ull
tests/qtest/libqos/x86_64_pc-machine.c +1 -1
index 0edb1c9..ad96742 100644
@@ -18,7 +18,7 @@
 
 #include "qemu/osdep.h"
 #include "libqtest.h"
-#include "libqos/qgraph.h"
+#include "qgraph.h"
 #include "pci-pc.h"
 #include "qemu/module.h"
 #include "malloc-pc.h"
tests/qtest/libqtest-single.h +1 -1
index 6f1bb13..176979a 100644
@@ -11,7 +11,7 @@
 #ifndef LIBQTEST_SINGLE_H
 #define LIBQTEST_SINGLE_H
 
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 
 QTestState *global_qtest __attribute__((common, weak));
 
tests/qtest/libqtest.c +1 -1
index fd46805..26f1223 100644
@@ -20,7 +20,7 @@
 #include <sys/wait.h>
 #include <sys/un.h>
 
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "qemu-common.h"
 #include "qemu/ctype.h"
 #include "qemu/cutils.h"
tests/qtest/m48t59-test.c +1 -1
index b94a123..6db3234 100644
@@ -14,7 +14,7 @@
 
 #include "qemu/osdep.h"
 
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 
 #define RTC_SECONDS             0x9
 #define RTC_MINUTES             0xa
tests/qtest/machine-none-test.c +1 -1
index 57107f1..aab06b9 100644
@@ -14,7 +14,7 @@
 
 #include "qemu-common.h"
 #include "qemu/cutils.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "qapi/qmp/qdict.h"
 
 
tests/qtest/megasas-test.c +1 -1
index d6796b9..eae70ff 100644
@@ -8,7 +8,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "qemu/bswap.h"
 #include "qemu/module.h"
 #include "libqos/qgraph.h"
tests/qtest/meson.build new file +257 -0

257 lines not on this page · raw message

tests/qtest/microbit-test.c +1 -1
index 04e199e..2b25557 100644
@@ -16,7 +16,7 @@
 
 #include "qemu/osdep.h"
 #include "exec/hwaddr.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 
 #include "hw/arm/nrf51.h"
 #include "hw/char/nrf51_uart.h"
tests/qtest/migration-helpers.h +1 -1
index a11808b..d63bba9 100644
@@ -12,7 +12,7 @@
 #ifndef MIGRATION_HELPERS_H_
 #define MIGRATION_HELPERS_H_
 
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 
 extern bool got_stop;
 
tests/qtest/migration-test.c +2 -2
index 21ea5ba..00a233c 100644
@@ -12,7 +12,7 @@
 
 #include "qemu/osdep.h"
 
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "qapi/error.h"
 #include "qapi/qmp/qdict.h"
 #include "qemu/module.h"
@@ -25,7 +25,7 @@
 #include "qapi/qobject-output-visitor.h"
 
 #include "migration-helpers.h"
-#include "migration/migration-test.h"
+#include "tests/migration/migration-test.h"
 
 /* TODO actually test the results and get rid of this */
 #define qtest_qmp_discard_response(...) qobject_unref(qtest_qmp(__VA_ARGS__))
tests/qtest/modules-test.c +1 -1
index 8821768..c238b3f 100644
@@ -1,5 +1,5 @@
 #include "qemu/osdep.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 
 const char common_args[] = "-nodefaults -machine none";
 
tests/qtest/ne2000-test.c +1 -1
index 3fc0e55..43cfc45 100644
@@ -8,7 +8,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "qemu/module.h"
 #include "libqos/qgraph.h"
 #include "libqos/pci.h"
tests/qtest/numa-test.c +1 -1
index e1ed6d4..b25ebf9 100644
@@ -10,7 +10,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "qapi/qmp/qdict.h"
 #include "qapi/qmp/qlist.h"
 
tests/qtest/nvme-test.c +1 -1
index ff04421..d32c953 100644
@@ -10,7 +10,7 @@
 #include "qemu/osdep.h"
 #include "qemu/module.h"
 #include "qemu/units.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "libqos/qgraph.h"
 #include "libqos/pci.h"
 
tests/qtest/pca9552-test.c +1 -1
index d80ed93..42a1312 100644
@@ -9,7 +9,7 @@
 
 #include "qemu/osdep.h"
 
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "libqos/qgraph.h"
 #include "libqos/i2c.h"
 #include "hw/misc/pca9552_regs.h"
tests/qtest/pci-test.c +1 -1
index 4b2092b..e15d4d9 100644
@@ -8,7 +8,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "qemu/module.h"
 #include "libqos/qgraph.h"
 #include "libqos/pci.h"
tests/qtest/pcnet-test.c +1 -1
index 900944f..7583aeb 100644
@@ -8,7 +8,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "qemu/module.h"
 #include "libqos/qgraph.h"
 #include "libqos/pci.h"
tests/qtest/pflash-cfi02-test.c +1 -1
index 17aa669..afb702b 100644
@@ -8,7 +8,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 
 /*
  * To test the pflash_cfi02 device, we run QEMU with the musicpal machine with
tests/qtest/pnv-xscom-test.c +1 -1
index 2c46d5c..c8d4043 100644
@@ -8,7 +8,7 @@
  */
 #include "qemu/osdep.h"
 
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 
 typedef enum PnvChipType {
     PNV_CHIP_POWER8E,     /* AKA Murano (default) */
tests/qtest/prom-env-test.c +1 -1
index 60e6ec3..f41d801 100644
@@ -20,7 +20,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "libqos/libqos-spapr.h"
 
 #define MAGIC   0xcafec0de
tests/qtest/pvpanic-test.c +1 -1
index ff9176a..e576394 100644
@@ -8,7 +8,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "qapi/qmp/qdict.h"
 
 static void test_panic(void)
tests/qtest/pxe-test.c +1 -1
index 1161a77..32bbae3 100644
@@ -15,7 +15,7 @@
 #include "qemu/osdep.h"
 #include <glib/gstdio.h>
 #include "qemu-common.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "boot-sector.h"
 #include "libqos/libqos-spapr.h"
 
tests/qtest/q35-test.c +1 -1
index c922d81..b7cf144 100644
@@ -10,7 +10,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "libqos/pci.h"
 #include "libqos/pci-pc.h"
 #include "hw/pci-host/q35.h"
tests/qtest/qmp-cmd-test.c +1 -1
index f7b1aa7..f34e688 100644
@@ -11,7 +11,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "qapi/error.h"
 #include "qapi/qapi-visit-introspect.h"
 #include "qapi/qmp/qdict.h"
tests/qtest/qmp-test.c +1 -1
index 1a8876b..5950c3e 100644
@@ -11,7 +11,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "qapi/error.h"
 #include "qapi/qapi-visit-control.h"
 #include "qapi/qmp/qdict.h"
tests/qtest/qom-test.c +1 -1
index 1acf0d7..eb34af8 100644
@@ -13,7 +13,7 @@
 #include "qapi/qmp/qdict.h"
 #include "qapi/qmp/qlist.h"
 #include "qemu/cutils.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 
 static void test_properties(QTestState *qts, const char *path, bool recurse)
 {
tests/qtest/rtas-test.c +1 -1
index 167b42d..a7e83e7 100644
@@ -1,6 +1,6 @@
 #include "qemu/osdep.h"
 #include "qemu/cutils.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 
 #include "libqos/libqos-spapr.h"
 #include "libqos/rtas.h"
tests/qtest/sdhci-test.c +1 -1
index 6275e76..a110cfe 100644
@@ -10,7 +10,7 @@
 
 #include "qemu/osdep.h"
 #include "hw/registerfields.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "qemu/module.h"
 #include "libqos/pci-pc.h"
 #include "hw/pci/pci.h"
tests/qtest/spapr-phb-test.c +1 -1
index 093dc22..ea8d596 100644
@@ -9,7 +9,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "qemu/module.h"
 #include "libqos/qgraph.h"
 
tests/qtest/tco-test.c +1 -1
index 254f735..47bc7ad 100644
@@ -9,7 +9,7 @@
 
 #include "qemu/osdep.h"
 
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "libqos/pci.h"
 #include "libqos/pci-pc.h"
 #include "qapi/qmp/qdict.h"
tests/qtest/test-filter-mirror.c +1 -1
index 1e3ced8..bc0dee6 100644
@@ -10,7 +10,7 @@
 
 #include "qemu/osdep.h"
 #include "qemu-common.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "qapi/qmp/qdict.h"
 #include "qemu/iov.h"
 #include "qemu/sockets.h"
tests/qtest/test-filter-redirector.c +1 -1
index e4d5322..829db8c 100644
@@ -52,7 +52,7 @@
 
 #include "qemu/osdep.h"
 #include "qemu-common.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "qapi/qmp/qdict.h"
 #include "qemu/iov.h"
 #include "qemu/sockets.h"
tests/qtest/test-hmp.c +1 -1
index d5e7ebd..aea1384 100644
@@ -15,7 +15,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 
 static int verbose;
 
tests/qtest/tpm-crb-swtpm-test.c +1 -1
index 55fdb56..1d82a48 100644
@@ -15,7 +15,7 @@
 #include "qemu/osdep.h"
 #include <glib/gstdio.h>
 
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "qemu/module.h"
 #include "tpm-tests.h"
 #include "hw/acpi/tpm.h"
tests/qtest/tpm-tis-device-swtpm-test.c +1 -1
index 7b20035..f7126ef 100644
@@ -16,7 +16,7 @@
 #include "qemu/osdep.h"
 #include <glib/gstdio.h>
 
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "qemu/module.h"
 #include "tpm-tests.h"
 #include "hw/acpi/tpm.h"
tests/qtest/tpm-tis-swtpm-test.c +1 -1
index 90131cb..fa590e6 100644
@@ -15,7 +15,7 @@
 #include "qemu/osdep.h"
 #include <glib/gstdio.h>
 
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "qemu/module.h"
 #include "tpm-tests.h"
 #include "hw/acpi/tpm.h"
tests/qtest/tpm-util.c +1 -1
index 58a9593..e2b29ef 100644
@@ -15,7 +15,7 @@
 #include "qemu/osdep.h"
 
 #include "hw/acpi/tpm.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "tpm-util.h"
 #include "qapi/qmp/qdict.h"
 
tests/qtest/tulip-test.c +1 -1
index 2fb6c4d..da16cbf 100644
@@ -8,7 +8,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "qemu/module.h"
 #include "libqos/qgraph.h"
 #include "libqos/pci.h"
tests/qtest/virtio-rng-test.c +1 -1
index 092ba13..e6b8cd8 100644
@@ -8,7 +8,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "qemu/module.h"
 #include "libqos/qgraph.h"
 #include "libqos/virtio-rng.h"
tests/qtest/virtio-test.c +1 -1
index f7c6afd..6313417 100644
@@ -8,7 +8,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "qemu/module.h"
 #include "libqos/qgraph.h"
 #include "libqos/pci.h"
tests/qtest/vmgenid-test.c +1 -1
index efba76e..6781a51 100644
@@ -14,7 +14,7 @@
 #include "hw/acpi/acpi-defs.h"
 #include "boot-sector.h"
 #include "acpi-utils.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "qapi/qmp/qdict.h"
 
 #define VGID_GUID "324e6eaf-d1d1-4bf6-bf41-b9bb6c91fb87"
tests/qtest/vmxnet3-test.c +1 -1
index a810252..97c23fd 100644
@@ -8,7 +8,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "qemu/module.h"
 #include "libqos/qgraph.h"
 #include "libqos/pci.h"
tests/qtest/wdt_ib700-test.c +1 -1
index 797288d..6c36e43 100644
@@ -8,7 +8,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "qapi/qmp/qdict.h"
 #include "qemu/timer.h"
 
tests/test-qga.c +1 -1
index d1b4c3e..4ac4c22 100644
@@ -4,7 +4,7 @@
 #include <sys/socket.h>
 #include <sys/un.h>
 
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "qapi/qmp/qdict.h"
 #include "qapi/qmp/qlist.h"
 
tests/test-qgraph.c +2 -3
index 5c7e457..267291c 100644
@@ -17,9 +17,8 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqtest.h"
-#include "libqos/qgraph.h"
-#include "libqos/qgraph_internal.h"
+#include "qtest/libqos/qgraph.h"
+#include "qtest/libqos/qgraph_internal.h"
 
 #define MACHINE_PC "x86_64/pc"
 #define MACHINE_RASPI2 "arm/raspi2"
Signature · 1 line
1.8.3.1
Reviewed-by on v1 66/147
#70 lore raw

Re: [PATCH 066/147] meson: convert tests/qtest to meson

Quoted 1 line · Paolo Bonzini

For the fuzzing changes in this patch:

-Alex

Quoted 2,973 lines
---
 meson.build                                      |   3 +
 tests/Makefile.include                           |  47 +---
 tests/meson.build                                |   1 +
 tests/qtest/Makefile.include                     | 332 -----------------------
 tests/qtest/ac97-test.c                          |   2 +-
 tests/qtest/acpi-utils.h                         |   2 +-
 tests/qtest/ahci-test.c                          |   2 +-
 tests/qtest/arm-cpu-features.c                   |   2 +-
 tests/qtest/boot-order-test.c                    |   2 +-
 tests/qtest/boot-sector.c                        |   2 +-
 tests/qtest/boot-sector.h                        |   2 +-
 tests/qtest/boot-serial-test.c                   |   2 +-
 tests/qtest/cdrom-test.c                         |   2 +-
 tests/qtest/dbus-vmstate-test.c                  |   2 +-
 tests/qtest/device-introspect-test.c             |   2 +-
 tests/qtest/device-plug-test.c                   |   2 +-
 tests/qtest/drive_del-test.c                     |   2 +-
 tests/qtest/ds1338-test.c                        |   2 +-
 tests/qtest/e1000-test.c                         |   2 +-
 tests/qtest/eepro100-test.c                      |   2 +-
 tests/qtest/endianness-test.c                    |   2 +-
 tests/qtest/es1370-test.c                        |   2 +-
 tests/qtest/fuzz/fuzz.c                          |   2 +-
 tests/qtest/fuzz/fuzz.h                          |   2 +-
 tests/qtest/fuzz/i440fx_fuzz.c                   |   2 +-
 tests/qtest/fuzz/qos_fuzz.c                      |   2 +-
 tests/qtest/fuzz/virtio_net_fuzz.c               |   2 +-
 tests/qtest/fw_cfg-test.c                        |   2 +-
 tests/qtest/hd-geo-test.c                        |   2 +-
 tests/qtest/hexloader-test.c                     |   2 +-
 tests/qtest/ide-test.c                           |   2 +-
 tests/qtest/ipoctal232-test.c                    |   2 +-
 tests/qtest/ivshmem-test.c                       |   2 +-
 tests/qtest/libqos/aarch64-xlnx-zcu102-machine.c |   4 +-
 tests/qtest/libqos/ahci.c                        |   6 +-
 tests/qtest/libqos/ahci.h                        |   6 +-
 tests/qtest/libqos/arm-imx25-pdk-machine.c       |   6 +-
 tests/qtest/libqos/arm-n800-machine.c            |   6 +-
 tests/qtest/libqos/arm-raspi2-machine.c          |   4 +-
 tests/qtest/libqos/arm-sabrelite-machine.c       |   4 +-
 tests/qtest/libqos/arm-smdkc210-machine.c        |   4 +-
 tests/qtest/libqos/arm-virt-machine.c            |   6 +-
 tests/qtest/libqos/arm-xilinx-zynq-a9-machine.c  |   4 +-
 tests/qtest/libqos/e1000e.c                      |   6 +-
 tests/qtest/libqos/e1000e.h                      |   2 +-
 tests/qtest/libqos/fw_cfg.c                      |   2 +-
 tests/qtest/libqos/i2c-imx.c                     |   2 +-
 tests/qtest/libqos/i2c-omap.c                    |   2 +-
 tests/qtest/libqos/i2c.c                         |   2 +-
 tests/qtest/libqos/i2c.h                         |   2 +-
 tests/qtest/libqos/libqos-pc.c                   |   6 +-
 tests/qtest/libqos/libqos-pc.h                   |   2 +-
 tests/qtest/libqos/libqos-spapr.c                |   6 +-
 tests/qtest/libqos/libqos-spapr.h                |   2 +-
 tests/qtest/libqos/libqos.c                      |   4 +-
 tests/qtest/libqos/libqos.h                      |   4 +-
 tests/qtest/{ => libqos}/libqtest.h              |   0
 tests/qtest/libqos/malloc-pc.c                   |   4 +-
 tests/qtest/libqos/malloc-pc.h                   |   2 +-
 tests/qtest/libqos/malloc-spapr.c                |   2 +-
 tests/qtest/libqos/malloc-spapr.h                |   2 +-
 tests/qtest/libqos/malloc.c                      |   2 +-
 tests/qtest/libqos/meson.build                   |  57 ++++
 tests/qtest/libqos/pci-pc.c                      |   2 +-
 tests/qtest/libqos/pci-pc.h                      |   6 +-
 tests/qtest/libqos/pci-spapr.c                   |   6 +-
 tests/qtest/libqos/pci-spapr.h                   |   6 +-
 tests/qtest/libqos/pci.c                         |   4 +-
 tests/qtest/libqos/pci.h                         |   2 +-
 tests/qtest/libqos/ppc64_pseries-machine.c       |   4 +-
 tests/qtest/libqos/qgraph.c                      |   4 +-
 tests/qtest/libqos/qgraph.h                      |   6 +-
 tests/qtest/libqos/qgraph_internal.h             |   4 +-
 tests/qtest/libqos/qos_external.c                |   8 +-
 tests/qtest/libqos/qos_external.h                |   4 +-
 tests/qtest/libqos/rtas.c                        |   2 +-
 tests/qtest/libqos/rtas.h                        |   2 +-
 tests/qtest/libqos/sdhci.c                       |   2 +-
 tests/qtest/libqos/sdhci.h                       |   2 +-
 tests/qtest/libqos/tpci200.c                     |   4 +-
 tests/qtest/libqos/usb.c                         |   2 +-
 tests/qtest/libqos/usb.h                         |   2 +-
 tests/qtest/libqos/virtio-9p.c                   |   4 +-
 tests/qtest/libqos/virtio-9p.h                   |   6 +-
 tests/qtest/libqos/virtio-balloon.c              |   4 +-
 tests/qtest/libqos/virtio-balloon.h              |   6 +-
 tests/qtest/libqos/virtio-blk.c                  |   4 +-
 tests/qtest/libqos/virtio-blk.h                  |   6 +-
 tests/qtest/libqos/virtio-mmio.c                 |   8 +-
 tests/qtest/libqos/virtio-mmio.h                 |   4 +-
 tests/qtest/libqos/virtio-net.c                  |   4 +-
 tests/qtest/libqos/virtio-net.h                  |   6 +-
 tests/qtest/libqos/virtio-pci.c                  |  14 +-
 tests/qtest/libqos/virtio-pci.h                  |   6 +-
 tests/qtest/libqos/virtio-rng.c                  |   4 +-
 tests/qtest/libqos/virtio-rng.h                  |   6 +-
 tests/qtest/libqos/virtio-scsi.c                 |   4 +-
 tests/qtest/libqos/virtio-scsi.h                 |   6 +-
 tests/qtest/libqos/virtio-serial.c               |   4 +-
 tests/qtest/libqos/virtio-serial.h               |   6 +-
 tests/qtest/libqos/virtio.c                      |   2 +-
 tests/qtest/libqos/virtio.h                      |   2 +-
 tests/qtest/libqos/x86_64_pc-machine.c           |   2 +-
 tests/qtest/libqtest-single.h                    |   2 +-
 tests/qtest/libqtest.c                           |   2 +-
 tests/qtest/m48t59-test.c                        |   2 +-
 tests/qtest/machine-none-test.c                  |   2 +-
 tests/qtest/megasas-test.c                       |   2 +-
 tests/qtest/meson.build                          | 257 ++++++++++++++++++
 tests/qtest/microbit-test.c                      |   2 +-
 tests/qtest/migration-helpers.h                  |   2 +-
 tests/qtest/migration-test.c                     |   4 +-
 tests/qtest/modules-test.c                       |   2 +-
 tests/qtest/ne2000-test.c                        |   2 +-
 tests/qtest/numa-test.c                          |   2 +-
 tests/qtest/nvme-test.c                          |   2 +-
 tests/qtest/pca9552-test.c                       |   2 +-
 tests/qtest/pci-test.c                           |   2 +-
 tests/qtest/pcnet-test.c                         |   2 +-
 tests/qtest/pflash-cfi02-test.c                  |   2 +-
 tests/qtest/pnv-xscom-test.c                     |   2 +-
 tests/qtest/prom-env-test.c                      |   2 +-
 tests/qtest/pvpanic-test.c                       |   2 +-
 tests/qtest/pxe-test.c                           |   2 +-
 tests/qtest/q35-test.c                           |   2 +-
 tests/qtest/qmp-cmd-test.c                       |   2 +-
 tests/qtest/qmp-test.c                           |   2 +-
 tests/qtest/qom-test.c                           |   2 +-
 tests/qtest/rtas-test.c                          |   2 +-
 tests/qtest/sdhci-test.c                         |   2 +-
 tests/qtest/spapr-phb-test.c                     |   2 +-
 tests/qtest/tco-test.c                           |   2 +-
 tests/qtest/test-filter-mirror.c                 |   2 +-
 tests/qtest/test-filter-redirector.c             |   2 +-
 tests/qtest/test-hmp.c                           |   2 +-
 tests/qtest/tpm-crb-swtpm-test.c                 |   2 +-
 tests/qtest/tpm-tis-device-swtpm-test.c          |   2 +-
 tests/qtest/tpm-tis-swtpm-test.c                 |   2 +-
 tests/qtest/tpm-util.c                           |   2 +-
 tests/qtest/tulip-test.c                         |   2 +-
 tests/qtest/virtio-rng-test.c                    |   2 +-
 tests/qtest/virtio-test.c                        |   2 +-
 tests/qtest/vmgenid-test.c                       |   2 +-
 tests/qtest/vmxnet3-test.c                       |   2 +-
 tests/qtest/wdt_ib700-test.c                     |   2 +-
 tests/test-qga.c                                 |   2 +-
 tests/test-qgraph.c                              |   5 +-
 147 files changed, 541 insertions(+), 589 deletions(-)
 delete mode 100644 tests/qtest/Makefile.include
 rename tests/qtest/{ => libqos}/libqtest.h (100%)
 create mode 100644 tests/qtest/libqos/meson.build
 create mode 100644 tests/qtest/meson.build
meson.build +3 -0
index 534ed4c..2ff1be0 100644
@@ -523,6 +523,9 @@ subdir('nbd')
 subdir('scsi')
 subdir('block')
 
+# needed for fuzzing binaries
+subdir('tests/qtest/libqos')
+
 mods = []
 block_mods = []
 softmmu_mods = []
tests/Makefile.include +6 -41
index 676d099..66acf9c 100644
@@ -109,6 +109,7 @@ check-unit-y += tests/test-qht$(EXESUF)
 check-unit-y += tests/test-qht-par$(EXESUF)
 check-unit-y += tests/test-bitops$(EXESUF)
 check-unit-y += tests/test-bitcnt$(EXESUF)
+check-unit-y += tests/test-qgraph$(EXESUF)
 check-unit-y += tests/check-qom-interface$(EXESUF)
 check-unit-y += tests/check-qom-proplist$(EXESUF)
 check-unit-y += tests/test-qemu-opts$(EXESUF)
@@ -306,19 +307,6 @@ tests/test-qapi-gen-timestamp: \
 	@rm -f tests/test-qapi-doc.texi
 	@>$@
 
-tests/qtest/dbus-vmstate1.h tests/qtest/dbus-vmstate1.c: tests/qtest/dbus-vmstate1-gen-timestamp ;
-tests/qtest/dbus-vmstate1-gen-timestamp: $(SRC_PATH)/tests/qtest/dbus-vmstate1.xml
-	$(call quiet-command,$(GDBUS_CODEGEN) $< \
-		--interface-prefix org.qemu --generate-c-code tests/qtest/dbus-vmstate1, \
-		"GEN","$(@:%-timestamp=%)")
-	@>$@
-
-tests/qtest/dbus-vmstate-test.o-cflags := -DSRCDIR="$(SRC_PATH)"
-tests/qtest/dbus-vmstate1.o-cflags := $(GIO_CFLAGS)
-tests/qtest/dbus-vmstate1.o-libs := $(GIO_LIBS)
-
-tests/qtest/dbus-vmstate-test.o: tests/qtest/dbus-vmstate1.h
-
 tests/test-string-output-visitor$(EXESUF): tests/test-string-output-visitor.o $(test-qapi-obj-y)
 tests/test-string-input-visitor$(EXESUF): tests/test-string-input-visitor.o $(test-qapi-obj-y)
 tests/test-qmp-event$(EXESUF): tests/test-qmp-event.o $(test-qapi-obj-y) tests/test-qapi-emit-events.o tests/test-qapi-events.o
@@ -333,6 +321,7 @@ tests/test-shift128$(EXESUF): tests/test-shift128.o $(test-util-obj-y)
 tests/test-mul64$(EXESUF): tests/test-mul64.o $(test-util-obj-y)
 tests/test-bitops$(EXESUF): tests/test-bitops.o $(test-util-obj-y)
 tests/test-bitcnt$(EXESUF): tests/test-bitcnt.o $(test-util-obj-y)
+tests/test-qgraph$(EXESUF): tests/test-qgraph.o tests/qtest/libqos/qgraph.o $(test-util-obj-y)
 tests/test-crypto-hash$(EXESUF): tests/test-crypto-hash.o $(test-crypto-obj-y)
 tests/benchmark-crypto-hash$(EXESUF): tests/benchmark-crypto-hash.o $(test-crypto-obj-y)
 tests/test-crypto-hmac$(EXESUF): tests/test-crypto-hmac.o $(test-crypto-obj-y)
@@ -396,10 +385,8 @@ tests/migration/initrd-stress.img: tests/migration/stress$(EXESUF)
 	rm $(INITRD_WORK_DIR)/init
 	rmdir $(INITRD_WORK_DIR)
 
-include $(SRC_PATH)/tests/qtest/Makefile.include
-
 tests/test-qga$(EXESUF): qga/qemu-ga$(EXESUF)
-tests/test-qga$(EXESUF): tests/test-qga.o $(qtest-obj-y)
+tests/test-qga$(EXESUF): tests/test-qga.o tests/qtest/libqtest.o $(test-util-obj-y)
 tests/vhost-user-bridge$(EXESUF): tests/vhost-user-bridge.o $(test-util-obj-y) libvhost-user.a
 tests/qemu-iotests/socket_scm_helper$(EXESUF): tests/qemu-iotests/socket_scm_helper.o
 
@@ -440,14 +427,6 @@ define do_test_tap
 	  "TAP","$@")
 endef
 
-.PHONY: $(patsubst %, check-qtest-%, $(QTEST_TARGETS))
-$(patsubst %, check-qtest-%, $(QTEST_TARGETS)): check-qtest-%: %-softmmu/all $(check-qtest-y)
-	$(call do_test_human,$(check-qtest-$*-y:%=tests/qtest/%$(EXESUF)) $(check-qtest-generic-y:%=tests/qtest/%$(EXESUF)), \
-	  QTEST_QEMU_BINARY=$*-softmmu/qemu-system-$* \
-	  QTEST_QEMU_IMG=qemu-img$(EXESUF))
-
-build-qtest: $(patsubst %, %-softmmu/all, $(QTEST_TARGETS)) $(check-qtest-y)
-
 build-unit: $(check-unit-y)
 
 check-unit: $(check-unit-y)
@@ -458,18 +437,9 @@ check-speed: $(check-speed-y)
 
 # gtester tests with TAP output
 
-$(patsubst %, check-report-qtest-%.tap, $(QTEST_TARGETS)): check-report-qtest-%.tap: %-softmmu/all $(check-qtest-y)
-	$(call do_test_tap, $(check-qtest-$*-y:%=tests/qtest/%$(EXESUF)) $(check-qtest-generic-y:%=tests/qtest/%$(EXESUF)), \
-	  QTEST_QEMU_BINARY=$*-softmmu/qemu-system-$* \
-	  QTEST_QEMU_IMG=qemu-img$(EXESUF))
-
 check-report-unit.tap: $(check-unit-y)
 	$(call do_test_tap,$^)
 
-# Reports and overall runs
-
-check-report.tap: $(patsubst %,check-report-qtest-%.tap, $(QTEST_TARGETS)) check-report-unit.tap
-
 # Plugins
 ifeq ($(CONFIG_PLUGIN),y)
 .PHONY: plugins
@@ -580,19 +550,16 @@ check-acceptance: check-venv $(TESTS_RESULTS_DIR) get-vm-images
 
 # Consolidated targets
 
-.PHONY: check-block check-qtest check-unit check check-clean get-vm-images
-check-qtest: $(patsubst %,check-qtest-%, $(QTEST_TARGETS))
+.PHONY: check-block check-unit check check-clean get-vm-images
 ifeq ($(CONFIG_TOOLS),y)
 check-block: $(patsubst %,check-%, $(check-block-y))
 endif
-check-build: build-unit build-qtest
+check-build: build-unit
 
-check: check-block check-unit check-qtest
+check: check-block check-unit
 check-clean:
 	rm -rf $(check-unit-y) tests/*.o tests/*/*.o $(QEMU_IOTESTS_HELPERS-y)
-	rm -rf $(sort $(foreach target,$(SYSEMU_TARGET_LIST), $(check-qtest-$(target)-y:%=tests/qtest/%$(EXESUF))) $(check-qtest-generic-y:%=tests/qtest/%$(EXESUF)))
 	rm -f tests/test-qapi-gen-timestamp
-	rm -f tests/qtest/dbus-vmstate1-gen-timestamp
 	rm -rf $(TESTS_VENV_DIR) $(TESTS_RESULTS_DIR)
 
 check: check-block check-qapi-schema check-unit check-qtest check-decodetree
@@ -604,7 +571,5 @@ clean: check-clean
 all: $(QEMU_IOTESTS_HELPERS-y)
 
 -include $(wildcard tests/*.d)
--include $(wildcard tests/qtest/*.d)
--include $(wildcard tests/qtest/libqos/*.d)
 
 endif
tests/meson.build +1 -0
index 8be9c22..d724402 100644
@@ -8,3 +8,4 @@ if 'CONFIG_TCG' in config_host
 endif
 
 subdir('qapi-schema')
+subdir('qtest')
tests/qtest/Makefile.include deleted +0 -332
deleted file mode 100644
index b0204e4..0000000
@@ -1,332 +0,0 @@
-# All QTests for now are POSIX-only, but the dependencies are
-# really in libqtest, not in the testcases themselves.
-
-check-qtest-generic-y += cdrom-test
-check-qtest-generic-y += device-introspect-test
-check-qtest-generic-y += machine-none-test
-check-qtest-generic-y += qmp-test
-check-qtest-generic-y += qmp-cmd-test
-check-qtest-generic-y += qom-test
-check-qtest-generic-$(CONFIG_MODULES) += modules-test
-check-qtest-generic-y += test-hmp
-
-check-qtest-pci-$(CONFIG_RTL8139_PCI) += rtl8139-test
-check-qtest-pci-$(CONFIG_VGA) += display-vga-test
-check-qtest-pci-$(CONFIG_HDA) += intel-hda-test
-check-qtest-pci-$(CONFIG_IVSHMEM_DEVICE) += ivshmem-test
-
-DBUS_DAEMON := $(shell which dbus-daemon 2>/dev/null)
-ifneq ($(GDBUS_CODEGEN),)
-ifneq ($(DBUS_DAEMON),)
-# Temporarily disabled due to Patchew failures:
-#check-qtest-pci-$(CONFIG_GIO) += dbus-vmstate-test
-endif
-endif
-
-check-qtest-i386-$(CONFIG_ISA_TESTDEV) = endianness-test
-check-qtest-i386-y += fdc-test
-check-qtest-i386-y += ide-test
-check-qtest-i386-$(CONFIG_TOOLS) += ahci-test
-check-qtest-i386-y += hd-geo-test
-check-qtest-i386-y += boot-order-test
-check-qtest-i386-y += bios-tables-test
-check-qtest-i386-$(CONFIG_SGA) += boot-serial-test
-check-qtest-i386-$(CONFIG_SLIRP) += pxe-test
-check-qtest-i386-y += rtc-test
-check-qtest-i386-$(CONFIG_ISA_IPMI_KCS) += ipmi-kcs-test
-ifdef CONFIG_LINUX
-check-qtest-i386-$(CONFIG_ISA_IPMI_BT) += ipmi-bt-test
-endif
-check-qtest-i386-y += i440fx-test
-check-qtest-i386-y += fw_cfg-test
-check-qtest-i386-y += device-plug-test
-check-qtest-i386-y += drive_del-test
-check-qtest-i386-$(CONFIG_WDT_IB700) += wdt_ib700-test
-check-qtest-i386-y += tco-test
-check-qtest-i386-y += $(check-qtest-pci-y)
-check-qtest-i386-$(CONFIG_PVPANIC) += pvpanic-test
-check-qtest-i386-$(CONFIG_I82801B11) += i82801b11-test
-check-qtest-i386-$(CONFIG_IOH3420) += ioh3420-test
-check-qtest-i386-$(CONFIG_USB_UHCI) += usb-hcd-uhci-test
-check-qtest-i386-$(call land,$(CONFIG_USB_EHCI),$(CONFIG_USB_UHCI)) += usb-hcd-ehci-test
-check-qtest-i386-$(CONFIG_USB_XHCI_NEC) += usb-hcd-xhci-test
-check-qtest-i386-y += cpu-plug-test
-check-qtest-i386-y += q35-test
-check-qtest-i386-y += vmgenid-test
-check-qtest-i386-$(CONFIG_TPM_CRB) += tpm-crb-swtpm-test
-check-qtest-i386-$(CONFIG_TPM_CRB) += tpm-crb-test
-check-qtest-i386-$(CONFIG_TPM_TIS_ISA) += tpm-tis-swtpm-test
-check-qtest-i386-$(CONFIG_TPM_TIS_ISA) += tpm-tis-test
-check-qtest-i386-$(CONFIG_SLIRP) += test-netfilter
-check-qtest-i386-$(CONFIG_POSIX) += test-filter-mirror
-check-qtest-i386-$(CONFIG_RTL8139_PCI) += test-filter-redirector
-check-qtest-i386-y += migration-test
-check-qtest-i386-y += test-x86-cpuid-compat
-check-qtest-i386-y += numa-test
-
-check-qtest-x86_64-y += $(check-qtest-i386-y)
-
-check-qtest-avr-y += boot-serial-test
-
-check-qtest-alpha-y += boot-serial-test
-check-qtest-alpha-$(CONFIG_VGA) += display-vga-test
-
-check-qtest-hppa-y += boot-serial-test
-check-qtest-hppa-$(CONFIG_VGA) += display-vga-test
-
-check-qtest-m68k-y = boot-serial-test
-
-check-qtest-microblaze-y += boot-serial-test
-
-check-qtest-mips-$(CONFIG_ISA_TESTDEV) = endianness-test
-check-qtest-mips-$(CONFIG_VGA) += display-vga-test
-
-check-qtest-mips64-$(CONFIG_ISA_TESTDEV) = endianness-test
-check-qtest-mips64-$(CONFIG_VGA) += display-vga-test
-
-check-qtest-mips64el-$(CONFIG_ISA_TESTDEV) = endianness-test
-check-qtest-mips64el-$(CONFIG_VGA) += display-vga-test
-
-check-qtest-moxie-y += boot-serial-test
-
-check-qtest-ppc-$(CONFIG_ISA_TESTDEV) = endianness-test
-check-qtest-ppc-y += boot-order-test
-check-qtest-ppc-y += prom-env-test
-check-qtest-ppc-y += drive_del-test
-check-qtest-ppc-y += boot-serial-test
-check-qtest-ppc-$(CONFIG_M48T59) += m48t59-test
-
-check-qtest-ppc64-y += $(check-qtest-ppc-y)
-check-qtest-ppc64-$(CONFIG_PSERIES) += device-plug-test
-check-qtest-ppc64-$(CONFIG_POWERNV) += pnv-xscom-test
-check-qtest-ppc64-y += migration-test
-check-qtest-ppc64-$(CONFIG_PSERIES) += rtas-test
-check-qtest-ppc64-$(CONFIG_SLIRP) += pxe-test
-check-qtest-ppc64-$(CONFIG_USB_UHCI) += usb-hcd-uhci-test
-check-qtest-ppc64-$(CONFIG_USB_XHCI_NEC) += usb-hcd-xhci-test
-check-qtest-ppc64-$(CONFIG_SLIRP) += test-netfilter
-check-qtest-ppc64-$(CONFIG_POSIX) += test-filter-mirror
-check-qtest-ppc64-$(CONFIG_RTL8139_PCI) += test-filter-redirector
-check-qtest-ppc64-$(CONFIG_VGA) += display-vga-test
-check-qtest-ppc64-y += numa-test
-check-qtest-ppc64-$(CONFIG_IVSHMEM_DEVICE) += ivshmem-test
-check-qtest-ppc64-y += cpu-plug-test
-
-check-qtest-sh4-$(CONFIG_ISA_TESTDEV) = endianness-test
-
-check-qtest-sh4eb-$(CONFIG_ISA_TESTDEV) = endianness-test
-
-check-qtest-sparc-y += prom-env-test
-check-qtest-sparc-y += m48t59-test
-check-qtest-sparc-y += boot-serial-test
-
-check-qtest-sparc64-$(CONFIG_ISA_TESTDEV) = endianness-test
-check-qtest-sparc64-y += prom-env-test
-check-qtest-sparc64-y += boot-serial-test
-
-check-qtest-arm-y += arm-cpu-features
-check-qtest-arm-y += microbit-test
-check-qtest-arm-y += m25p80-test
-check-qtest-arm-y += test-arm-mptimer
-check-qtest-arm-y += boot-serial-test
-check-qtest-arm-y += hexloader-test
-check-qtest-arm-$(CONFIG_PFLASH_CFI02) += pflash-cfi02-test
-
-check-qtest-aarch64-y += arm-cpu-features
-check-qtest-aarch64-$(CONFIG_TPM_TIS_SYSBUS) += tpm-tis-device-test
-check-qtest-aarch64-$(CONFIG_TPM_TIS_SYSBUS) += tpm-tis-device-swtpm-test
-check-qtest-aarch64-y += numa-test
-check-qtest-aarch64-y += boot-serial-test
-check-qtest-aarch64-y += migration-test
-
-# TODO: once aarch64 TCG is fixed on ARM 32 bit host, make test unconditional
-ifneq ($(ARCH),arm)
-check-qtest-aarch64-y += bios-tables-test
-endif
-
-check-qtest-microblazeel-y += $(check-qtest-microblaze-y)
-
-check-qtest-xtensaeb-y += $(check-qtest-xtensa-y)
-
-check-qtest-s390x-y = boot-serial-test
-check-qtest-s390x-$(CONFIG_SLIRP) += pxe-test
-check-qtest-s390x-$(CONFIG_SLIRP) += test-netfilter
-check-qtest-s390x-$(CONFIG_POSIX) += test-filter-mirror
-check-qtest-s390x-$(CONFIG_POSIX) += test-filter-redirector
-check-qtest-s390x-y += drive_del-test
-check-qtest-s390x-y += device-plug-test
-check-qtest-s390x-y += virtio-ccw-test
-check-qtest-s390x-y += cpu-plug-test
-check-qtest-s390x-y += migration-test
-
-# libqos / qgraph :
-libqgraph-obj-y = tests/qtest/libqos/qgraph.o
-
-libqos-core-obj-y = $(libqgraph-obj-y) tests/qtest/libqos/pci.o tests/qtest/libqos/fw_cfg.o
-libqos-core-obj-y += tests/qtest/libqos/malloc.o
-libqos-core-obj-y += tests/qtest/libqos/libqos.o
-libqos-spapr-obj-y = $(libqos-core-obj-y) tests/qtest/libqos/malloc-spapr.o
-libqos-spapr-obj-y += tests/qtest/libqos/libqos-spapr.o
-libqos-spapr-obj-y += tests/qtest/libqos/rtas.o
-libqos-spapr-obj-y += tests/qtest/libqos/pci-spapr.o
-libqos-pc-obj-y = $(libqos-core-obj-y) tests/qtest/libqos/pci-pc.o
-libqos-pc-obj-y += tests/qtest/libqos/malloc-pc.o tests/qtest/libqos/libqos-pc.o
-libqos-pc-obj-y += tests/qtest/libqos/ahci.o
-libqos-usb-obj-y = $(libqos-spapr-obj-y) $(libqos-pc-obj-y) tests/qtest/libqos/usb.o
-
-# qos devices:
-libqos-obj-y =  $(libqgraph-obj-y)
-libqos-obj-y += $(libqos-pc-obj-y) $(libqos-spapr-obj-y)
-libqos-obj-y += tests/qtest/libqos/qos_external.o
-libqos-obj-y += tests/qtest/libqos/e1000e.o
-libqos-obj-y += tests/qtest/libqos/i2c.o
-libqos-obj-y += tests/qtest/libqos/i2c-imx.o
-libqos-obj-y += tests/qtest/libqos/i2c-omap.o
-libqos-obj-y += tests/qtest/libqos/sdhci.o
-libqos-obj-y += tests/qtest/libqos/tpci200.o
-libqos-obj-y += tests/qtest/libqos/virtio.o
-libqos-obj-$(CONFIG_VIRTFS) += tests/qtest/libqos/virtio-9p.o
-libqos-obj-y += tests/qtest/libqos/virtio-balloon.o
-libqos-obj-y += tests/qtest/libqos/virtio-blk.o
-libqos-obj-y += tests/qtest/libqos/virtio-mmio.o
-libqos-obj-y += tests/qtest/libqos/virtio-net.o
-libqos-obj-y += tests/qtest/libqos/virtio-pci.o
-libqos-obj-y += tests/qtest/libqos/virtio-pci-modern.o
-libqos-obj-y += tests/qtest/libqos/virtio-rng.o
-libqos-obj-y += tests/qtest/libqos/virtio-scsi.o
-libqos-obj-y += tests/qtest/libqos/virtio-serial.o
-
-# qos machines:
-libqos-obj-y += tests/qtest/libqos/aarch64-xlnx-zcu102-machine.o
-libqos-obj-y += tests/qtest/libqos/arm-imx25-pdk-machine.o
-libqos-obj-y += tests/qtest/libqos/arm-n800-machine.o
-libqos-obj-y += tests/qtest/libqos/arm-raspi2-machine.o
-libqos-obj-y += tests/qtest/libqos/arm-sabrelite-machine.o
-libqos-obj-y += tests/qtest/libqos/arm-smdkc210-machine.o
-libqos-obj-y += tests/qtest/libqos/arm-virt-machine.o
-libqos-obj-y += tests/qtest/libqos/arm-xilinx-zynq-a9-machine.o
-libqos-obj-y += tests/qtest/libqos/ppc64_pseries-machine.o
-libqos-obj-y += tests/qtest/libqos/x86_64_pc-machine.o
-
-# qos tests:
-qos-test-obj-y += tests/qtest/qos-test.o
-qos-test-obj-y += tests/qtest/ac97-test.o
-qos-test-obj-y += tests/qtest/ds1338-test.o
-qos-test-obj-y += tests/qtest/e1000-test.o
-qos-test-obj-y += tests/qtest/e1000e-test.o
-qos-test-obj-y += tests/qtest/eepro100-test.o
-qos-test-obj-y += tests/qtest/es1370-test.o
-qos-test-obj-y += tests/qtest/ipoctal232-test.o
-qos-test-obj-y += tests/qtest/megasas-test.o
-qos-test-obj-y += tests/qtest/ne2000-test.o
-qos-test-obj-y += tests/qtest/tulip-test.o
-qos-test-obj-y += tests/qtest/nvme-test.o
-qos-test-obj-y += tests/qtest/pca9552-test.o
-qos-test-obj-y += tests/qtest/pci-test.o
-qos-test-obj-y += tests/qtest/pcnet-test.o
-qos-test-obj-y += tests/qtest/sdhci-test.o
-qos-test-obj-y += tests/qtest/spapr-phb-test.o
-qos-test-obj-y += tests/qtest/tmp105-test.o
-qos-test-obj-y += tests/qtest/usb-hcd-ohci-test.o $(libqos-usb-obj-y)
-qos-test-obj-$(CONFIG_VHOST_NET_USER) += tests/qtest/vhost-user-test.o $(chardev-obj-y) $(test-io-obj-y)
-qos-test-obj-y += tests/qtest/virtio-test.o
-qos-test-obj-$(CONFIG_VIRTFS) += tests/qtest/virtio-9p-test.o
-qos-test-obj-y += tests/qtest/virtio-blk-test.o
-qos-test-obj-y += tests/qtest/virtio-net-test.o
-qos-test-obj-y += tests/qtest/virtio-rng-test.o
-qos-test-obj-y += tests/qtest/virtio-scsi-test.o
-qos-test-obj-y += tests/qtest/virtio-serial-test.o
-qos-test-obj-y += tests/qtest/vmxnet3-test.o
-
-check-unit-y += tests/test-qgraph$(EXESUF)
-tests/test-qgraph$(EXESUF): tests/test-qgraph.o $(libqgraph-obj-y)
-
-check-qtest-generic-y += qos-test
-tests/qtest/qos-test$(EXESUF): $(qos-test-obj-y) $(libqos-obj-y)
-
-# QTest dependencies:
-tests/qtest/qmp-test$(EXESUF): tests/qtest/qmp-test.o
-tests/qtest/qmp-cmd-test$(EXESUF): tests/qtest/qmp-cmd-test.o
-tests/qtest/device-introspect-test$(EXESUF): tests/qtest/device-introspect-test.o
-tests/qtest/rtc-test$(EXESUF): tests/qtest/rtc-test.o
-tests/qtest/m48t59-test$(EXESUF): tests/qtest/m48t59-test.o
-tests/qtest/hexloader-test$(EXESUF): tests/qtest/hexloader-test.o
-tests/qtest/pflash-cfi02$(EXESUF): tests/qtest/pflash-cfi02-test.o
-tests/qtest/endianness-test$(EXESUF): tests/qtest/endianness-test.o
-tests/qtest/prom-env-test$(EXESUF): tests/qtest/prom-env-test.o $(libqos-obj-y)
-tests/qtest/rtas-test$(EXESUF): tests/qtest/rtas-test.o $(libqos-spapr-obj-y)
-tests/qtest/fdc-test$(EXESUF): tests/qtest/fdc-test.o
-tests/qtest/ide-test$(EXESUF): tests/qtest/ide-test.o $(libqos-pc-obj-y)
-tests/qtest/ahci-test$(EXESUF): tests/qtest/ahci-test.o $(libqos-pc-obj-y) qemu-img$(EXESUF)
-tests/qtest/ipmi-kcs-test$(EXESUF): tests/qtest/ipmi-kcs-test.o
-tests/qtest/ipmi-bt-test$(EXESUF): tests/qtest/ipmi-bt-test.o
-tests/qtest/hd-geo-test$(EXESUF): tests/qtest/hd-geo-test.o $(libqos-obj-y)
-tests/qtest/boot-order-test$(EXESUF): tests/qtest/boot-order-test.o $(libqos-obj-y)
-tests/qtest/boot-serial-test$(EXESUF): tests/qtest/boot-serial-test.o $(libqos-obj-y)
-tests/qtest/bios-tables-test$(EXESUF): tests/qtest/bios-tables-test.o \
-        tests/qtest/tpm-emu.o $(test-io-obj-y) \
-	tests/qtest/boot-sector.o tests/qtest/acpi-utils.o $(libqos-obj-y)
-tests/qtest/pxe-test$(EXESUF): tests/qtest/pxe-test.o tests/qtest/boot-sector.o $(libqos-obj-y)
-tests/qtest/microbit-test$(EXESUF): tests/qtest/microbit-test.o
-tests/qtest/m25p80-test$(EXESUF): tests/qtest/m25p80-test.o
-tests/qtest/i440fx-test$(EXESUF): tests/qtest/i440fx-test.o $(libqos-pc-obj-y)
-tests/qtest/q35-test$(EXESUF): tests/qtest/q35-test.o $(libqos-pc-obj-y)
-tests/qtest/fw_cfg-test$(EXESUF): tests/qtest/fw_cfg-test.o $(libqos-pc-obj-y)
-tests/qtest/rtl8139-test$(EXESUF): tests/qtest/rtl8139-test.o $(libqos-pc-obj-y)
-tests/qtest/pnv-xscom-test$(EXESUF): tests/qtest/pnv-xscom-test.o
-tests/qtest/wdt_ib700-test$(EXESUF): tests/qtest/wdt_ib700-test.o
-tests/qtest/tco-test$(EXESUF): tests/qtest/tco-test.o $(libqos-pc-obj-y)
-tests/qtest/virtio-ccw-test$(EXESUF): tests/qtest/virtio-ccw-test.o
-tests/qtest/display-vga-test$(EXESUF): tests/qtest/display-vga-test.o
-tests/qtest/qom-test$(EXESUF): tests/qtest/qom-test.o
-tests/qtest/modules-test$(EXESUF): tests/qtest/modules-test.o
-tests/qtest/test-hmp$(EXESUF): tests/qtest/test-hmp.o
-tests/qtest/machine-none-test$(EXESUF): tests/qtest/machine-none-test.o
-tests/qtest/device-plug-test$(EXESUF): tests/qtest/device-plug-test.o
-tests/qtest/drive_del-test$(EXESUF): tests/qtest/drive_del-test.o
-tests/qtest/pvpanic-test$(EXESUF): tests/qtest/pvpanic-test.o
-tests/qtest/i82801b11-test$(EXESUF): tests/qtest/i82801b11-test.o
-tests/qtest/intel-hda-test$(EXESUF): tests/qtest/intel-hda-test.o
-tests/qtest/ioh3420-test$(EXESUF): tests/qtest/ioh3420-test.o
-tests/qtest/usb-hcd-uhci-test$(EXESUF): tests/qtest/usb-hcd-uhci-test.o $(libqos-usb-obj-y)
-tests/qtest/usb-hcd-ehci-test$(EXESUF): tests/qtest/usb-hcd-ehci-test.o $(libqos-usb-obj-y)
-tests/qtest/usb-hcd-xhci-test$(EXESUF): tests/qtest/usb-hcd-xhci-test.o $(libqos-usb-obj-y)
-tests/qtest/cpu-plug-test$(EXESUF): tests/qtest/cpu-plug-test.o
-tests/qtest/migration-test$(EXESUF): tests/qtest/migration-test.o tests/qtest/migration-helpers.o
-tests/qtest/test-netfilter$(EXESUF): tests/qtest/test-netfilter.o $(qtest-obj-y)
-tests/qtest/test-filter-mirror$(EXESUF): tests/qtest/test-filter-mirror.o $(qtest-obj-y)
-tests/qtest/test-filter-redirector$(EXESUF): tests/qtest/test-filter-redirector.o $(qtest-obj-y)
-tests/qtest/test-x86-cpuid-compat$(EXESUF): tests/qtest/test-x86-cpuid-compat.o $(qtest-obj-y)
-tests/qtest/ivshmem-test$(EXESUF): tests/qtest/ivshmem-test.o contrib/ivshmem-server/ivshmem-server.o $(libqos-pc-obj-y) $(libqos-spapr-obj-y)
-tests/qtest/dbus-vmstate-test$(EXESUF): tests/qtest/dbus-vmstate-test.o tests/qtest/migration-helpers.o tests/qtest/dbus-vmstate1.o $(libqos-pc-obj-y) $(libqos-spapr-obj-y)
-tests/qtest/test-arm-mptimer$(EXESUF): tests/qtest/test-arm-mptimer.o
-tests/qtest/numa-test$(EXESUF): tests/qtest/numa-test.o
-tests/qtest/vmgenid-test$(EXESUF): tests/qtest/vmgenid-test.o tests/qtest/boot-sector.o tests/qtest/acpi-utils.o
-tests/qtest/cdrom-test$(EXESUF): tests/qtest/cdrom-test.o tests/qtest/boot-sector.o $(libqos-obj-y)
-tests/qtest/arm-cpu-features$(EXESUF): tests/qtest/arm-cpu-features.o
-tests/qtest/tpm-crb-swtpm-test$(EXESUF): tests/qtest/tpm-crb-swtpm-test.o tests/qtest/tpm-emu.o \
-	tests/qtest/tpm-util.o tests/qtest/tpm-tests.o $(test-io-obj-y)
-tests/qtest/tpm-crb-test$(EXESUF): tests/qtest/tpm-crb-test.o tests/qtest/tpm-emu.o $(test-io-obj-y)
-tests/qtest/tpm-tis-swtpm-test$(EXESUF): tests/qtest/tpm-tis-swtpm-test.o tests/qtest/tpm-emu.o \
-	tests/qtest/tpm-util.o tests/qtest/tpm-tests.o $(test-io-obj-y)
-tests/qtest/tpm-tis-device-swtpm-test$(EXESUF): tests/qtest/tpm-tis-device-swtpm-test.o tests/qtest/tpm-emu.o \
-	tests/qtest/tpm-util.o tests/qtest/tpm-tests.o $(test-io-obj-y)
-tests/qtest/tpm-tis-test$(EXESUF): tests/qtest/tpm-tis-test.o tests/qtest/tpm-tis-util.o tests/qtest/tpm-emu.o $(test-io-obj-y)
-tests/qtest/tpm-tis-device-test$(EXESUF): tests/qtest/tpm-tis-device-test.o tests/qtest/tpm-tis-util.o tests/qtest/tpm-emu.o $(test-io-obj-y)
-
-# QTest rules
-
-TARGETS=$(patsubst %-softmmu,%, $(filter %-softmmu,$(TARGET_DIRS)))
-QTEST_TARGETS =
-# The qtests are not runnable (yet) under TSan due to a known issue.
-# https://github.com/google/sanitizers/issues/1116
-ifndef CONFIG_TSAN
-ifeq ($(CONFIG_POSIX),y)
-QTEST_TARGETS = $(TARGETS)
-check-qtest-y=$(foreach TARGET,$(TARGETS), $(check-qtest-$(TARGET)-y:%=tests/qtest/%$(EXESUF)))
-check-qtest-y += $(check-qtest-generic-y:%=tests/qtest/%$(EXESUF))
-endif
-endif
-
-qtest-obj-y = tests/qtest/libqtest.o $(test-util-obj-y)
-$(check-qtest-y): $(qtest-obj-y)
tests/qtest/ac97-test.c +1 -1
index b084e31..e09f249 100644
@@ -8,7 +8,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "qemu/module.h"
 #include "libqos/qgraph.h"
 #include "libqos/pci.h"
tests/qtest/acpi-utils.h +1 -1
index 0c86780..261784d 100644
@@ -13,7 +13,7 @@
 #ifndef TEST_ACPI_UTILS_H
 #define TEST_ACPI_UTILS_H
 
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 
 /* DSDT and SSDTs format */
 typedef struct {
tests/qtest/ahci-test.c +1 -1
index c8d42ce..ca4294f 100644
@@ -25,7 +25,7 @@
 #include "qemu/osdep.h"
 #include <getopt.h>
 
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "libqos/libqos-pc.h"
 #include "libqos/ahci.h"
 #include "libqos/pci-pc.h"
tests/qtest/arm-cpu-features.c +1 -1
index f7e062c..77b5e30 100644
@@ -10,7 +10,7 @@
  */
 #include "qemu/osdep.h"
 #include "qemu/bitops.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "qapi/qmp/qdict.h"
 #include "qapi/qmp/qjson.h"
 
tests/qtest/boot-order-test.c +1 -1
index 2f1c072..fac580d 100644
@@ -12,7 +12,7 @@
 
 #include "qemu/osdep.h"
 #include "libqos/fw_cfg.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "qapi/qmp/qdict.h"
 #include "standard-headers/linux/qemu_fw_cfg.h"
 
tests/qtest/boot-sector.c +1 -1
index 9e66c6d..24df5c4 100644
@@ -13,7 +13,7 @@
 #include "qemu/osdep.h"
 #include "boot-sector.h"
 #include "qemu-common.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 
 #define LOW(x) ((x) & 0xff)
 #define HIGH(x) ((x) >> 8)
tests/qtest/boot-sector.h +1 -1
index 6ee6bb4..b339fde 100644
@@ -14,7 +14,7 @@
 #ifndef TEST_BOOT_SECTOR_H
 #define TEST_BOOT_SECTOR_H
 
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 
 /* Create boot disk file. fname must be a suitable string for mkstemp() */
 int boot_sector_init(char *fname);
tests/qtest/boot-serial-test.c +1 -1
index bfe7624..b6b1c23 100644
@@ -14,7 +14,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "libqos/libqos-spapr.h"
 
 static const uint8_t bios_avr[] = {
tests/qtest/cdrom-test.c +1 -1
index 833a050..e9afab6 100644
@@ -11,7 +11,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "boot-sector.h"
 #include "qapi/qmp/qdict.h"
 
tests/qtest/dbus-vmstate-test.c +1 -1
index 2e5e47d..aca9b98 100644
@@ -1,7 +1,7 @@
 #include "qemu/osdep.h"
 #include <glib/gstdio.h>
 #include <gio/gio.h>
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "qemu-common.h"
 #include "dbus-vmstate1.h"
 #include "migration-helpers.h"
tests/qtest/device-introspect-test.c +1 -1
index d68b785..9f22340 100644
@@ -22,7 +22,7 @@
 #include "qapi/qmp/qstring.h"
 #include "qapi/qmp/qdict.h"
 #include "qapi/qmp/qlist.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 
 const char common_args[] = "-nodefaults -machine none";
 
tests/qtest/device-plug-test.c +1 -1
index 318e422..9214892 100644
@@ -11,7 +11,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "qapi/qmp/qdict.h"
 #include "qapi/qmp/qstring.h"
 
tests/qtest/drive_del-test.c +1 -1
index 5f8839b..2ab11ad 100644
@@ -11,7 +11,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "libqos/virtio.h"
 #include "qapi/qmp/qdict.h"
 
tests/qtest/ds1338-test.c +1 -1
index f6ade9a..c5d46bc 100644
@@ -18,7 +18,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "libqos/i2c.h"
 
 #define DS1338_ADDR 0x68
tests/qtest/e1000-test.c +1 -1
index c387984..ea286d1 100644
@@ -8,7 +8,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "qemu/module.h"
 #include "libqos/qgraph.h"
 #include "libqos/pci.h"
tests/qtest/eepro100-test.c +1 -1
index 8dbffff..d72ad09 100644
@@ -8,7 +8,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "qemu/module.h"
 #include "libqos/qgraph.h"
 #include "libqos/pci.h"
tests/qtest/endianness-test.c +1 -1
index cc088ac..4e79e22 100644
@@ -13,7 +13,7 @@
 
 #include "qemu/osdep.h"
 
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "qemu/bswap.h"
 
 typedef struct TestCase TestCase;
tests/qtest/es1370-test.c +1 -1
index adccdac..2fd7fd2 100644
@@ -8,7 +8,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "qemu/module.h"
 #include "libqos/qgraph.h"
 #include "libqos/pci.h"
tests/qtest/fuzz/fuzz.c +1 -1
index 031594a..1ceea84 100644
@@ -20,7 +20,7 @@
 #include "sysemu/sysemu.h"
 #include "qemu/main-loop.h"
 #include "qemu/rcu.h"
-#include "tests/qtest/libqtest.h"
+#include "tests/qtest/libqos/libqtest.h"
 #include "tests/qtest/libqos/qgraph.h"
 #include "fuzz.h"
 
tests/qtest/fuzz/fuzz.h +1 -1
index 9ca3d10..8eb765e 100644
@@ -18,7 +18,7 @@
 #include "qemu/units.h"
 #include "qapi/error.h"
 
-#include "tests/qtest/libqtest.h"
+#include "tests/qtest/libqos/libqtest.h"
 
 /**
  * A libfuzzer fuzzing target
tests/qtest/fuzz/i440fx_fuzz.c +1 -1
index bf966d4..f45373f 100644
@@ -13,7 +13,7 @@
 #include "qemu/osdep.h"
 
 #include "qemu/main-loop.h"
-#include "tests/qtest/libqtest.h"
+#include "tests/qtest/libqos/libqtest.h"
 #include "tests/qtest/libqos/pci.h"
 #include "tests/qtest/libqos/pci-pc.h"
 #include "fuzz.h"
tests/qtest/fuzz/qos_fuzz.c +1 -1
index d52f3eb..b943577 100644
@@ -25,7 +25,7 @@
 #include "sysemu/sysemu.h"
 #include "qemu/main-loop.h"
 
-#include "tests/qtest/libqtest.h"
+#include "tests/qtest/libqos/libqtest.h"
 #include "tests/qtest/libqos/malloc.h"
 #include "tests/qtest/libqos/qgraph.h"
 #include "tests/qtest/libqos/qgraph_internal.h"
tests/qtest/fuzz/virtio_net_fuzz.c +1 -1
index a33bd73..277a9e2 100644
@@ -13,7 +13,7 @@
 #include "qemu/osdep.h"
 
 #include "standard-headers/linux/virtio_config.h"
-#include "tests/qtest/libqtest.h"
+#include "tests/qtest/libqos/libqtest.h"
 #include "tests/qtest/libqos/virtio-net.h"
 #include "fuzz.h"
 #include "fork_fuzz.h"
tests/qtest/fw_cfg-test.c +1 -1
index 5dc807b..95b3907 100644
@@ -12,7 +12,7 @@
 
 #include "qemu/osdep.h"
 
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "standard-headers/linux/qemu_fw_cfg.h"
 #include "libqos/fw_cfg.h"
 #include "qemu/bswap.h"
tests/qtest/hd-geo-test.c +1 -1
index 48e8e02..f7b7cfb 100644
@@ -19,7 +19,7 @@
 #include "qemu-common.h"
 #include "qemu/bswap.h"
 #include "qapi/qmp/qlist.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "libqos/fw_cfg.h"
 #include "libqos/libqos.h"
 #include "standard-headers/linux/qemu_fw_cfg.h"
tests/qtest/hexloader-test.c +1 -1
index 8b7aa2d..5615020 100644
@@ -10,7 +10,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 
 /* Load 'test.hex' and verify that the in-memory contents are as expected.
  * 'test.hex' is a memory test pattern stored in Hexadecimal Object
tests/qtest/ide-test.c +1 -1
index 5cfd97f..3f8081e 100644
@@ -25,7 +25,7 @@
 #include "qemu/osdep.h"
 
 
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "libqos/libqos.h"
 #include "libqos/pci-pc.h"
 #include "libqos/malloc-pc.h"
tests/qtest/ipoctal232-test.c +1 -1
index 53a8c9b..65ce10b 100644
@@ -8,7 +8,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "qemu/module.h"
 #include "libqos/qgraph.h"
 
tests/qtest/ivshmem-test.c +1 -1
index ecda256..d5c8b9f 100644
@@ -13,7 +13,7 @@
 #include "contrib/ivshmem-server/ivshmem-server.h"
 #include "libqos/libqos-pc.h"
 #include "libqos/libqos-spapr.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "qemu-common.h"
 
 #define TMPSHMSIZE (1 << 20)
tests/qtest/libqos/aarch64-xlnx-zcu102-machine.c +2 -2
index 8f827ae..79631cc 100644
@@ -19,8 +19,8 @@
 #include "qemu/osdep.h"
 #include "libqtest.h"
 #include "qemu/module.h"
-#include "libqos/malloc.h"
-#include "libqos/qgraph.h"
+#include "malloc.h"
+#include "qgraph.h"
 #include "sdhci.h"
 
 typedef struct QXlnxZCU102Machine QXlnxZCU102Machine;
tests/qtest/libqos/ahci.c +3 -3
index cc1b08e..2946abc 100644
@@ -25,8 +25,8 @@
 #include "qemu/osdep.h"
 
 #include "libqtest.h"
-#include "libqos/ahci.h"
-#include "libqos/pci-pc.h"
+#include "ahci.h"
+#include "pci-pc.h"
 
 #include "qemu-common.h"
 #include "qemu/host-utils.h"
@@ -579,7 +579,7 @@ void ahci_write_fis(AHCIQState *ahci, AHCICommand *cmd)
     /* NCQ commands use exclusively 8 bit fields and needs no adjustment.
      * Only the count field needs to be adjusted for non-NCQ commands.
      * The auxiliary FIS fields are defined per-command and are not currently
-     * implemented in libqos/ahci.o, but may or may not need to be flipped. */
+     * implemented in ahci.o, but may or may not need to be flipped. */
     if (!cmd->props->ncq) {
         tmp.count = cpu_to_le16(tmp.count);
     }
tests/qtest/libqos/ahci.h +3 -3
index 44ab110..88835b6 100644
@@ -25,9 +25,9 @@
  * THE SOFTWARE.
  */
 
-#include "libqos/libqos.h"
-#include "libqos/pci.h"
-#include "libqos/malloc-pc.h"
+#include "libqos.h"
+#include "pci.h"
+#include "malloc-pc.h"
 
 /*** Supplementary PCI Config Space IDs & Masks ***/
 #define PCI_DEVICE_ID_INTEL_Q35_AHCI   (0x2922)
tests/qtest/libqos/arm-imx25-pdk-machine.c +3 -3
index 0da3f19..6692adf 100644
@@ -20,9 +20,9 @@
 
 #include "qemu/osdep.h"
 #include "libqtest.h"
-#include "libqos/malloc.h"
-#include "libqos/qgraph.h"
-#include "libqos/i2c.h"
+#include "malloc.h"
+#include "qgraph.h"
+#include "i2c.h"
 
 #define ARM_PAGE_SIZE            4096
 #define IMX25_PDK_RAM_START      0x80000000
tests/qtest/libqos/arm-n800-machine.c +3 -3
index 35f8207..ff2049c 100644
@@ -20,9 +20,9 @@
 
 #include "qemu/osdep.h"
 #include "libqtest.h"
-#include "libqos/malloc.h"
-#include "libqos/qgraph.h"
-#include "libqos/i2c.h"
+#include "malloc.h"
+#include "qgraph.h"
+#include "i2c.h"
 
 #define ARM_PAGE_SIZE            4096
 #define N800_RAM_START      0x80000000
tests/qtest/libqos/arm-raspi2-machine.c +2 -2
index 8480d80..35bb470 100644
@@ -19,8 +19,8 @@
 #include "qemu/osdep.h"
 #include "libqtest.h"
 #include "qemu/module.h"
-#include "libqos/malloc.h"
-#include "libqos/qgraph.h"
+#include "malloc.h"
+#include "qgraph.h"
 #include "sdhci.h"
 
 #define ARM_PAGE_SIZE             4096
tests/qtest/libqos/arm-sabrelite-machine.c +2 -2
index f6e403b..72425f0 100644
@@ -19,8 +19,8 @@
 #include "qemu/osdep.h"
 #include "libqtest.h"
 #include "qemu/module.h"
-#include "libqos/malloc.h"
-#include "libqos/qgraph.h"
+#include "malloc.h"
+#include "qgraph.h"
 #include "sdhci.h"
 
 #define ARM_PAGE_SIZE            4096
tests/qtest/libqos/arm-smdkc210-machine.c +2 -2
index eebac7f..321b882 100644
@@ -19,8 +19,8 @@
 #include "qemu/osdep.h"
 #include "libqtest.h"
 #include "qemu/module.h"
-#include "libqos/malloc.h"
-#include "libqos/qgraph.h"
+#include "malloc.h"
+#include "qgraph.h"
 #include "sdhci.h"
 
 #define ARM_PAGE_SIZE             4096
tests/qtest/libqos/arm-virt-machine.c +3 -3
index 9316598..e0f5932 100644
@@ -19,9 +19,9 @@
 #include "qemu/osdep.h"
 #include "libqtest.h"
 #include "qemu/module.h"
-#include "libqos/malloc.h"
-#include "libqos/qgraph.h"
-#include "libqos/virtio-mmio.h"
+#include "malloc.h"
+#include "qgraph.h"
+#include "virtio-mmio.h"
 
 #define ARM_PAGE_SIZE               4096
 #define VIRTIO_MMIO_BASE_ADDR       0x0A003E00
tests/qtest/libqos/arm-xilinx-zynq-a9-machine.c +2 -2
index 473acce..56e53c7 100644
@@ -19,8 +19,8 @@
 #include "qemu/osdep.h"
 #include "libqtest.h"
 #include "qemu/module.h"
-#include "libqos/malloc.h"
-#include "libqos/qgraph.h"
+#include "malloc.h"
+#include "qgraph.h"
 #include "sdhci.h"
 
 typedef struct QXilinxZynqA9Machine QXilinxZynqA9Machine;
tests/qtest/libqos/e1000e.c +3 -3
index e2927ed..a451f61 100644
@@ -18,13 +18,13 @@
 
 #include "qemu/osdep.h"
 #include "libqtest.h"
-#include "libqos/pci-pc.h"
+#include "pci-pc.h"
 #include "qemu/sockets.h"
 #include "qemu/iov.h"
 #include "qemu/module.h"
 #include "qemu/bitops.h"
-#include "libqos/malloc.h"
-#include "libqos/qgraph.h"
+#include "malloc.h"
+#include "qgraph.h"
 #include "e1000e.h"
 
 #define E1000E_IMS      (0x00d0)
tests/qtest/libqos/e1000e.h +1 -1
index 35183b2..a22f5fd 100644
@@ -19,7 +19,7 @@
 #ifndef QGRAPH_E1000E_H
 #define QGRAPH_E1000E_H
 
-#include "libqos/qgraph.h"
+#include "qgraph.h"
 #include "pci.h"
 
 #define E1000E_RX0_MSG_ID           (0)
tests/qtest/libqos/fw_cfg.c +1 -1
index 1f46258..6b8e1ba 100644
@@ -13,7 +13,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqos/fw_cfg.h"
+#include "fw_cfg.h"
 #include "libqtest.h"
 #include "qemu/bswap.h"
 #include "hw/nvram/fw_cfg.h"
tests/qtest/libqos/i2c-imx.c +1 -1
index f33ece5..8f9a7e3 100644
@@ -18,7 +18,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqos/i2c.h"
+#include "i2c.h"
 
 
 #include "libqtest.h"
tests/qtest/libqos/i2c-omap.c +1 -1
index 9ae8214..eb4e453 100644
@@ -7,7 +7,7 @@
  * See the COPYING file in the top-level directory.
  */
 #include "qemu/osdep.h"
-#include "libqos/i2c.h"
+#include "i2c.h"
 
 
 #include "qemu/bswap.h"
tests/qtest/libqos/i2c.c +1 -1
index 38f800d..ade1bdb 100644
@@ -7,7 +7,7 @@
  * See the COPYING file in the top-level directory.
  */
 #include "qemu/osdep.h"
-#include "libqos/i2c.h"
+#include "i2c.h"
 #include "libqtest.h"
 
 void qi2c_send(QI2CDevice *i2cdev, const uint8_t *buf, uint16_t len)
tests/qtest/libqos/i2c.h +1 -1
index c65f087..1341bac 100644
@@ -10,7 +10,7 @@
 #define LIBQOS_I2C_H
 
 #include "libqtest.h"
-#include "libqos/qgraph.h"
+#include "qgraph.h"
 
 typedef struct I2CAdapter I2CAdapter;
 struct I2CAdapter {
tests/qtest/libqos/libqos-pc.c +3 -3
index d04abc5..db420a5 100644
@@ -1,7 +1,7 @@
 #include "qemu/osdep.h"
-#include "libqos/libqos-pc.h"
-#include "libqos/malloc-pc.h"
-#include "libqos/pci-pc.h"
+#include "libqos-pc.h"
+#include "malloc-pc.h"
+#include "pci-pc.h"
 
 static QOSOps qos_ops = {
     .alloc_init = pc_alloc_init,
tests/qtest/libqos/libqos-pc.h +1 -1
index a0e4c45..1a9923e 100644
@@ -1,7 +1,7 @@
 #ifndef LIBQOS_PC_H
 #define LIBQOS_PC_H
 
-#include "libqos/libqos.h"
+#include "libqos.h"
 
 QOSState *qtest_pc_vboot(const char *cmdline_fmt, va_list ap);
 QOSState *qtest_pc_boot(const char *cmdline_fmt, ...);
tests/qtest/libqos/libqos-spapr.c +3 -3
index 8766d54..db0e87b 100644
@@ -1,7 +1,7 @@
 #include "qemu/osdep.h"
-#include "libqos/libqos-spapr.h"
-#include "libqos/malloc-spapr.h"
-#include "libqos/pci-spapr.h"
+#include "libqos-spapr.h"
+#include "malloc-spapr.h"
+#include "pci-spapr.h"
 
 static QOSOps qos_ops = {
     .alloc_init = spapr_alloc_init,
tests/qtest/libqos/libqos-spapr.h +1 -1
index 49bd72d..c613389 100644
@@ -1,7 +1,7 @@
 #ifndef LIBQOS_SPAPR_H
 #define LIBQOS_SPAPR_H
 
-#include "libqos/libqos.h"
+#include "libqos.h"
 
 QOSState *qtest_spapr_vboot(const char *cmdline_fmt, va_list ap);
 QOSState *qtest_spapr_boot(const char *cmdline_fmt, ...);
tests/qtest/libqos/libqos.c +2 -2
index f229eb2..2251e86 100644
@@ -2,8 +2,8 @@
 #include <sys/wait.h>
 
 #include "libqtest.h"
-#include "libqos/libqos.h"
-#include "libqos/pci.h"
+#include "libqos.h"
+#include "pci.h"
 #include "qapi/qmp/qdict.h"
 
 /*** Test Setup & Teardown ***/
tests/qtest/libqos/libqos.h +2 -2
index 8e971c2..e0b2bfe 100644
@@ -2,8 +2,8 @@
 #define LIBQOS_H
 
 #include "libqtest.h"
-#include "libqos/pci.h"
-#include "libqos/malloc.h"
+#include "pci.h"
+#include "malloc.h"
 
 typedef struct QOSState QOSState;
 
tests/qtest/libqos/libqtest.h renamed from tests/qtest/libqtest.h +0 -0
similarity index 100%
rename from tests/qtest/libqtest.h
rename to tests/qtest/libqos/libqtest.h
tests/qtest/libqos/malloc-pc.c +2 -2
index 6f92ce4..16ff960 100644
@@ -11,8 +11,8 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqos/malloc-pc.h"
-#include "libqos/fw_cfg.h"
+#include "malloc-pc.h"
+#include "fw_cfg.h"
 
 #include "standard-headers/linux/qemu_fw_cfg.h"
 
tests/qtest/libqos/malloc-pc.h +1 -1
index 21e75ae..d8d7985 100644
@@ -13,7 +13,7 @@
 #ifndef LIBQOS_MALLOC_PC_H
 #define LIBQOS_MALLOC_PC_H
 
-#include "libqos/malloc.h"
+#include "malloc.h"
 
 void pc_alloc_init(QGuestAllocator *s, QTestState *qts, QAllocOpts flags);
 
tests/qtest/libqos/malloc-spapr.c +1 -1
index 2a6b7e3..84862e4 100644
@@ -6,7 +6,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqos/malloc-spapr.h"
+#include "malloc-spapr.h"
 
 #include "qemu-common.h"
 
tests/qtest/libqos/malloc-spapr.h +1 -1
index e5fe9bf..f99572f 100644
@@ -8,7 +8,7 @@
 #ifndef LIBQOS_MALLOC_SPAPR_H
 #define LIBQOS_MALLOC_SPAPR_H
 
-#include "libqos/malloc.h"
+#include "malloc.h"
 
 void spapr_alloc_init(QGuestAllocator *s, QTestState *qts, QAllocOpts flags);
 
tests/qtest/libqos/malloc.c +1 -1
index 615422a..f708b01 100644
@@ -11,7 +11,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqos/malloc.h"
+#include "malloc.h"
 #include "qemu-common.h"
 #include "qemu/host-utils.h"
 
tests/qtest/libqos/meson.build new file +57 -0
new file mode 100644
index 0000000..19931b9
@@ -0,0 +1,57 @@
+libqos = static_library('qos',
+  files('../libqtest.c',
+        'qgraph.c',
+        'qos_external.c',
+        'pci.c',
+        'fw_cfg.c',
+        'malloc.c',
+        'libqos.c',
+
+        # spapr
+        'malloc-spapr.c',
+        'libqos-spapr.c',
+        'rtas.c',
+        'pci-spapr.c',
+
+        # pc
+        'pci-pc.c',
+        'malloc-pc.c',
+        'libqos-pc.c',
+        'ahci.c',
+
+        # usb
+        'usb.c',
+
+        # qgraph devices:
+        'e1000e.c',
+        'i2c.c',
+        'i2c-imx.c',
+        'i2c-omap.c',
+        'sdhci.c',
+        'tpci200.c',
+        'virtio.c',
+        'virtio-9p.c',
+        'virtio-balloon.c',
+        'virtio-blk.c',
+        'virtio-mmio.c',
+        'virtio-net.c',
+        'virtio-pci.c',
+        'virtio-pci-modern.c',
+        'virtio-rng.c',
+        'virtio-scsi.c',
+        'virtio-serial.c',
+
+        # qgraph machines:
+        'aarch64-xlnx-zcu102-machine.c',
+        'arm-imx25-pdk-machine.c',
+        'arm-n800-machine.c',
+        'arm-raspi2-machine.c',
+        'arm-sabrelite-machine.c',
+        'arm-smdkc210-machine.c',
+        'arm-virt-machine.c',
+        'arm-xilinx-zynq-a9-machine.c',
+        'ppc64_pseries-machine.c',
+        'x86_64_pc-machine.c',
+), build_by_default: false)
+
+qos = declare_dependency(link_whole: libqos)
tests/qtest/libqos/pci-pc.c +1 -1
index 3bb2eb3..f978442 100644
@@ -12,7 +12,7 @@
 
 #include "qemu/osdep.h"
 #include "libqtest.h"
-#include "libqos/pci-pc.h"
+#include "pci-pc.h"
 #include "qapi/qmp/qdict.h"
 #include "hw/pci/pci_regs.h"
 
tests/qtest/libqos/pci-pc.h +3 -3
index 4690005..49ec950 100644
@@ -13,9 +13,9 @@
 #ifndef LIBQOS_PCI_PC_H
 #define LIBQOS_PCI_PC_H
 
-#include "libqos/pci.h"
-#include "libqos/malloc.h"
-#include "libqos/qgraph.h"
+#include "pci.h"
+#include "malloc.h"
+#include "qgraph.h"
 
 typedef struct QPCIBusPC {
     QOSGraphObject obj;
tests/qtest/libqos/pci-spapr.c +3 -3
index d6f8c01..2622269 100644
@@ -7,9 +7,9 @@
 
 #include "qemu/osdep.h"
 #include "libqtest.h"
-#include "libqos/pci-spapr.h"
-#include "libqos/rtas.h"
-#include "libqos/qgraph.h"
+#include "pci-spapr.h"
+#include "rtas.h"
+#include "qgraph.h"
 
 #include "hw/pci/pci_regs.h"
 
tests/qtest/libqos/pci-spapr.h +3 -3
index d9e2563..20a4371 100644
@@ -8,9 +8,9 @@
 #ifndef LIBQOS_PCI_SPAPR_H
 #define LIBQOS_PCI_SPAPR_H
 
-#include "libqos/malloc.h"
-#include "libqos/pci.h"
-#include "libqos/qgraph.h"
+#include "malloc.h"
+#include "pci.h"
+#include "qgraph.h"
 
 /* From include/hw/pci-host/spapr.h */
 
tests/qtest/libqos/pci.c +2 -2
index 2309a72..e1e9618 100644
@@ -11,11 +11,11 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqos/pci.h"
+#include "pci.h"
 
 #include "hw/pci/pci_regs.h"
 #include "qemu/host-utils.h"
-#include "libqos/qgraph.h"
+#include "qgraph.h"
 
 void qpci_device_foreach(QPCIBus *bus, int vendor_id, int device_id,
                          void (*func)(QPCIDevice *dev, int devfn, void *data),
tests/qtest/libqos/pci.h +1 -1
index 590c175..ee64fde 100644
@@ -14,7 +14,7 @@
 #define LIBQOS_PCI_H
 
 #include "libqtest.h"
-#include "libqos/qgraph.h"
+#include "qgraph.h"
 
 #define QPCI_PIO_LIMIT    0x10000
 
tests/qtest/libqos/ppc64_pseries-machine.c +2 -2
index 5d7bd88..24ca179 100644
@@ -18,10 +18,10 @@
 
 #include "qemu/osdep.h"
 #include "libqtest.h"
-#include "libqos/qgraph.h"
+#include "qgraph.h"
 #include "pci-spapr.h"
 #include "qemu/module.h"
-#include "libqos/malloc-spapr.h"
+#include "malloc-spapr.h"
 
 typedef struct QSPAPR_pci_host QSPAPR_pci_host;
 typedef struct Qppc64_pseriesMachine Qppc64_pseriesMachine;
tests/qtest/libqos/qgraph.c +2 -2
index eb0af8a..fc49cfa 100644
@@ -19,8 +19,8 @@
 #include "qemu/osdep.h"
 #include "libqtest.h"
 #include "qemu/queue.h"
-#include "libqos/qgraph_internal.h"
-#include "libqos/qgraph.h"
+#include "qgraph_internal.h"
+#include "qgraph.h"
 
 #define QGRAPH_PRINT_DEBUG 0
 #define QOS_ROOT ""
tests/qtest/libqos/qgraph.h +3 -3
index db1244e..1054326 100644
@@ -106,7 +106,7 @@ typedef void *(*QOSBeforeTest) (GString *cmd_line, void *arg);
  * <example>
  *   <title>Creating new driver an its interface</title>
  *   <programlisting>
- #include "libqos/qgraph.h"
+ #include "qgraph.h"
 
  struct My_driver {
      QOSGraphObject obj;
@@ -190,7 +190,7 @@ typedef void *(*QOSBeforeTest) (GString *cmd_line, void *arg);
  * <example>
  *   <title>Creating new test</title>
  *   <programlisting>
- * #include "libqos/qgraph.h"
+ * #include "qgraph.h"
  *
  * static void my_test_function(void *obj, void *data)
  * {
@@ -230,7 +230,7 @@ typedef void *(*QOSBeforeTest) (GString *cmd_line, void *arg);
  * a valid test path will be:
  * "/x86_64/pc/other_node/my_driver/my_interface/my_test".
  *
- * Additional examples are also in libqos/test-qgraph.c
+ * Additional examples are also in test-qgraph.c
  *
  * Command line:
  * Command line is built by using node names and optional arguments
tests/qtest/libqos/qgraph_internal.h +2 -2
index aa3123f..968fa69 100644
@@ -20,11 +20,11 @@
 #define QGRAPH_INTERNAL_H
 
 /* This header is declaring additional helper functions defined in
- * libqos/qgraph.c
+ * qgraph.c
  * It should not be included in tests
  */
 
-#include "libqos/qgraph.h"
+#include "qgraph.h"
 
 typedef struct QOSGraphMachine QOSGraphMachine;
 typedef enum QOSEdgeType QOSEdgeType;
tests/qtest/libqos/qos_external.c +4 -4
index 0dfc05c..10ee0f7 100644
@@ -24,10 +24,10 @@
 #include "qapi/qmp/qstring.h"
 #include "qemu/module.h"
 #include "qapi/qmp/qlist.h"
-#include "libqos/malloc.h"
-#include "libqos/qgraph.h"
-#include "libqos/qgraph_internal.h"
-#include "libqos/qos_external.h"
+#include "malloc.h"
+#include "qgraph.h"
+#include "qgraph_internal.h"
+#include "qos_external.h"
 
 static void machine_apply_to_node(const char *name)
 {
tests/qtest/libqos/qos_external.h +3 -1
index 56a2f37..8446e3d 100644
@@ -19,7 +19,9 @@
 #ifndef QOS_EXTERNAL_H
 #define QOS_EXTERNAL_H
 
-#include "libqos/malloc.h"
+#include "qgraph.h"
+
+#include "malloc.h"
 #include "qapi/qapi-types-machine.h"
 #include "qapi/qapi-types-qom.h"
 
tests/qtest/libqos/rtas.c +1 -1
index d81ff42..db29d55 100644
@@ -5,7 +5,7 @@
 
 #include "qemu/osdep.h"
 #include "libqtest.h"
-#include "libqos/rtas.h"
+#include "rtas.h"
 
 static void qrtas_copy_args(QTestState *qts, uint64_t target_args,
                             uint32_t nargs, uint32_t *args)
tests/qtest/libqos/rtas.h +1 -1
index 459e23a..f38f99d 100644
@@ -5,7 +5,7 @@
 
 #ifndef LIBQOS_RTAS_H
 #define LIBQOS_RTAS_H
-#include "libqos/malloc.h"
+#include "malloc.h"
 
 int qrtas_get_time_of_day(QTestState *qts, QGuestAllocator *alloc,
                           struct tm *tm, uint32_t *ns);
tests/qtest/libqos/sdhci.c +1 -1
index fbf2e36..65f0d07 100644
@@ -18,7 +18,7 @@
 
 #include "qemu/osdep.h"
 #include "libqtest.h"
-#include "libqos/qgraph.h"
+#include "qgraph.h"
 #include "pci.h"
 #include "qemu/module.h"
 #include "sdhci.h"
tests/qtest/libqos/sdhci.h +1 -1
index 1acd309..22d647b 100644
@@ -19,7 +19,7 @@
 #ifndef QGRAPH_QSDHCI_H
 #define QGRAPH_QSDHCI_H
 
-#include "libqos/qgraph.h"
+#include "qgraph.h"
 #include "pci.h"
 
 typedef struct QSDHCI QSDHCI;
tests/qtest/libqos/tpci200.c +2 -2
index ae590a4..1787b1f 100644
@@ -10,8 +10,8 @@
 #include "qemu/osdep.h"
 #include "libqtest.h"
 #include "qemu/module.h"
-#include "libqos/qgraph.h"
-#include "libqos/pci.h"
+#include "qgraph.h"
+#include "pci.h"
 
 typedef struct QTpci200 QTpci200;
 typedef struct QIpack QIpack;
tests/qtest/libqos/usb.c +1 -1
index d7a9cb3..8b45b02 100644
@@ -14,7 +14,7 @@
 #include "qemu/osdep.h"
 #include "libqtest.h"
 #include "hw/usb/uhci-regs.h"
-#include "libqos/usb.h"
+#include "usb.h"
 
 void qusb_pci_init_one(QPCIBus *pcibus, struct qhc *hc, uint32_t devfn, int bar)
 {
tests/qtest/libqos/usb.h +1 -1
index eeced39..50030d7 100644
@@ -1,7 +1,7 @@
 #ifndef LIBQOS_USB_H
 #define LIBQOS_USB_H
 
-#include "libqos/pci-pc.h"
+#include "pci-pc.h"
 
 struct qhc {
     QPCIDevice *dev;
tests/qtest/libqos/virtio-9p.c +2 -2
index c87b561..2e30006 100644
@@ -20,8 +20,8 @@
 #include "libqtest.h"
 #include "qemu/module.h"
 #include "standard-headers/linux/virtio_ids.h"
-#include "libqos/virtio-9p.h"
-#include "libqos/qgraph.h"
+#include "virtio-9p.h"
+#include "qgraph.h"
 
 static QGuestAllocator *alloc;
 
tests/qtest/libqos/virtio-9p.h +3 -3
index be9621a..b1e6bad 100644
@@ -19,9 +19,9 @@
 #ifndef TESTS_LIBQOS_VIRTIO_9P_H
 #define TESTS_LIBQOS_VIRTIO_9P_H
 
-#include "libqos/qgraph.h"
-#include "libqos/virtio.h"
-#include "libqos/virtio-pci.h"
+#include "qgraph.h"
+#include "virtio.h"
+#include "virtio-pci.h"
 
 typedef struct QVirtio9P QVirtio9P;
 typedef struct QVirtio9PPCI QVirtio9PPCI;
tests/qtest/libqos/virtio-balloon.c +2 -2
index 9745f4a..a3da5c2 100644
@@ -19,8 +19,8 @@
 #include "qemu/osdep.h"
 #include "libqtest.h"
 #include "qemu/module.h"
-#include "libqos/qgraph.h"
-#include "libqos/virtio-balloon.h"
+#include "qgraph.h"
+#include "virtio-balloon.h"
 
 /* virtio-balloon-device */
 static void *qvirtio_balloon_get_driver(QVirtioBalloon *v_balloon,
tests/qtest/libqos/virtio-balloon.h +3 -3
index 5b91930..309894c 100644
@@ -19,9 +19,9 @@
 #ifndef TESTS_LIBQOS_VIRTIO_BALLOON_H
 #define TESTS_LIBQOS_VIRTIO_BALLOON_H
 
-#include "libqos/qgraph.h"
-#include "libqos/virtio.h"
-#include "libqos/virtio-pci.h"
+#include "qgraph.h"
+#include "virtio.h"
+#include "virtio-pci.h"
 
 typedef struct QVirtioBalloon QVirtioBalloon;
 typedef struct QVirtioBalloonPCI QVirtioBalloonPCI;
tests/qtest/libqos/virtio-blk.c +2 -2
index 5fc6940..5da0259 100644
@@ -20,8 +20,8 @@
 #include "libqtest.h"
 #include "qemu/module.h"
 #include "standard-headers/linux/virtio_blk.h"
-#include "libqos/qgraph.h"
-#include "libqos/virtio-blk.h"
+#include "qgraph.h"
+#include "virtio-blk.h"
 
 #define PCI_SLOT                0x04
 #define PCI_FN                  0x00
tests/qtest/libqos/virtio-blk.h +3 -3
index 5170f13..dcef388 100644
@@ -19,9 +19,9 @@
 #ifndef TESTS_LIBQOS_VIRTIO_BLK_H
 #define TESTS_LIBQOS_VIRTIO_BLK_H
 
-#include "libqos/qgraph.h"
-#include "libqos/virtio.h"
-#include "libqos/virtio-pci.h"
+#include "qgraph.h"
+#include "virtio.h"
+#include "virtio-pci.h"
 
 typedef struct QVirtioBlk QVirtioBlk;
 typedef struct QVirtioBlkPCI QVirtioBlkPCI;
tests/qtest/libqos/virtio-mmio.c +4 -4
index e0a2bd7..75efda3 100644
@@ -10,10 +10,10 @@
 #include "qemu/osdep.h"
 #include "libqtest.h"
 #include "qemu/module.h"
-#include "libqos/virtio.h"
-#include "libqos/virtio-mmio.h"
-#include "libqos/malloc.h"
-#include "libqos/qgraph.h"
+#include "virtio.h"
+#include "virtio-mmio.h"
+#include "malloc.h"
+#include "qgraph.h"
 #include "standard-headers/linux/virtio_ring.h"
 
 static uint8_t qvirtio_mmio_config_readb(QVirtioDevice *d, uint64_t off)
tests/qtest/libqos/virtio-mmio.h +2 -2
index 0e45778..30803bc 100644
@@ -10,8 +10,8 @@
 #ifndef LIBQOS_VIRTIO_MMIO_H
 #define LIBQOS_VIRTIO_MMIO_H
 
-#include "libqos/virtio.h"
-#include "libqos/qgraph.h"
+#include "virtio.h"
+#include "qgraph.h"
 
 #define QVIRTIO_MMIO_MAGIC_VALUE        0x000
 #define QVIRTIO_MMIO_VERSION            0x004
tests/qtest/libqos/virtio-net.c +2 -2
index a9e253a..1cae07f 100644
@@ -19,8 +19,8 @@
 #include "qemu/osdep.h"
 #include "libqtest.h"
 #include "qemu/module.h"
-#include "libqos/qgraph.h"
-#include "libqos/virtio-net.h"
+#include "qgraph.h"
+#include "virtio-net.h"
 #include "hw/virtio/virtio-net.h"
 
 
tests/qtest/libqos/virtio-net.h +3 -3
index b8cbec0..5ba2161 100644
@@ -19,9 +19,9 @@
 #ifndef TESTS_LIBQOS_VIRTIO_NET_H
 #define TESTS_LIBQOS_VIRTIO_NET_H
 
-#include "libqos/qgraph.h"
-#include "libqos/virtio.h"
-#include "libqos/virtio-pci.h"
+#include "qgraph.h"
+#include "virtio.h"
+#include "virtio-pci.h"
 
 typedef struct QVirtioNet QVirtioNet;
 typedef struct QVirtioNetPCI QVirtioNetPCI;
tests/qtest/libqos/virtio-pci.c +7 -7
index 62851c2..cd3c0f5 100644
@@ -9,13 +9,13 @@
 
 #include "qemu/osdep.h"
 #include "libqtest.h"
-#include "libqos/virtio.h"
-#include "libqos/virtio-pci.h"
-#include "libqos/pci.h"
-#include "libqos/pci-pc.h"
-#include "libqos/malloc.h"
-#include "libqos/malloc-pc.h"
-#include "libqos/qgraph.h"
+#include "virtio.h"
+#include "virtio-pci.h"
+#include "pci.h"
+#include "pci-pc.h"
+#include "malloc.h"
+#include "malloc-pc.h"
+#include "qgraph.h"
 #include "standard-headers/linux/virtio_ring.h"
 #include "standard-headers/linux/virtio_pci.h"
 
tests/qtest/libqos/virtio-pci.h +3 -3
index 294d556..f5115ca 100644
@@ -10,9 +10,9 @@
 #ifndef LIBQOS_VIRTIO_PCI_H
 #define LIBQOS_VIRTIO_PCI_H
 
-#include "libqos/virtio.h"
-#include "libqos/pci.h"
-#include "libqos/qgraph.h"
+#include "virtio.h"
+#include "pci.h"
+#include "qgraph.h"
 
 typedef struct QVirtioPCIMSIXOps QVirtioPCIMSIXOps;
 
tests/qtest/libqos/virtio-rng.c +2 -2
index 46f8d95..2e09dd7 100644
@@ -19,8 +19,8 @@
 #include "qemu/osdep.h"
 #include "libqtest.h"
 #include "qemu/module.h"
-#include "libqos/qgraph.h"
-#include "libqos/virtio-rng.h"
+#include "qgraph.h"
+#include "virtio-rng.h"
 
 /* virtio-rng-device */
 static void *qvirtio_rng_get_driver(QVirtioRng *v_rng,
tests/qtest/libqos/virtio-rng.h +3 -3
index 9342372..9ca102b 100644
@@ -19,9 +19,9 @@
 #ifndef TESTS_LIBQOS_VIRTIO_RNG_H
 #define TESTS_LIBQOS_VIRTIO_RNG_H
 
-#include "libqos/qgraph.h"
-#include "libqos/virtio.h"
-#include "libqos/virtio-pci.h"
+#include "qgraph.h"
+#include "virtio.h"
+#include "virtio-pci.h"
 
 typedef struct QVirtioRng QVirtioRng;
 typedef struct QVirtioRngPCI QVirtioRngPCI;
tests/qtest/libqos/virtio-scsi.c +2 -2
index c8c3598..5644e32 100644
@@ -20,8 +20,8 @@
 #include "libqtest.h"
 #include "qemu/module.h"
 #include "standard-headers/linux/virtio_ids.h"
-#include "libqos/qgraph.h"
-#include "libqos/virtio-scsi.h"
+#include "qgraph.h"
+#include "virtio-scsi.h"
 
 /* virtio-scsi-device */
 static void *qvirtio_scsi_get_driver(QVirtioSCSI *v_scsi,
tests/qtest/libqos/virtio-scsi.h +3 -3
index 9e3774d..531315e 100644
@@ -19,9 +19,9 @@
 #ifndef TESTS_LIBQOS_VIRTIO_SCSI_H
 #define TESTS_LIBQOS_VIRTIO_SCSI_H
 
-#include "libqos/qgraph.h"
-#include "libqos/virtio.h"
-#include "libqos/virtio-pci.h"
+#include "qgraph.h"
+#include "virtio.h"
+#include "virtio-pci.h"
 
 typedef struct QVirtioSCSI QVirtioSCSI;
 typedef struct QVirtioSCSIPCI QVirtioSCSIPCI;
tests/qtest/libqos/virtio-serial.c +2 -2
index b956540..ee34afd 100644
@@ -19,8 +19,8 @@
 #include "qemu/osdep.h"
 #include "libqtest.h"
 #include "qemu/module.h"
-#include "libqos/qgraph.h"
-#include "libqos/virtio-serial.h"
+#include "qgraph.h"
+#include "virtio-serial.h"
 
 static void *qvirtio_serial_get_driver(QVirtioSerial *v_serial,
                                        const char *interface)
tests/qtest/libqos/virtio-serial.h +3 -3
index 3328c6c..3db43b2 100644
@@ -19,9 +19,9 @@
 #ifndef TESTS_LIBQOS_VIRTIO_SERIAL_H
 #define TESTS_LIBQOS_VIRTIO_SERIAL_H
 
-#include "libqos/qgraph.h"
-#include "libqos/virtio.h"
-#include "libqos/virtio-pci.h"
+#include "qgraph.h"
+#include "virtio.h"
+#include "virtio-pci.h"
 
 typedef struct QVirtioSerial QVirtioSerial;
 typedef struct QVirtioSerialPCI QVirtioSerialPCI;
tests/qtest/libqos/virtio.c +1 -1
index 9aa3606..6fe7bf9 100644
@@ -10,7 +10,7 @@
 #include "qemu/osdep.h"
 #include "qemu/bswap.h"
 #include "libqtest.h"
-#include "libqos/virtio.h"
+#include "virtio.h"
 #include "standard-headers/linux/virtio_config.h"
 #include "standard-headers/linux/virtio_ring.h"
 
tests/qtest/libqos/virtio.h +1 -1
index 529ef75..b8bd06e 100644
@@ -10,7 +10,7 @@
 #ifndef LIBQOS_VIRTIO_H
 #define LIBQOS_VIRTIO_H
 
-#include "libqos/malloc.h"
+#include "malloc.h"
 #include "standard-headers/linux/virtio_ring.h"
 
 #define QVIRTIO_F_BAD_FEATURE           0x40000000ull
tests/qtest/libqos/x86_64_pc-machine.c +1 -1
index 0edb1c9..ad96742 100644
@@ -18,7 +18,7 @@
 
 #include "qemu/osdep.h"
 #include "libqtest.h"
-#include "libqos/qgraph.h"
+#include "qgraph.h"
 #include "pci-pc.h"
 #include "qemu/module.h"
 #include "malloc-pc.h"
tests/qtest/libqtest-single.h +1 -1
index 6f1bb13..176979a 100644
@@ -11,7 +11,7 @@
 #ifndef LIBQTEST_SINGLE_H
 #define LIBQTEST_SINGLE_H
 
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 
 QTestState *global_qtest __attribute__((common, weak));
 
tests/qtest/libqtest.c +1 -1
index fd46805..26f1223 100644
@@ -20,7 +20,7 @@
 #include <sys/wait.h>
 #include <sys/un.h>
 
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "qemu-common.h"
 #include "qemu/ctype.h"
 #include "qemu/cutils.h"
tests/qtest/m48t59-test.c +1 -1
index b94a123..6db3234 100644
@@ -14,7 +14,7 @@
 
 #include "qemu/osdep.h"
 
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 
 #define RTC_SECONDS             0x9
 #define RTC_MINUTES             0xa
tests/qtest/machine-none-test.c +1 -1
index 57107f1..aab06b9 100644
@@ -14,7 +14,7 @@
 
 #include "qemu-common.h"
 #include "qemu/cutils.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "qapi/qmp/qdict.h"
 
 
tests/qtest/megasas-test.c +1 -1
index d6796b9..eae70ff 100644
@@ -8,7 +8,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "qemu/bswap.h"
 #include "qemu/module.h"
 #include "libqos/qgraph.h"
tests/qtest/meson.build new file +257 -0
new file mode 100644
index 0000000..30cb88d
@@ -0,0 +1,257 @@
+# All QTests for now are POSIX-only, but the dependencies are
+# really in libqtest, not in the testcases themselves.
+if not config_host.has_key('CONFIG_POSIX')
+  subdir_done()
+endif
+
+qtests_generic = [
+  'cdrom-test',
+  'device-introspect-test',
+  'machine-none-test',
+  'qmp-test',
+  'qmp-cmd-test',
+  'qom-test',
+  'test-hmp',
+  'qos-test',
+]
+if config_host.has_key('CONFIG_MODULES')
+  qtests_generic += [ 'modules-test' ]
+endif
+
+qtests_pci = \
+  (config_all_devices.has_key('CONFIG_VGA') ? ['display-vga-test'] : []) +                  \
+  (config_all_devices.has_key('CONFIG_IVSHMEM_DEVICE') ? ['ivshmem-test'] : [])
+
+qtests_i386 = \
+  (config_host.has_key('CONFIG_SLIRP') ? ['pxe-test', 'test-netfilter'] : []) +             \
+  (config_host.has_key('CONFIG_POSIX') ? ['test-filter-mirror'] : []) +                     \
+  (have_tools ? ['ahci-test'] : []) +                                                       \
+  (config_all_devices.has_key('CONFIG_ISA_TESTDEV') ? ['endianness-test'] : []) +           \
+  (config_all_devices.has_key('CONFIG_SGA') ? ['boot-serial-test'] : []) +                  \
+  (config_all_devices.has_key('CONFIG_RTL8139_PCI') ? ['test-filter-redirector'] : []) +    \
+  (config_all_devices.has_key('CONFIG_ISA_IPMI_KCS') ? ['ipmi-kcs-test'] : []) +            \
+  (config_host.has_key('CONFIG_LINUX') and                                                  \
+   config_all_devices.has_key('CONFIG_ISA_IPMI_BT') ? ['ipmi-bt-test'] : []) +              \
+  (config_all_devices.has_key('CONFIG_WDT_IB700') ? ['wdt_ib700-test'] : []) +              \
+  (config_all_devices.has_key('CONFIG_PVPANIC') ? ['pvpanic-test'] : []) +                  \
+  (config_all_devices.has_key('CONFIG_HDA') ? ['intel-hda-test'] : []) +                    \
+  (config_all_devices.has_key('CONFIG_I82801B11') ? ['i82801b11-test'] : []) +             \
+  (config_all_devices.has_key('CONFIG_IOH3420') ? ['ioh3420-test'] : []) +                  \
+  (config_all_devices.has_key('CONFIG_USB_UHCI') ? ['usb-hcd-uhci-test'] : []) +            \
+  (config_all_devices.has_key('CONFIG_USB_UHCI') and                                        \
+   config_all_devices.has_key('CONFIG_USB_EHCI') ? ['usb-hcd-ehci-test'] : []) +            \
+  (config_all_devices.has_key('CONFIG_USB_XHCI_NEC') ? ['usb-hcd-xhci-test'] : []) +        \
+  (config_all_devices.has_key('CONFIG_TPM_CRB') ? ['tpm-crb-test'] : []) +                  \
+  (config_all_devices.has_key('CONFIG_TPM_CRB') ? ['tpm-crb-swtpm-test'] : []) +            \
+  (config_all_devices.has_key('CONFIG_TPM_TIS_ISA') ? ['tpm-tis-test'] : []) +              \
+  (config_all_devices.has_key('CONFIG_TPM_TIS_ISA') ? ['tpm-tis-swtpm-test'] : []) +        \
+  (config_all_devices.has_key('CONFIG_RTL8139_PCI') ? ['rtl8139-test'] : []) +              \
+  qtests_pci +                                                                              \
+  ['fdc-test',
+   'ide-test',
+   'ahci-test',
+   'hd-geo-test',
+   'boot-order-test',
+   'bios-tables-test',
+   'rtc-test',
+   'i440fx-test',
+   'fw_cfg-test',
+   'device-plug-test',
+   'drive_del-test',
+   'tco-test',
+   'cpu-plug-test',
+   'q35-test',
+   'vmgenid-test',
+   'migration-test',
+   'test-x86-cpuid-compat',
+   'numa-test']
+
+dbus_daemon = find_program('dbus-daemon', required: false)
+if dbus_daemon.found() and config_host.has_key('GDBUS_CODEGEN')
+  # Temporarily disabled due to Patchew failures:
+  #qtests_i386 += ['dbus-vmstate-test']
+  dbus_vmstate1 = custom_target('dbus-vmstate description',
+                                output: ['dbus-vmstate1.h', 'dbus-vmstate1.c'],
+                                input: files('dbus-vmstate1.xml'),
+                                command: [config_host['GDBUS_CODEGEN'],
+                                          '@INPUT@',
+                                          '--interface-prefix', 'org.qemu',
+                                          '--generate-c-code', '@BASENAME@']).to_list()
+else
+  dbus_vmstate1 = []
+endif
+
+qtests_x86_64 = qtests_i386
+
+qtests_alpha = [ 'boot-serial-test' ] +                                                      \
+  (config_all_devices.has_key('CONFIG_VGA') ? ['display-vga-test'] : [])
+
+qtests_avr = [ 'boot-serial-test' ]
+
+qtests_hppa = [ 'boot-serial-test' ] +                                                       \
+  (config_all_devices.has_key('CONFIG_VGA') ? ['display-vga-test'] : [])
+
+qtests_m68k = [ 'boot-serial-test' ]
+qtests_microblaze = [ 'boot-serial-test' ]
+qtests_microblazeel = qtests_microblaze
+
+qtests_mips = \
+  (config_all_devices.has_key('CONFIG_ISA_TESTDEV') ? ['endianness-test'] : []) +            \
+  (config_all_devices.has_key('CONFIG_VGA') ? ['display-vga-test'] : [])
+
+qtests_mips64 = \
+  (config_all_devices.has_key('CONFIG_ISA_TESTDEV') ? ['endianness-test'] : []) +            \
+  (config_all_devices.has_key('CONFIG_VGA') ? ['display-vga-test'] : [])
+
+qtests_mips64el = \
+  (config_all_devices.has_key('CONFIG_ISA_TESTDEV') ? ['endianness-test'] : []) +            \
+  (config_all_devices.has_key('CONFIG_VGA') ? ['display-vga-test'] : [])
+
+qtests_moxie = [ 'boot-serial-test' ]
+
+qtests_ppc = \
+  (config_all_devices.has_key('CONFIG_ISA_TESTDEV') ? ['endianness-test'] : []) +            \
+  (config_all_devices.has_key('CONFIG_M48T59') ? ['m48t59-test'] : []) +                     \
+  ['boot-order-test', 'prom-env-test', 'drive_del-test', 'boot-serial-test']                 \
+
+qtests_ppc64 = \
+  (config_all_devices.has_key('CONFIG_PSERIES') ? ['device-plug-test'] : []) +               \
+  (config_all_devices.has_key('CONFIG_POWERNV') ? ['pnv-xscom-test'] : []) +                 \
+  (config_all_devices.has_key('CONFIG_PSERIES') ? ['rtas-test'] : []) +                      \
+  (config_host.has_key('CONFIG_SLIRP') ? ['pxe-test', 'test-netfilter'] : []) +              \
+  (config_all_devices.has_key('CONFIG_USB_UHCI') ? ['usb-hcd-uhci-test'] : []) +             \
+  (config_all_devices.has_key('CONFIG_USB_XHCI_NEC') ? ['usb-hcd-xhci-test'] : []) +         \
+  (config_host.has_key('CONFIG_POSIX') ? ['test-filter-mirror'] : []) +                      \
+  qtests_pci + ['migration-test', 'numa-test', 'cpu-plug-test']
+
+qtests_sh4 = (config_all_devices.has_key('CONFIG_ISA_TESTDEV') ? ['endianness-test'] : [])
+qtests_sh4eb = (config_all_devices.has_key('CONFIG_ISA_TESTDEV') ? ['endianness-test'] : [])
+
+qtests_sparc = ['prom-env-test', 'm48t59-test', 'boot-serial-test']
+
+qtests_sparc64 = \
+  (config_all_devices.has_key('CONFIG_ISA_TESTDEV') ? ['endianness-test'] : []) +            \
+  ['prom-env-test', 'boot-serial-test']
+
+qtests_arm = \
+  (config_all_devices.has_key('CONFIG_PFLASH_CFI02') ? ['pflash-cfi02-test'] : []) +         \
+  ['arm-cpu-features',
+   'microbit-test',
+   'm25p80-test',
+   'test-arm-mptimer',
+   'boot-serial-test',
+   'hexloader-test']
+
+# TODO: once aarch64 TCG is fixed on ARM 32 bit host, make bios-tables-test unconditional
+qtests_aarch64 = \
+  (cpu != 'arm' ? ['bios-tables-test'] : []) +                                                  \
+  (config_all_devices.has_key('CONFIG_TPM_TIS_SYSBUS') ? ['tpm-tis-device-test'] : []) +        \
+  (config_all_devices.has_key('CONFIG_TPM_TIS_SYSBUS') ? ['tpm-tis-device-swtpm-test'] : []) +  \
+  ['numa-test',
+   'boot-serial-test',
+   'migration-test']
+
+qtests_s390x = \
+  (config_host.has_key('CONFIG_SLIRP') ? ['pxe-test', 'test-netfilter'] : []) +                 \
+  (config_host.has_key('CONFIG_POSIX') ? ['test-filter-mirror'] : []) +                         \
+  (config_host.has_key('CONFIG_POSIX') ? ['test-filter-redirector'] : []) +                     \
+  ['boot-serial-test',
+   'drive_del-test',
+   'device-plug-test',
+   'virtio-ccw-test',
+   'cpu-plug-test',
+   'migration-test']
+
+qos_test_ss = ss.source_set()
+qos_test_ss.add(
+  'ac97-test.c',
+  'ds1338-test.c',
+  'e1000-test.c',
+  'e1000e-test.c',
+  'eepro100-test.c',
+  'es1370-test.c',
+  'ipoctal232-test.c',
+  'megasas-test.c',
+  'ne2000-test.c',
+  'tulip-test.c',
+  'nvme-test.c',
+  'pca9552-test.c',
+  'pci-test.c',
+  'pcnet-test.c',
+  'sdhci-test.c',
+  'spapr-phb-test.c',
+  'tmp105-test.c',
+  'usb-hcd-ohci-test.c',
+  'virtio-test.c',
+  'virtio-blk-test.c',
+  'virtio-net-test.c',
+  'virtio-rng-test.c',
+  'virtio-scsi-test.c',
+  'virtio-serial-test.c',
+  'vmxnet3-test.c',
+)
+qos_test_ss.add(when: 'CONFIG_VIRTFS', if_true: files('virtio-9p-test.c'))
+qos_test_ss.add(when: 'CONFIG_VHOST_USER', if_true: files('vhost-user-test.c'))
+
+extra_qtest_deps = {
+  'bios-tables-test': [io],
+  'ivshmem-test': [rt],
+  'qos-test': [chardev, io],
+  'tpm-crb-swtpm-test': [io],
+  'tpm-crb-test': [io],
+  'tpm-tis-swtpm-test': [io],
+  'tpm-tis-test': [io],
+  'tpm-tis-device-swtpm-test': [io],
+  'tpm-tis-device-test': [io],
+}
+extra_qtest_srcs = {
+  'bios-tables-test': files('boot-sector.c', 'acpi-utils.c', 'tpm-emu.c'),
+  'pxe-test': files('boot-sector.c'),
+  'cdrom-test': files('boot-sector.c'),
+  'migration-test': files('migration-helpers.c'),
+  'ivshmem-test': files('../../contrib/ivshmem-server/ivshmem-server.c'),
+  'dbus-vmstate-test': files('migration-helpers.c') + dbus_vmstate1,
+  'vmgenid-test': files('boot-sector.c', 'acpi-utils.c'),
+  'tpm-crb-swtpm-test': files('tpm-emu.c', 'tpm-util.c', 'tpm-tests.c'),
+  'tpm-crb-test': files('tpm-emu.c', 'tpm-util.c', 'tpm-tests.c'),
+  'tpm-tis-device-swtpm-test': files('tpm-emu.c', 'tpm-util.c', 'tpm-tis-util.c', 'tpm-tests.c'),
+  'tpm-tis-device-test': files('tpm-emu.c', 'tpm-util.c', 'tpm-tis-util.c', 'tpm-tests.c'),
+  'tpm-tis-swtpm-test': files('tpm-emu.c', 'tpm-util.c', 'tpm-tis-util.c', 'tpm-tests.c'),
+  'tpm-tis-test': files('tpm-emu.c', 'tpm-util.c', 'tpm-tis-util.c', 'tpm-tests.c'),
+  'qos-test': qos_test_ss.apply(config_host, strict: false).sources()
+}
+
+
+qtest_executables = {}
+foreach dir : target_dirs
+  if not dir.endswith('-softmmu')
+    continue
+  endif
+
+  target_base = dir.split('-')[0]
+  qtests = get_variable('qtests_' + target_base, []) + qtests_generic
+
+  qtest_env = environment()
+  qtest_env.set('QTEST_QEMU_IMG', './qemu-img')
+  qtest_env.set('G_TEST_DBUS_DAEMON', meson.source_root() / 'tests/dbus-vmstate-daemon.sh')
+  qtest_env.set('QTEST_QEMU_BINARY', '@0@-softmmu/qemu-system-@0@'.format(target_base))
+  
+  foreach test : qtests
+    # Executables are shared across targets, declare them only the first time we
+    # encounter them
+    if not qtest_executables.has_key(test)
+      qtest_executables += {
+        test: executable(test,
+                         files(test + '.c') + extra_qtest_srcs.get(test, []),
+                         dependencies: [qemuutil, qos] + extra_qtest_deps.get(test, []))
+      }
+    endif
+    # FIXME: missing dependency on the emulator binary and qemu-img
+    test('qtest-@0@: @1@'.format(target_base, test),
+         qtest_executables[test],
+         env: qtest_env,
+         args: ['--tap', '-k'],
+         protocol: 'tap',
+         suite: ['qtest', 'qtest-' + target_base])
+  endforeach
+endforeach
tests/qtest/microbit-test.c +1 -1
index 04e199e..2b25557 100644
@@ -16,7 +16,7 @@
 
 #include "qemu/osdep.h"
 #include "exec/hwaddr.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 
 #include "hw/arm/nrf51.h"
 #include "hw/char/nrf51_uart.h"
tests/qtest/migration-helpers.h +1 -1
index a11808b..d63bba9 100644
@@ -12,7 +12,7 @@
 #ifndef MIGRATION_HELPERS_H_
 #define MIGRATION_HELPERS_H_
 
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 
 extern bool got_stop;
 
tests/qtest/migration-test.c +2 -2
index 21ea5ba..00a233c 100644
@@ -12,7 +12,7 @@
 
 #include "qemu/osdep.h"
 
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "qapi/error.h"
 #include "qapi/qmp/qdict.h"
 #include "qemu/module.h"
@@ -25,7 +25,7 @@
 #include "qapi/qobject-output-visitor.h"
 
 #include "migration-helpers.h"
-#include "migration/migration-test.h"
+#include "tests/migration/migration-test.h"
 
 /* TODO actually test the results and get rid of this */
 #define qtest_qmp_discard_response(...) qobject_unref(qtest_qmp(__VA_ARGS__))
tests/qtest/modules-test.c +1 -1
index 8821768..c238b3f 100644
@@ -1,5 +1,5 @@
 #include "qemu/osdep.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 
 const char common_args[] = "-nodefaults -machine none";
 
tests/qtest/ne2000-test.c +1 -1
index 3fc0e55..43cfc45 100644
@@ -8,7 +8,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "qemu/module.h"
 #include "libqos/qgraph.h"
 #include "libqos/pci.h"
tests/qtest/numa-test.c +1 -1
index e1ed6d4..b25ebf9 100644
@@ -10,7 +10,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "qapi/qmp/qdict.h"
 #include "qapi/qmp/qlist.h"
 
tests/qtest/nvme-test.c +1 -1
index ff04421..d32c953 100644
@@ -10,7 +10,7 @@
 #include "qemu/osdep.h"
 #include "qemu/module.h"
 #include "qemu/units.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "libqos/qgraph.h"
 #include "libqos/pci.h"
 
tests/qtest/pca9552-test.c +1 -1
index d80ed93..42a1312 100644
@@ -9,7 +9,7 @@
 
 #include "qemu/osdep.h"
 
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "libqos/qgraph.h"
 #include "libqos/i2c.h"
 #include "hw/misc/pca9552_regs.h"
tests/qtest/pci-test.c +1 -1
index 4b2092b..e15d4d9 100644
@@ -8,7 +8,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "qemu/module.h"
 #include "libqos/qgraph.h"
 #include "libqos/pci.h"
tests/qtest/pcnet-test.c +1 -1
index 900944f..7583aeb 100644
@@ -8,7 +8,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "qemu/module.h"
 #include "libqos/qgraph.h"
 #include "libqos/pci.h"
tests/qtest/pflash-cfi02-test.c +1 -1
index 17aa669..afb702b 100644
@@ -8,7 +8,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 
 /*
  * To test the pflash_cfi02 device, we run QEMU with the musicpal machine with
tests/qtest/pnv-xscom-test.c +1 -1
index 2c46d5c..c8d4043 100644
@@ -8,7 +8,7 @@
  */
 #include "qemu/osdep.h"
 
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 
 typedef enum PnvChipType {
     PNV_CHIP_POWER8E,     /* AKA Murano (default) */
tests/qtest/prom-env-test.c +1 -1
index 60e6ec3..f41d801 100644
@@ -20,7 +20,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "libqos/libqos-spapr.h"
 
 #define MAGIC   0xcafec0de
tests/qtest/pvpanic-test.c +1 -1
index ff9176a..e576394 100644
@@ -8,7 +8,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "qapi/qmp/qdict.h"
 
 static void test_panic(void)
tests/qtest/pxe-test.c +1 -1
index 1161a77..32bbae3 100644
@@ -15,7 +15,7 @@
 #include "qemu/osdep.h"
 #include <glib/gstdio.h>
 #include "qemu-common.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "boot-sector.h"
 #include "libqos/libqos-spapr.h"
 
tests/qtest/q35-test.c +1 -1
index c922d81..b7cf144 100644
@@ -10,7 +10,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "libqos/pci.h"
 #include "libqos/pci-pc.h"
 #include "hw/pci-host/q35.h"
tests/qtest/qmp-cmd-test.c +1 -1
index f7b1aa7..f34e688 100644
@@ -11,7 +11,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "qapi/error.h"
 #include "qapi/qapi-visit-introspect.h"
 #include "qapi/qmp/qdict.h"
tests/qtest/qmp-test.c +1 -1
index 1a8876b..5950c3e 100644
@@ -11,7 +11,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "qapi/error.h"
 #include "qapi/qapi-visit-control.h"
 #include "qapi/qmp/qdict.h"
tests/qtest/qom-test.c +1 -1
index 1acf0d7..eb34af8 100644
@@ -13,7 +13,7 @@
 #include "qapi/qmp/qdict.h"
 #include "qapi/qmp/qlist.h"
 #include "qemu/cutils.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 
 static void test_properties(QTestState *qts, const char *path, bool recurse)
 {
tests/qtest/rtas-test.c +1 -1
index 167b42d..a7e83e7 100644
@@ -1,6 +1,6 @@
 #include "qemu/osdep.h"
 #include "qemu/cutils.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 
 #include "libqos/libqos-spapr.h"
 #include "libqos/rtas.h"
tests/qtest/sdhci-test.c +1 -1
index 6275e76..a110cfe 100644
@@ -10,7 +10,7 @@
 
 #include "qemu/osdep.h"
 #include "hw/registerfields.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "qemu/module.h"
 #include "libqos/pci-pc.h"
 #include "hw/pci/pci.h"
tests/qtest/spapr-phb-test.c +1 -1
index 093dc22..ea8d596 100644
@@ -9,7 +9,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "qemu/module.h"
 #include "libqos/qgraph.h"
 
tests/qtest/tco-test.c +1 -1
index 254f735..47bc7ad 100644
@@ -9,7 +9,7 @@
 
 #include "qemu/osdep.h"
 
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "libqos/pci.h"
 #include "libqos/pci-pc.h"
 #include "qapi/qmp/qdict.h"
tests/qtest/test-filter-mirror.c +1 -1
index 1e3ced8..bc0dee6 100644
@@ -10,7 +10,7 @@
 
 #include "qemu/osdep.h"
 #include "qemu-common.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "qapi/qmp/qdict.h"
 #include "qemu/iov.h"
 #include "qemu/sockets.h"
tests/qtest/test-filter-redirector.c +1 -1
index e4d5322..829db8c 100644
@@ -52,7 +52,7 @@
 
 #include "qemu/osdep.h"
 #include "qemu-common.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "qapi/qmp/qdict.h"
 #include "qemu/iov.h"
 #include "qemu/sockets.h"
tests/qtest/test-hmp.c +1 -1
index d5e7ebd..aea1384 100644
@@ -15,7 +15,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 
 static int verbose;
 
tests/qtest/tpm-crb-swtpm-test.c +1 -1
index 55fdb56..1d82a48 100644
@@ -15,7 +15,7 @@
 #include "qemu/osdep.h"
 #include <glib/gstdio.h>
 
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "qemu/module.h"
 #include "tpm-tests.h"
 #include "hw/acpi/tpm.h"
tests/qtest/tpm-tis-device-swtpm-test.c +1 -1
index 7b20035..f7126ef 100644
@@ -16,7 +16,7 @@
 #include "qemu/osdep.h"
 #include <glib/gstdio.h>
 
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "qemu/module.h"
 #include "tpm-tests.h"
 #include "hw/acpi/tpm.h"
tests/qtest/tpm-tis-swtpm-test.c +1 -1
index 90131cb..fa590e6 100644
@@ -15,7 +15,7 @@
 #include "qemu/osdep.h"
 #include <glib/gstdio.h>
 
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "qemu/module.h"
 #include "tpm-tests.h"
 #include "hw/acpi/tpm.h"
tests/qtest/tpm-util.c +1 -1
index 58a9593..e2b29ef 100644
@@ -15,7 +15,7 @@
 #include "qemu/osdep.h"
 
 #include "hw/acpi/tpm.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "tpm-util.h"
 #include "qapi/qmp/qdict.h"
 
tests/qtest/tulip-test.c +1 -1
index 2fb6c4d..da16cbf 100644
@@ -8,7 +8,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "qemu/module.h"
 #include "libqos/qgraph.h"
 #include "libqos/pci.h"
tests/qtest/virtio-rng-test.c +1 -1
index 092ba13..e6b8cd8 100644
@@ -8,7 +8,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "qemu/module.h"
 #include "libqos/qgraph.h"
 #include "libqos/virtio-rng.h"
tests/qtest/virtio-test.c +1 -1
index f7c6afd..6313417 100644
@@ -8,7 +8,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "qemu/module.h"
 #include "libqos/qgraph.h"
 #include "libqos/pci.h"
tests/qtest/vmgenid-test.c +1 -1
index efba76e..6781a51 100644
@@ -14,7 +14,7 @@
 #include "hw/acpi/acpi-defs.h"
 #include "boot-sector.h"
 #include "acpi-utils.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "qapi/qmp/qdict.h"
 
 #define VGID_GUID "324e6eaf-d1d1-4bf6-bf41-b9bb6c91fb87"
tests/qtest/vmxnet3-test.c +1 -1
index a810252..97c23fd 100644
@@ -8,7 +8,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "qemu/module.h"
 #include "libqos/qgraph.h"
 #include "libqos/pci.h"
tests/qtest/wdt_ib700-test.c +1 -1
index 797288d..6c36e43 100644
@@ -8,7 +8,7 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "qapi/qmp/qdict.h"
 #include "qemu/timer.h"
 
tests/test-qga.c +1 -1
index d1b4c3e..4ac4c22 100644
@@ -4,7 +4,7 @@
 #include <sys/socket.h>
 #include <sys/un.h>
 
-#include "libqtest.h"
+#include "libqos/libqtest.h"
 #include "qapi/qmp/qdict.h"
 #include "qapi/qmp/qlist.h"
 
tests/test-qgraph.c +2 -3
index 5c7e457..267291c 100644
@@ -17,9 +17,8 @@
  */
 
 #include "qemu/osdep.h"
-#include "libqtest.h"
-#include "libqos/qgraph.h"
-#include "libqos/qgraph_internal.h"
+#include "qtest/libqos/qgraph.h"
+#include "qtest/libqos/qgraph_internal.h"
 
 #define MACHINE_PC "x86_64/pc"
 #define MACHINE_RASPI2 "arm/raspi2"
Signature · 1 line
1.8.3.1
#71 lore raw

PATCH 67/147 meson: convert audio directory to Meson

In reply to Paolo Bonzini
---
 Makefile.objs       |  7 +++++--
 Makefile.target     |  3 ++-
 audio/Makefile.objs | 35 -----------------------------------
 audio/meson.build   | 32 ++++++++++++++++++++++++++++++++
 configure           | 16 ++++++++++++++++
 meson.build         | 29 ++++++++++++++++++++++++++++-
 6 files changed, 83 insertions(+), 39 deletions(-)
 delete mode 100644 audio/Makefile.objs
 create mode 100644 audio/meson.build
Makefile.objs +5 -2
index e43526f..ec7627a 100644
@@ -63,6 +63,11 @@ common-obj-$(CONFIG_LINUX) += fsdev/
 common-obj-y += accel/
 common-obj-y += migration/
 
+common-obj-$(CONFIG_AUDIO_ALSA) += audio-alsa$(DSOSUF)
+common-obj-$(CONFIG_AUDIO_OSS) += audio-oss$(DSOSUF)
+common-obj-$(CONFIG_AUDIO_PA) += audio-pa$(DSOSUF)
+common-obj-$(CONFIG_AUDIO_SDL) += audio-sdl$(DSOSUF)
+
 common-obj-$(if $(CONFIG_CURL),m) += block-curl$(DSOSUF)
 common-obj-$(if $(CONFIG_GLUSTERFS),m) += block-gluster$(DSOSUF)
 common-obj-$(if $(CONFIG_LIBISCSI),m) += block-iscsi$(DSOSUF)
@@ -73,8 +78,6 @@ common-obj-$(if $(CONFIG_RBD),m) += block-rbd$(DSOSUF)
 common-obj-$(if $(CONFIG_LZFSE),m) += block-dmg-lzfse$(DSOSUF)
 common-obj-$(if $(and $(CONFIG_BZIP2),$(CONFIG_DMG)),m) += block-dmg-bz2$(DSOSUF)
 
-common-obj-y += audio/
-common-obj-m += audio/
 common-obj-y += hw/
 common-obj-m += hw/
 
Makefile.target +2 -1
index c8c4b70..ff0e1b2 100644
@@ -166,9 +166,10 @@ LIBS := $(libs_softmmu) $(LIBS)
 # Temporary until emulators are linked by Meson
 LIBS := $(LIBS) @../block.syms @../qemu.syms
 ifneq ($(CONFIG_MODULES),y)
-LIBS := $(LIBS)
+LIBS := $(LIBS) $(ALSA_LIBS) $(OSS_LIBS) $(PULSE_LIBS) $(SDL_LIBS)
 endif
 LIBS := $(LIBS) $(BRLAPI_LIBS) $(SDL_LIBS) $(SPICE_LIBS)
+LIBS := $(LIBS) $(COREAUDIO_LIBS) $(DSOUND_LIBS)
 
 # Hardware support
 ifeq ($(TARGET_NAME), sparc64)
audio/Makefile.objs deleted +0 -35
deleted file mode 100644
index b4a4c11..0000000
@@ -1,35 +0,0 @@
-common-obj-y = audio.o audio_legacy.o noaudio.o wavaudio.o mixeng.o
-common-obj-$(CONFIG_SPICE) += spiceaudio.o
-common-obj-$(CONFIG_AUDIO_COREAUDIO) += coreaudio.o
-common-obj-$(CONFIG_AUDIO_DSOUND) += dsoundaudio.o
-common-obj-$(CONFIG_AUDIO_WIN_INT) += audio_win_int.o
-common-obj-y += wavcapture.o
-
-coreaudio.o-libs := $(COREAUDIO_LIBS)
-dsoundaudio.o-libs := $(DSOUND_LIBS)
-
-# alsa module
-common-obj-$(CONFIG_AUDIO_ALSA) += alsa.mo
-alsa.mo-objs = alsaaudio.o
-alsa.mo-libs := $(ALSA_LIBS)
-
-# oss module
-common-obj-$(CONFIG_AUDIO_OSS) += oss.mo
-oss.mo-objs = ossaudio.o
-oss.mo-libs := $(OSS_LIBS)
-
-# pulseaudio module
-common-obj-$(CONFIG_AUDIO_PA) += pa.mo
-pa.mo-objs = paaudio.o
-pa.mo-libs := $(PULSE_LIBS)
-
-# sdl module
-common-obj-$(CONFIG_AUDIO_SDL) += sdl.mo
-sdl.mo-objs = sdlaudio.o
-sdl.mo-cflags := $(SDL_CFLAGS)
-sdl.mo-libs := $(SDL_LIBS)
-
-# jack module
-common-obj-$(CONFIG_AUDIO_JACK) += jack.mo
-jack.mo-objs = jackaudio.o
-jack.mo-libs := $(JACK_LIBS)
audio/meson.build new file +32 -0
new file mode 100644
index 0000000..0813722
@@ -0,0 +1,32 @@
+softmmu_ss.add(files(
+  'audio.c',
+  'audio_legacy.c',
+  'mixeng.c',
+  'noaudio.c',
+  'wavaudio.c',
+  'wavcapture.c',
+))
+
+softmmu_ss.add(when: [spice, 'CONFIG_SPICE'], if_true: files('spiceaudio.c'))
+softmmu_ss.add(when: [coreaudio, 'CONFIG_AUDIO_COREAUDIO'], if_true: files('coreaudio.c'))
+softmmu_ss.add(when: [dsound, 'CONFIG_AUDIO_DSOUND'], if_true: files('dsoundaudio.c'))
+softmmu_ss.add(when: ['CONFIG_AUDIO_WIN_INT'], if_true: files('audio_win_int.c'))
+
+audio_modules = []
+if 'CONFIG_AUDIO_ALSA' in config_host
+  audio_modules += [['alsa', files('alsaaudio.c'), alsa]]
+endif
+if 'CONFIG_AUDIO_OSS' in config_host
+  audio_modules += [['oss', files('ossaudio.c'), oss]]
+endif
+if 'CONFIG_AUDIO_PA' in config_host
+  audio_modules += [['pa', files('paaudio.c'), pulse]]
+endif
+if 'CONFIG_AUDIO_SDL' in config_host
+  audio_modules += [['sdl', files('sdlaudio.c'), sdl]]
+endif
+if 'CONFIG_AUDIO_JACK' in config_host
+  audio_modules += [['jack', files('jackaudio.c'), jack]]
+endif
+
+modules += {'audio': audio_modules}
configure +16 -0
index 875f088..7625294 100755
@@ -3703,6 +3703,8 @@ for drv in $audio_drv_list; do
     alsa | try-alsa)
     if $pkg_config alsa --exists; then
         alsa_libs=$($pkg_config alsa --libs)
+        alsa_cflags=$($pkg_config alsa --cflags)
+        alsa=yes
         if test "$drv" = "try-alsa"; then
             audio_drv_list=$(echo "$audio_drv_list" | sed -e 's/try-alsa/alsa/')
         fi
@@ -3718,7 +3720,9 @@ for drv in $audio_drv_list; do
 
     pa | try-pa)
     if $pkg_config libpulse --exists; then
+        libpulse=yes
         pulse_libs=$($pkg_config libpulse --libs)
+        pulse_cflags=$($pkg_config libpulse --cflags)
         if test "$drv" = "try-pa"; then
             audio_drv_list=$(echo "$audio_drv_list" | sed -e 's/try-pa/pa/')
         fi
@@ -3761,6 +3765,7 @@ for drv in $audio_drv_list; do
 
     jack | try-jack)
     if $pkg_config jack --exists; then
+        libjack=yes
         jack_libs=$($pkg_config jack --libs)
         if test "$drv" = "try-jack"; then
             audio_drv_list=$(echo "$audio_drv_list" | sed -e 's/try-jack/jack/')
@@ -6964,11 +6969,22 @@ for drv in $audio_drv_list; do
 	    echo "$def=y" >> $config_host_mak ;;
     esac
 done
+if test "$alsa" = "yes" ; then
+    echo "CONFIG_ALSA=y" >> $config_host_mak
+fi
 echo "ALSA_LIBS=$alsa_libs" >> $config_host_mak
+echo "ALSA_CFLAGS=$alsa_cflags" >> $config_host_mak
+if test "$libpulse" = "yes" ; then
+    echo "CONFIG_LIBPULSE=y" >> $config_host_mak
+fi
 echo "PULSE_LIBS=$pulse_libs" >> $config_host_mak
+echo "PULSE_CFLAGS=$pulse_cflags" >> $config_host_mak
 echo "COREAUDIO_LIBS=$coreaudio_libs" >> $config_host_mak
 echo "DSOUND_LIBS=$dsound_libs" >> $config_host_mak
 echo "OSS_LIBS=$oss_libs" >> $config_host_mak
+if test "$libjack" = "yes" ; then
+    echo "CONFIG_LIBJACK=y" >> $config_host_mak
+fi
 echo "JACK_LIBS=$jack_libs" >> $config_host_mak
 if test "$audio_win_int" = "yes" ; then
   echo "CONFIG_AUDIO_WIN_INT=y" >> $config_host_mak
meson.build +28 -1
index 2ff1be0..f241901 100644
@@ -135,6 +135,20 @@ if 'CONFIG_XKBCOMMON' in config_host
   xkbcommon = declare_dependency(compile_args: config_host['XKBCOMMON_CFLAGS'].split(),
                                  link_args: config_host['XKBCOMMON_LIBS'].split())
 endif
+pulse = not_found
+if 'CONFIG_LIBPULSE' in config_host
+  pulse = declare_dependency(compile_args: config_host['PULSE_CFLAGS'].split(),
+                             link_args: config_host['PULSE_LIBS'].split())
+endif
+alsa = not_found
+if 'CONFIG_ALSA' in config_host
+  alsa = declare_dependency(compile_args: config_host['ALSA_CFLAGS'].split(),
+                            link_args: config_host['ALSA_LIBS'].split())
+endif
+jack = not_found
+if 'CONFIG_LIBJACK' in config_host
+  jack = declare_dependency(link_args: config_host['JACK_LIBS'].split())
+endif
 spice = not_found
 if 'CONFIG_SPICE' in config_host
   spice = declare_dependency(compile_args: config_host['SPICE_CFLAGS'].split(),
@@ -205,6 +219,18 @@ liblzfse = not_found
 if 'CONFIG_LZFSE' in config_host
   liblzfse = declare_dependency(link_args: config_host['LZFSE_LIBS'].split())
 endif
+oss = not_found
+if 'CONFIG_AUDIO_OSS' in config_host
+  oss = declare_dependency(link_args: config_host['OSS_LIBS'].split())
+endif
+dsound = not_found
+if 'CONFIG_AUDIO_DSOUND' in config_host
+  dsound = declare_dependency(link_args: config_host['DSOUND_LIBS'].split())
+endif
+coreaudio = not_found
+if 'CONFIG_AUDIO_COREAUDIO' in config_host
+  coreaudio = declare_dependency(link_args: config_host['COREAUDIO_LIBS'].split())
+endif
 
 create_config = find_program('scripts/create_config')
 minikconf = find_program('scripts/minikconf.py')
@@ -506,6 +532,7 @@ libqemuutil = static_library('qemuutil',
 qemuutil = declare_dependency(link_with: libqemuutil,
                               sources: genh + version_res)
 
+subdir('audio')
 subdir('io')
 subdir('chardev')
 subdir('fsdev')
@@ -538,7 +565,7 @@ foreach d, list : modules
       else
         softmmu_mods += sl
       endif
-      mods += {'dir': d, 'name': m[0], 'lib': sl, 'deps': m[2]}
+      mods += {'dir': d, 'name': m[0], 'lib': [sl, libmodulecommon], 'deps': m[2]}
     else
       if d == 'block'
         block_ss.add(when: [m.get(3, []), m[2]], if_true: m[1])
Signature · 1 line
1.8.3.1
#72 lore raw

PATCH 68/147 meson: convert ui directory to Meson

In reply to Paolo Bonzini

From: Marc-André Lureau <[email protected]>

---
 Makefile.objs    |  8 ++++--
 Makefile.target  |  8 +++---
 configure        |  6 ++++
 meson.build      | 50 ++++++++++++++++++++++++++++++++++
 ui/Makefile.objs | 73 -------------------------------------------------
 ui/meson.build   | 83 +++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 ui/shader.c      |  6 ++--
 7 files changed, 150 insertions(+), 84 deletions(-)
 delete mode 100644 ui/Makefile.objs
Makefile.objs +5 -3
index ec7627a..72e9350 100644
@@ -68,6 +68,11 @@ common-obj-$(CONFIG_AUDIO_OSS) += audio-oss$(DSOSUF)
 common-obj-$(CONFIG_AUDIO_PA) += audio-pa$(DSOSUF)
 common-obj-$(CONFIG_AUDIO_SDL) += audio-sdl$(DSOSUF)
 
+common-obj-$(if $(CONFIG_CURSES),m) += ui-curses$(DSOSUF)
+common-obj-$(if $(CONFIG_GTK),m) += ui-gtk$(DSOSUF)
+common-obj-$(if $(CONFIG_SDL),m) += ui-sdl$(DSOSUF)
+common-obj-$(if $(CONFIG_SPICE),m) += ui-spice-app$(DSOSUF)
+
 common-obj-$(if $(CONFIG_CURL),m) += block-curl$(DSOSUF)
 common-obj-$(if $(CONFIG_GLUSTERFS),m) += block-gluster$(DSOSUF)
 common-obj-$(if $(CONFIG_LIBISCSI),m) += block-iscsi$(DSOSUF)
@@ -83,9 +88,6 @@ common-obj-m += hw/
 
 common-obj-y += replay/
 
-common-obj-y += ui/
-common-obj-m += ui/
-
 common-obj-y += dma-helpers.o
 common-obj-$(CONFIG_TPM) += tpm.o
 
Makefile.target +4 -4
index ff0e1b2..16f1e78 100644
@@ -167,8 +167,9 @@ LIBS := $(libs_softmmu) $(LIBS)
 LIBS := $(LIBS) @../block.syms @../qemu.syms
 ifneq ($(CONFIG_MODULES),y)
 LIBS := $(LIBS) $(ALSA_LIBS) $(OSS_LIBS) $(PULSE_LIBS) $(SDL_LIBS)
+LIBS := $(LIBS) $(GTK_LIBS) $(VTE_LIBS) $(X11_LIBS) $(CURSES_LIBS) $(ICONV_LIBS) $(GIO_LIBS)
 endif
-LIBS := $(LIBS) $(BRLAPI_LIBS) $(SDL_LIBS) $(SPICE_LIBS)
+LIBS := $(LIBS) $(BRLAPI_LIBS) $(SDL_LIBS) $(SPICE_LIBS) $(OPENGL_LIBS)
 LIBS := $(LIBS) $(COREAUDIO_LIBS) $(DSOUND_LIBS)
 
 # Hardware support
@@ -207,9 +208,8 @@ dummy := $(call fix-paths,../,, \
               crypto-obj-y \
               io-obj-y \
               qom-obj-y)
-dummy := $(call unnest-vars,.., \
-               common-obj-y \
-               common-obj-m)
+dummy := $(call unnest-vars,..,common-obj-y)
+
 all-obj-y += $(common-obj-y)
 all-obj-y += $(qom-obj-y)
 all-obj-$(CONFIG_SOFTMMU) += $(authz-obj-y)
configure +6 -0
index 7625294..1f39fd4 100755
@@ -6997,12 +6997,18 @@ fi
 if test "$vnc_sasl" = "yes" ; then
   echo "CONFIG_VNC_SASL=y" >> $config_host_mak
 fi
+echo "SASL_CFLAGS=$vnc_sasl_cflags" >> $config_host_mak
+echo "SASL_LIBS=$vnc_sasl_libs" >> $config_host_mak
 if test "$vnc_jpeg" = "yes" ; then
   echo "CONFIG_VNC_JPEG=y" >> $config_host_mak
 fi
+echo "JPEG_CFLAGS=$vnc_jpeg_cflags" >> $config_host_mak
+echo "JPEG_LIBS=$vnc_jpeg_libs" >> $config_host_mak
 if test "$vnc_png" = "yes" ; then
   echo "CONFIG_VNC_PNG=y" >> $config_host_mak
 fi
+echo "PNG_CFLAGS=$vnc_png_cflags" >> $config_host_mak
+echo "PNG_LIBS=$vnc_png_libs" >> $config_host_mak
 if test "$xkbcommon" = "yes" ; then
   echo "CONFIG_XKBCOMMON=y" >> $config_host_mak
   echo "XKBCOMMON_CFLAGS=$xkbcommon_cflags" >> $config_host_mak
meson.build +50 -0

56 lines not on this page · raw message

ui/Makefile.objs deleted +0 -73

73 lines not on this page · raw message

ui/meson.build +82 -1

95 lines not on this page · raw message

ui/shader.c +3 -3
index d78829f..e8b8d32 100644
@@ -27,9 +27,9 @@
 #include "qemu/osdep.h"
 #include "ui/shader.h"
 
-#include "shader/texture-blit-vert.h"
-#include "shader/texture-blit-flip-vert.h"
-#include "shader/texture-blit-frag.h"
+#include "ui/shader/texture-blit-vert.h"
+#include "ui/shader/texture-blit-flip-vert.h"
+#include "ui/shader/texture-blit-frag.h"
 
 struct QemuGLShader {
     GLint texture_blit_prog;
Signature · 1 line
1.8.3.1
#73 lore raw

PATCH 69/147 meson: convert root directory to Meson

In reply to Paolo Bonzini
---
 Makefile.objs   | 21 ++-------------------
 Makefile.target |  2 +-
 configure       |  2 ++
 meson.build     | 33 +++++++++++++++++++++++++++++++++
 4 files changed, 38 insertions(+), 20 deletions(-)
Makefile.objs +2 -19
index 72e9350..ec15ebc 100644
@@ -48,16 +48,9 @@ storage-daemon-obj-$(CONFIG_POSIX) += os-posix.o
 # single QEMU executable should support all CPUs and machines.
 
 ifeq ($(CONFIG_SOFTMMU),y)
-common-obj-y = blockdev.o blockdev-nbd.o
-common-obj-y += bootdevice.o iothread.o
-common-obj-y += dump/
-common-obj-y += job-qmp.o
+common-obj-y = dump/
 common-obj-y += monitor/
 common-obj-y += net/
-common-obj-y += qdev-monitor.o
-common-obj-$(CONFIG_WIN32) += os-win32.o
-common-obj-$(CONFIG_POSIX) += os-posix.o
-
 common-obj-$(CONFIG_LINUX) += fsdev/
 
 common-obj-y += accel/
@@ -87,25 +80,15 @@ common-obj-y += hw/
 common-obj-m += hw/
 
 common-obj-y += replay/
-
-common-obj-y += dma-helpers.o
-common-obj-$(CONFIG_TPM) += tpm.o
-
 common-obj-y += backends/
 
-common-obj-$(CONFIG_SECCOMP) += qemu-seccomp.o
-qemu-seccomp.o-cflags := $(SECCOMP_CFLAGS)
-qemu-seccomp.o-libs := $(SECCOMP_LIBS)
-
-common-obj-$(CONFIG_FDT) += device_tree.o
-
 common-obj-y += qapi/
 
 endif # CONFIG_SOFTMMU
 
 #######################################################################
 # Target-independent parts used in system and user emulation
-common-obj-y += cpus-common.o
+
 common-obj-y += hw/
 common-obj-y += qom/
 common-obj-y += disas/
Makefile.target +1 -1
index 16f1e78..5f926e5 100644
@@ -169,7 +169,7 @@ ifneq ($(CONFIG_MODULES),y)
 LIBS := $(LIBS) $(ALSA_LIBS) $(OSS_LIBS) $(PULSE_LIBS) $(SDL_LIBS)
 LIBS := $(LIBS) $(GTK_LIBS) $(VTE_LIBS) $(X11_LIBS) $(CURSES_LIBS) $(ICONV_LIBS) $(GIO_LIBS)
 endif
-LIBS := $(LIBS) $(BRLAPI_LIBS) $(SDL_LIBS) $(SPICE_LIBS) $(OPENGL_LIBS)
+LIBS := $(LIBS) $(BRLAPI_LIBS) $(SDL_LIBS) $(SPICE_LIBS) $(OPENGL_LIBS) $(SECCOMP_LIBS)
 LIBS := $(LIBS) $(COREAUDIO_LIBS) $(DSOUND_LIBS)
 
 # Hardware support
configure +2 -0
index 1f39fd4..5fb5f2a 100755
@@ -7308,6 +7308,8 @@ if test "$preadv" = "yes" ; then
 fi
 if test "$fdt" != "no" ; then
   echo "CONFIG_FDT=y" >> $config_host_mak
+  echo "FDT_CFLAGS=$fdt_cflags" >> $config_host_mak
+  echo "FDT_LIBS=$fdt_ldflags $fdt_libs" >> $config_host_mak
 fi
 if test "$membarrier" = "yes" ; then
   echo "CONFIG_MEMBARRIER=y" >> $config_host_mak
meson.build +33 -0
index f9e9b92..c923e89 100644
@@ -47,6 +47,7 @@ targetos = host_machine.system()
 
 m = cc.find_library('m', required: false)
 util = cc.find_library('util', required: false)
+winmm = []
 socket = []
 version_res = []
 coref = []
@@ -55,6 +56,7 @@ cocoa = []
 hvf = []
 if host_machine.system() == 'windows'
   socket = cc.find_library('ws2_32')
+  winmm = cc.find_library('winmm')
 
   win = import('windows')
   version_res = win.compile_resources('version.rc',
@@ -281,6 +283,11 @@ if 'CONFIG_VNC_SASL' in config_host
   sasl = declare_dependency(compile_args: config_host['SASL_CFLAGS'].split(),
                             link_args: config_host['SASL_LIBS'].split())
 endif
+fdt = not_found
+if 'CONFIG_FDT' in config_host
+  fdt = declare_dependency(compile_args: config_host['FDT_CFLAGS'].split(),
+                           link_args: config_host['FDT_LIBS'].split())
+endif
 
 create_config = find_program('scripts/create_config')
 minikconf = find_program('scripts/minikconf.py')
@@ -447,6 +454,7 @@ util_ss = ss.source_set()
 stub_ss = ss.source_set()
 trace_ss = ss.source_set()
 block_ss = ss.source_set()
+blockdev_ss = ss.source_set()
 common_ss = ss.source_set()
 softmmu_ss = ss.source_set()
 user_ss = ss.source_set()
@@ -600,6 +608,31 @@ subdir('nbd')
 subdir('scsi')
 subdir('block')
 
+blockdev_ss.add(files(
+  'blockdev.c',
+  'blockdev-nbd.c',
+  'iothread.c',
+  'job-qmp.c',
+), sdl)
+
+# os-posix.c contains POSIX-specific functions used by qemu-storage-daemon,
+# os-win32.c does not
+blockdev_ss.add(when: 'CONFIG_POSIX', if_true: files('os-posix.c'))
+softmmu_ss.add(when: 'CONFIG_WIN32', if_true: [files('os-win32.c')])
+
+softmmu_ss.add_all(blockdev_ss)
+softmmu_ss.add(files(
+  'bootdevice.c',
+  'dma-helpers.c',
+  'qdev-monitor.c',
+), sdl)
+
+softmmu_ss.add(when: 'CONFIG_TPM', if_true: files('tpm.c'))
+softmmu_ss.add(when: 'CONFIG_SECCOMP', if_true: [files('qemu-seccomp.c'), seccomp])
+softmmu_ss.add(when: ['CONFIG_FDT', fdt],  if_true: [files('device_tree.c')])
+
+common_ss.add(files('cpus-common.c'))
+
 # needed for fuzzing binaries
 subdir('tests/qtest/libqos')
 
Signature · 1 line
1.8.3.1
#74 lore raw

PATCH 70/147 meson: convert most of softmmu/

In reply to Paolo Bonzini

Leave out main.c, it's special due to fuzzing.

---
 meson.build           |  2 ++
 softmmu/Makefile.objs | 14 +-------------
 softmmu/meson.build   | 10 ++++++++++
 3 files changed, 13 insertions(+), 13 deletions(-)
 create mode 100644 softmmu/meson.build
meson.build +2 -0
index c923e89..3481c5b 100644
@@ -633,6 +633,8 @@ softmmu_ss.add(when: ['CONFIG_FDT', fdt],  if_true: [files('device_tree.c')])
 
 common_ss.add(files('cpus-common.c'))
 
+subdir('softmmu')
+
 # needed for fuzzing binaries
 subdir('tests/qtest/libqos')
 
softmmu/Makefile.objs +1 -13
index a414a74..ebcfd15 100644
@@ -1,14 +1,2 @@
 softmmu-main-y = softmmu/main.o
-
-obj-y += arch_init.o
-obj-y += cpus.o
-obj-y += cpu-throttle.o
-obj-y += balloon.o
-obj-y += ioport.o
-obj-y += memory.o
-obj-y += memory_mapping.o
-
-obj-y += qtest.o
-
-obj-y += vl.o
-vl.o-cflags := $(GPROF_CFLAGS) $(SDL_CFLAGS)
+main.o-cflags := $(GPROF_CFLAGS) $(SDL_CFLAGS)
softmmu/meson.build new file +10 -0
new file mode 100644
index 0000000..95d38df
@@ -0,0 +1,10 @@
+specific_ss.add(when: 'CONFIG_SOFTMMU', if_true: files(
+  'arch_init.c',
+  'balloon.c',
+  'cpus.c',
+  'cpu-throttle.c',
+  'ioport.c',
+  'memory.c',
+  'memory_mapping.c',
+  'qtest.c',
+  'vl.c'))
Signature · 1 line
1.8.3.1
#75 lore raw

PATCH 71/147 meson: convert trace/

In reply to Paolo Bonzini

From: Marc-André Lureau <[email protected]>

---
 trace/Makefile.objs | 8 --------
 trace/meson.build   | 5 ++++-
 2 files changed, 4 insertions(+), 9 deletions(-)
 delete mode 100644 trace/Makefile.objs
trace/Makefile.objs deleted +0 -8
deleted file mode 100644
index a429474..0000000
@@ -1,8 +0,0 @@
-# -*- mode: makefile -*-
-
-
-##################################################
-# Translation level
-
-obj-y += generated-helpers.o
-obj-y += control-target.o
trace/meson.build +4 -1
index cab36a2..9c3c128 100644
@@ -1,3 +1,5 @@
+specific_ss.add(files('control-target.c'))
+
 trace_events_files = []
 foreach dir : [ '.' ] + trace_events_subdirs
   trace_events_file = meson.source_root() / dir / 'trace-events'
@@ -61,12 +63,13 @@ foreach d : [
   ['generated-helpers.h', 'tcg-helper-h'],
   ['generated-helpers-wrappers.h', 'tcg-helper-wrapper-h'],
 ]
-  custom_target(d[0],
+  gen = custom_target(d[0],
                 output: d[0],
                 input: meson.source_root() / 'trace-events',
                 command: [ tracetool, '--group=root', '--format=@0@'.format(d[1]), '@INPUT@' ],
                 build_by_default: true, # to be removed when added to a target
                 capture: true)
+  specific_ss.add(gen)
 endforeach
 
 if 'CONFIG_TRACE_UST' in config_host
Signature · 1 line
1.8.3.1
#76 lore raw

PATCH 72/147 meson: convert dump/

In reply to Paolo Bonzini

From: Marc-André Lureau <[email protected]>

---
 Makefile.objs      | 3 +--
 Makefile.target    | 1 -
 configure          | 4 ++++
 dump/Makefile.objs | 3 ---
 dump/meson.build   | 4 ++++
 meson.build        | 9 +++++++++
 6 files changed, 18 insertions(+), 6 deletions(-)
 delete mode 100644 dump/Makefile.objs
 create mode 100644 dump/meson.build
Makefile.objs +1 -2
index ec15ebc..6657a6c 100644
@@ -48,8 +48,7 @@ storage-daemon-obj-$(CONFIG_POSIX) += os-posix.o
 # single QEMU executable should support all CPUs and machines.
 
 ifeq ($(CONFIG_SOFTMMU),y)
-common-obj-y = dump/
-common-obj-y += monitor/
+common-obj-y = monitor/
 common-obj-y += net/
 common-obj-$(CONFIG_LINUX) += fsdev/
 
Makefile.target +0 -1
index 5f926e5..c8f7a6c 100644
@@ -156,7 +156,6 @@ endif #CONFIG_BSD_USER
 ifdef CONFIG_SOFTMMU
 obj-y += softmmu/
 obj-y += gdbstub.o
-obj-y += dump/
 obj-y += hw/
 obj-y += monitor/
 obj-y += qapi/
configure +4 -0
index 5fb5f2a..6f02538 100755
@@ -2556,6 +2556,7 @@ int main(void) { lzo_version(); return 0; }
 EOF
     if compile_prog "" "-llzo2" ; then
         libs_softmmu="$libs_softmmu -llzo2"
+        lzo_libs="-llzo2"
         lzo="yes"
     else
         if test "$lzo" = "yes"; then
@@ -2575,6 +2576,7 @@ int main(void) { snappy_max_compressed_length(4096); return 0; }
 EOF
     if compile_prog "" "-lsnappy" ; then
         libs_softmmu="$libs_softmmu -lsnappy"
+        snappy_libs='-lsnappy'
         snappy="yes"
     else
         if test "$snappy" = "yes"; then
@@ -7396,10 +7398,12 @@ fi
 
 if test "$lzo" = "yes" ; then
   echo "CONFIG_LZO=y" >> $config_host_mak
+  echo "LZO_LIBS=$lzo_libs" >> $config_host_mak
 fi
 
 if test "$snappy" = "yes" ; then
   echo "CONFIG_SNAPPY=y" >> $config_host_mak
+  echo "SNAPPY_LIBS=$snappy_libs" >> $config_host_mak
 fi
 
 if test "$bzip2" = "yes" ; then
dump/Makefile.objs deleted +0 -3
deleted file mode 100644
index d2a5db3..0000000
@@ -1,3 +0,0 @@
-obj-y += dump.o
-common-obj-y += dump-hmp-cmds.o
-obj-$(TARGET_X86_64) += win_dump.o
dump/meson.build new file +4 -0
new file mode 100644
index 0000000..2eff29c
@@ -0,0 +1,4 @@
+softmmu_ss.add(files('dump-hmp-cmds.c'))
+
+specific_ss.add(when: 'CONFIG_SOFTMMU', if_true: [files('dump.c'), snappy, lzo])
+specific_ss.add(when: ['CONFIG_SOFTMMU', 'TARGET_X86_64'], if_true: files('win_dump.c'))
meson.build +9 -0
index 3481c5b..dc14a80 100644
@@ -288,6 +288,14 @@ if 'CONFIG_FDT' in config_host
   fdt = declare_dependency(compile_args: config_host['FDT_CFLAGS'].split(),
                            link_args: config_host['FDT_LIBS'].split())
 endif
+snappy = not_found
+if 'CONFIG_SNAPPY' in config_host
+  snappy = declare_dependency(link_args: config_host['SNAPPY_LIBS'].split())
+endif
+lzo = not_found
+if 'CONFIG_LZO' in config_host
+  lzo = declare_dependency(link_args: config_host['LZO_LIBS'].split())
+endif
 
 create_config = find_program('scripts/create_config')
 minikconf = find_program('scripts/minikconf.py')
@@ -595,6 +603,7 @@ subdir('io')
 subdir('chardev')
 subdir('fsdev')
 subdir('target')
+subdir('dump')
 
 block_ss.add(files(
   'block.c',
Signature · 1 line
1.8.3.1
#77 lore raw

PATCH 73/147 meson: convert common QMP bits for qemu and qemu-storage-daemon

In reply to Paolo Bonzini
---
 Makefile.objs         |  8 +++++---
 Makefile.target       |  1 -
 meson.build           | 10 ++++++++++
 monitor/Makefile.objs |  6 ------
 monitor/meson.build   |  9 +++++++++
 qom/Makefile.objs     |  2 --
 qom/meson.build       |  3 +++
 7 files changed, 27 insertions(+), 12 deletions(-)
 delete mode 100644 monitor/Makefile.objs
 create mode 100644 monitor/meson.build
 delete mode 100644 qom/Makefile.objs
Makefile.objs +5 -3
index 6657a6c..d7826c1 100644
@@ -37,10 +37,11 @@ endif # CONFIG_SOFTMMU or CONFIG_TOOLS
 # storage-daemon-obj-y is code used by qemu-storage-daemon (these objects are
 # used for system emulation, too, but specified separately there)
 
-storage-daemon-obj-y = block/ monitor/ qapi/ qom/ storage-daemon/
+storage-daemon-obj-y = block/ qapi/ qom/ storage-daemon/
 storage-daemon-obj-y += blockdev.o blockdev-nbd.o iothread.o job-qmp.o
 storage-daemon-obj-$(CONFIG_WIN32) += os-win32.o
 storage-daemon-obj-$(CONFIG_POSIX) += os-posix.o
+storage-daemon-obj-y += libqmp.fa
 
 ######################################################################
 # Target independent part of system emulation. The long term path is to
@@ -48,8 +49,7 @@ storage-daemon-obj-$(CONFIG_POSIX) += os-posix.o
 # single QEMU executable should support all CPUs and machines.
 
 ifeq ($(CONFIG_SOFTMMU),y)
-common-obj-y = monitor/
-common-obj-y += net/
+common-obj-y = net/
 common-obj-$(CONFIG_LINUX) += fsdev/
 
 common-obj-y += accel/
@@ -83,6 +83,8 @@ common-obj-y += backends/
 
 common-obj-y += qapi/
 
+common-obj-y += libqmp.fa
+
 endif # CONFIG_SOFTMMU
 
 #######################################################################
Makefile.target +0 -1
index c8f7a6c..54a9ef1 100644
@@ -157,7 +157,6 @@ ifdef CONFIG_SOFTMMU
 obj-y += softmmu/
 obj-y += gdbstub.o
 obj-y += hw/
-obj-y += monitor/
 obj-y += qapi/
 obj-y += migration/ram.o
 LIBS := $(libs_softmmu) $(LIBS)
meson.build +10 -0
index dc14a80..a44a172 100644
@@ -463,6 +463,7 @@ stub_ss = ss.source_set()
 trace_ss = ss.source_set()
 block_ss = ss.source_set()
 blockdev_ss = ss.source_set()
+qmp_ss = ss.source_set()
 common_ss = ss.source_set()
 softmmu_ss = ss.source_set()
 user_ss = ss.source_set()
@@ -643,6 +644,7 @@ softmmu_ss.add(when: ['CONFIG_FDT', fdt],  if_true: [files('device_tree.c')])
 common_ss.add(files('cpus-common.c'))
 
 subdir('softmmu')
+subdir('monitor')
 
 # needed for fuzzing binaries
 subdir('tests/qtest/libqos')
@@ -692,6 +694,14 @@ block = declare_dependency(link_whole: [libblock],
                            link_args: '@block.syms',
                            dependencies: [crypto, io])
 
+qmp_ss = qmp_ss.apply(config_host, strict: false)
+libqmp = static_library('qmp', qmp_ss.sources(),
+                        dependencies: qmp_ss.dependencies(),
+                        name_suffix: 'fa',
+                        build_by_default: false)
+
+qmp = declare_dependency(link_whole: [libqmp])
+
 foreach m : mods
   shared_module(m['dir'] + '-' + m['name'],
                 name_prefix: '',
monitor/Makefile.objs deleted +0 -6
deleted file mode 100644
index a8533c9..0000000
@@ -1,6 +0,0 @@
-obj-y += misc.o
-common-obj-y += monitor.o qmp.o hmp.o
-common-obj-y += qmp-cmds.o qmp-cmds-control.o
-common-obj-y += hmp-cmds.o
-
-storage-daemon-obj-y += monitor.o qmp.o qmp-cmds-control.o
monitor/meson.build new file +9 -0
new file mode 100644
index 0000000..0484a64
@@ -0,0 +1,9 @@
+qmp_ss.add(files('monitor.c', 'qmp.c', 'qmp-cmds-control.c'))
+
+softmmu_ss.add(files(
+  'hmp-cmds.c',
+  'hmp.c',
+  'qmp-cmds.c',
+))
+
+specific_ss.add(when: 'CONFIG_SOFTMMU', if_true: files('misc.c'))
qom/Makefile.objs deleted +0 -2
deleted file mode 100644
index b962904..0000000
@@ -1,2 +0,0 @@
-common-obj-$(CONFIG_SOFTMMU) += qom-hmp-cmds.o qom-qmp-cmds.o
-storage-daemon-obj-y += qom-qmp-cmds.o
qom/meson.build +3 -0
index 4af044d..35815f6 100644
@@ -7,6 +7,9 @@ qom_ss.add(files(
   'qom-qobject.c',
 ))
 
+qmp_ss.add(files('qom-qmp-cmds.c'))
+softmmu_ss.add(files('qom-hmp-cmds.c'))
+
 qom_ss = qom_ss.apply(config_host, strict: false)
 libqom = static_library('qom', qom_ss.sources(),
                         dependencies: [qom_ss.dependencies()],
Signature · 1 line
1.8.3.1
#78 lore raw

PATCH 74/147 meson: convert qemu-storage-daemon

In reply to Paolo Bonzini
---
 Makefile                                                    |  5 -----
 Makefile.objs                                               | 10 ----------
 meson.build                                                 |  2 +-
 storage-daemon/Makefile.objs                                |  3 ---
 storage-daemon/meson.build                                  | 13 +++++++++++++
 storage-daemon/qapi/meson.build                             |  5 +----
 .../qemu-storage-daemon.c                                   |  0
 7 files changed, 15 insertions(+), 23 deletions(-)
 delete mode 100644 storage-daemon/Makefile.objs
 rename qemu-storage-daemon.c => storage-daemon/qemu-storage-daemon.c (100%)
Makefile +0 -5
index ac1e31f..64d644d 100644
@@ -163,8 +163,6 @@ include $(SRC_PATH)/Makefile.objs
 endif
 
 dummy := $(call unnest-vars,, \
-                storage-daemon-obj-y \
-                storage-daemon-obj-m \
                 common-obj-y \
                 common-obj-m)
 
@@ -180,7 +178,6 @@ TARGET_DIRS_RULES := $(foreach t, all fuzz clean install, $(addsuffix /$(t), $(T
 SOFTMMU_ALL_RULES=$(filter %-softmmu/all, $(TARGET_DIRS_RULES))
 $(SOFTMMU_ALL_RULES): $(authz-obj-y)
 $(SOFTMMU_ALL_RULES): $(block-obj-y)
-$(SOFTMMU_ALL_RULES): $(storage-daemon-obj-y)
 $(SOFTMMU_ALL_RULES): $(chardev-obj-y)
 $(SOFTMMU_ALL_RULES): $(crypto-obj-y)
 $(SOFTMMU_ALL_RULES): $(io-obj-y)
@@ -271,8 +268,6 @@ Makefile: $(version-obj-y)
 
 COMMON_LDADDS = libqemuutil.a
 
-qemu-storage-daemon$(EXESUF): qemu-storage-daemon.o $(authz-obj-y) $(block-obj-y) $(crypto-obj-y) $(chardev-obj-y) $(io-obj-y) $(qom-obj-y) $(storage-daemon-obj-y) $(COMMON_LDADDS)
-
 clean: recurse-clean
 # avoid old build problems by removing potentially incorrect old files
 	rm -f config.mak op-i386.h opc-i386.h gen-op-i386.h op-arm.h opc-arm.h gen-op-arm.h
Makefile.objs +0 -10
index d7826c1..e304d92 100644
@@ -33,16 +33,6 @@ io-obj-y = io/libio.fa
 
 endif # CONFIG_SOFTMMU or CONFIG_TOOLS
 
-#######################################################################
-# storage-daemon-obj-y is code used by qemu-storage-daemon (these objects are
-# used for system emulation, too, but specified separately there)
-
-storage-daemon-obj-y = block/ qapi/ qom/ storage-daemon/
-storage-daemon-obj-y += blockdev.o blockdev-nbd.o iothread.o job-qmp.o
-storage-daemon-obj-$(CONFIG_WIN32) += os-win32.o
-storage-daemon-obj-$(CONFIG_POSIX) += os-posix.o
-storage-daemon-obj-y += libqmp.fa
-
 ######################################################################
 # Target independent part of system emulation. The long term path is to
 # suppress *all* target specific code in case of system emulation, i.e. a
meson.build +1 -1
index a44a172..b5bbe01 100644
@@ -578,7 +578,6 @@ subdir('util')
 subdir('qom')
 subdir('authz')
 subdir('crypto')
-subdir('storage-daemon')
 subdir('ui')
 
 
@@ -788,6 +787,7 @@ if have_tools
                dependencies: [block, qemuutil], install: true)
   endif
 
+  subdir('storage-daemon')
   subdir('contrib/rdmacm-mux')
   subdir('contrib/elf2dmp')
 
storage-daemon/Makefile.objs deleted +0 -3
deleted file mode 100644
index 41c0d02..0000000
@@ -1,3 +0,0 @@
-storage-daemon-obj-y = qapi/libqsd-qapi.fa
-
-qemu-storage-daemon.o: storage-daemon/qapi/qapi-commands.h storage-daemon/qapi/qapi-init-commands.h
storage-daemon/meson.build +13 -0
index 35f8949..0409acc 100644
@@ -1 +1,14 @@
+qsd_ss = ss.source_set()
+qsd_ss.add(files('qemu-storage-daemon.c'))
+qsd_ss.add(block, chardev, qmp, qom, qemuutil)
+qsd_ss.add_all(blockdev_ss)
+
 subdir('qapi')
+
+if have_tools
+  qsd_ss = qsd_ss.apply(config_host, strict: false)
+  executable('qemu-storage-daemon',
+             qsd_ss.sources(),
+             dependencies: qsd_ss.dependencies(),
+             install: true)
+endif
storage-daemon/qapi/meson.build +1 -4
index a4e24f3..cd064ac 100644
@@ -4,7 +4,4 @@ qsd_qapi_files = custom_target('QAPI files for qemu-storage-daemon',
                                command: [ qapi_gen, '-o', 'storage-daemon/qapi', '@INPUT@' ],
                                depend_files: [ qapi_inputs, qapi_gen_depends ])
 
-static_library('qsd-qapi',
-               qsd_qapi_files.to_list(),
-               name_suffix: 'fa',
-               build_by_default: false)
+qsd_ss.add(qsd_qapi_files.to_list())
storage-daemon/qemu-storage-daemon.c renamed from qemu-storage-daemon.c +0 -0
similarity index 100%
rename from qemu-storage-daemon.c
rename to storage-daemon/qemu-storage-daemon.c
Signature · 1 line
1.8.3.1
#79 lore raw

PATCH 75/147 meson: convert replay directory to Meson

In reply to Paolo Bonzini

From: Marc-André Lureau <[email protected]>

---
 Makefile.objs        |  1 -
 meson.build          |  1 +
 replay/Makefile.objs | 10 ----------
 replay/meson.build   | 12 ++++++++++++
 4 files changed, 13 insertions(+), 11 deletions(-)
 delete mode 100644 replay/Makefile.objs
 create mode 100644 replay/meson.build
Makefile.objs +0 -1
index e304d92..cfb2cf2 100644
@@ -68,7 +68,6 @@ common-obj-$(if $(and $(CONFIG_BZIP2),$(CONFIG_DMG)),m) += block-dmg-bz2$(DSOSUF
 common-obj-y += hw/
 common-obj-m += hw/
 
-common-obj-y += replay/
 common-obj-y += backends/
 
 common-obj-y += qapi/
meson.build +1 -0
index b5bbe01..634281f 100644
@@ -644,6 +644,7 @@ common_ss.add(files('cpus-common.c'))
 
 subdir('softmmu')
 subdir('monitor')
+subdir('replay')
 
 # needed for fuzzing binaries
 subdir('tests/qtest/libqos')
replay/Makefile.objs deleted +0 -10
deleted file mode 100644
index 939be96..0000000
@@ -1,10 +0,0 @@
-common-obj-y += replay.o
-common-obj-y += replay-internal.o
-common-obj-y += replay-events.o
-common-obj-y += replay-time.o
-common-obj-y += replay-input.o
-common-obj-y += replay-char.o
-common-obj-y += replay-snapshot.o
-common-obj-y += replay-net.o
-common-obj-y += replay-audio.o
-common-obj-y += replay-random.o
replay/meson.build new file +12 -0
new file mode 100644
index 0000000..8783aea
@@ -0,0 +1,12 @@
+softmmu_ss.add(files(
+  'replay.c',
+  'replay-internal.c',
+  'replay-events.c',
+  'replay-time.c',
+  'replay-input.c',
+  'replay-char.c',
+  'replay-snapshot.c',
+  'replay-net.c',
+  'replay-audio.c',
+  'replay-random.c',
+))
Signature · 1 line
1.8.3.1
#80 lore raw

PATCH 76/147 meson: convert migration directory to Meson

In reply to Paolo Bonzini

From: Marc-André Lureau <[email protected]>

---
 Makefile.objs           |  1 -
 Makefile.target         |  1 -
 meson.build             |  5 +++++
 migration/Makefile.objs | 18 ------------------
 migration/meson.build   | 40 ++++++++++++++++++++++++++++++++++++++++
 tests/Makefile.include  |  7 +++----
 6 files changed, 48 insertions(+), 24 deletions(-)
 delete mode 100644 migration/Makefile.objs
 create mode 100644 migration/meson.build
Makefile.objs +0 -1
index cfb2cf2..9d0a82d 100644
@@ -43,7 +43,6 @@ common-obj-y = net/
 common-obj-$(CONFIG_LINUX) += fsdev/
 
 common-obj-y += accel/
-common-obj-y += migration/
 
 common-obj-$(CONFIG_AUDIO_ALSA) += audio-alsa$(DSOSUF)
 common-obj-$(CONFIG_AUDIO_OSS) += audio-oss$(DSOSUF)
Makefile.target +0 -1
index 54a9ef1..4d912df 100644
@@ -158,7 +158,6 @@ obj-y += softmmu/
 obj-y += gdbstub.o
 obj-y += hw/
 obj-y += qapi/
-obj-y += migration/ram.o
 LIBS := $(libs_softmmu) $(LIBS)
 
 # Temporary until emulators are linked by Meson
meson.build +5 -0
index 634281f..d264d9e 100644
@@ -296,6 +296,10 @@ lzo = not_found
 if 'CONFIG_LZO' in config_host
   lzo = declare_dependency(link_args: config_host['LZO_LIBS'].split())
 endif
+rdma = not_found
+if 'CONFIG_RDMA' in config_host
+  rdma = declare_dependency(link_args: config_host['RDMA_LIBS'].split())
+endif
 
 create_config = find_program('scripts/create_config')
 minikconf = find_program('scripts/minikconf.py')
@@ -643,6 +647,7 @@ softmmu_ss.add(when: ['CONFIG_FDT', fdt],  if_true: [files('device_tree.c')])
 common_ss.add(files('cpus-common.c'))
 
 subdir('softmmu')
+subdir('migration')
 subdir('monitor')
 subdir('replay')
 
migration/Makefile.objs deleted +0 -18
deleted file mode 100644
index 0fc619e..0000000
@@ -1,18 +0,0 @@
-common-obj-y += migration.o socket.o fd.o exec.o
-common-obj-y += tls.o channel.o savevm.o
-common-obj-y += colo.o colo-failover.o
-common-obj-y += vmstate.o vmstate-types.o page_cache.o
-common-obj-y += qemu-file.o global_state.o
-common-obj-y += qemu-file-channel.o
-common-obj-y += xbzrle.o postcopy-ram.o
-common-obj-y += qjson.o
-common-obj-y += block-dirty-bitmap.o
-common-obj-y += multifd.o
-common-obj-y += multifd-zlib.o
-common-obj-$(CONFIG_ZSTD) += multifd-zstd.o
-
-common-obj-$(CONFIG_RDMA) += rdma.o
-
-common-obj-$(CONFIG_LIVE_BLOCK_MIGRATION) += block.o
-
-rdma.o-libs := $(RDMA_LIBS)
migration/meson.build new file +40 -0
new file mode 100644
index 0000000..ac8ff14
@@ -0,0 +1,40 @@
+# Files needed by unit tests
+migration_files = files(
+  'page_cache.c',
+  'xbzrle.c',
+  'vmstate-types.c',
+  'vmstate.c',
+  'qemu-file-channel.c',
+  'qemu-file.c',
+  'qjson.c',
+)
+
+libmigration = static_library('migration', sources: migration_files + genh,
+                              name_suffix: 'fa',
+                              build_by_default: false)
+migration = declare_dependency(link_with: libmigration,
+                               dependencies: [zlib, qom, io])
+softmmu_ss.add(migration)
+
+softmmu_ss.add(files(
+  'block-dirty-bitmap.c',
+  'channel.c',
+  'colo-failover.c',
+  'colo.c',
+  'exec.c',
+  'fd.c',
+  'global_state.c',
+  'migration.c',
+  'multifd.c',
+  'multifd-zlib.c',
+  'postcopy-ram.c',
+  'savevm.c',
+  'socket.c',
+  'tls.c',
+))
+
+softmmu_ss.add(when: ['CONFIG_RDMA', rdma], if_true: files('rdma.c'))
+softmmu_ss.add(when: 'CONFIG_LIVE_BLOCK_MIGRATION', if_true: files('block.c'))
+softmmu_ss.add(when: 'CONFIG_ZSTD', if_true: [files('multifd-zstd.c'), zstd])
+
+specific_ss.add(when: 'CONFIG_SOFTMMU', if_true: files('ram.c'))
tests/Makefile.include +3 -4
index 66acf9c..425c8ce 100644
@@ -227,7 +227,8 @@ tests/test-iov$(EXESUF): tests/test-iov.o $(test-util-obj-y)
 tests/test-hbitmap$(EXESUF): tests/test-hbitmap.o $(test-util-obj-y) $(test-crypto-obj-y)
 tests/test-bitmap$(EXESUF): tests/test-bitmap.o $(test-util-obj-y)
 tests/test-x86-cpuid$(EXESUF): tests/test-x86-cpuid.o
-tests/test-xbzrle$(EXESUF): tests/test-xbzrle.o migration/xbzrle.o migration/page_cache.o $(test-util-obj-y)
+tests/test-xbzrle$(EXESUF): tests/test-xbzrle.o migration/libmigration.fa $(test-util-obj-y) \
+	$(test-io-obj-y)
 tests/test-cutils$(EXESUF): tests/test-cutils.o util/cutils.o $(test-util-obj-y)
 tests/test-int128$(EXESUF): tests/test-int128.o
 tests/rcutorture$(EXESUF): tests/rcutorture.o $(test-util-obj-y)
@@ -253,9 +254,7 @@ tests/test-qdev-global-props$(EXESUF): tests/test-qdev-global-props.o \
 	hw/core/vmstate-if.o \
 	hw/core/clock.o hw/core/qdev-clock.o \
 	$(test-qapi-obj-y)
-tests/test-vmstate$(EXESUF): tests/test-vmstate.o \
-	migration/vmstate.o migration/vmstate-types.o migration/qemu-file.o \
-        migration/qemu-file-channel.o migration/qjson.o \
+tests/test-vmstate$(EXESUF): tests/test-vmstate.o migration/libmigration.fa \
 	$(test-io-obj-y)
 tests/test-timed-average$(EXESUF): tests/test-timed-average.o $(test-util-obj-y)
 tests/test-base64$(EXESUF): tests/test-base64.o $(test-util-obj-y)
Signature · 1 line
1.8.3.1
#81 lore raw

PATCH 77/147 meson: convert net directory to Meson

In reply to Paolo Bonzini

From: Marc-André Lureau <[email protected]>

---
 Makefile.objs         |  3 +--
 Makefile.target       |  1 +
 meson.build           | 10 ++++++++++
 net/Makefile.objs     | 32 --------------------------------
 net/can/Makefile.objs |  2 --
 net/can/meson.build   |  5 +++++
 net/meson.build       | 40 ++++++++++++++++++++++++++++++++++++++++
 7 files changed, 57 insertions(+), 36 deletions(-)
 delete mode 100644 net/Makefile.objs
 delete mode 100644 net/can/Makefile.objs
 create mode 100644 net/can/meson.build
 create mode 100644 net/meson.build
Makefile.objs +1 -2
index 9d0a82d..f270044 100644
@@ -39,8 +39,7 @@ endif # CONFIG_SOFTMMU or CONFIG_TOOLS
 # single QEMU executable should support all CPUs and machines.
 
 ifeq ($(CONFIG_SOFTMMU),y)
-common-obj-y = net/
-common-obj-$(CONFIG_LINUX) += fsdev/
+common-obj-$(CONFIG_LINUX) = fsdev/
 
 common-obj-y += accel/
 
Makefile.target +1 -0
index 4d912df..bf3fda9 100644
@@ -168,6 +168,7 @@ LIBS := $(LIBS) $(GTK_LIBS) $(VTE_LIBS) $(X11_LIBS) $(CURSES_LIBS) $(ICONV_LIBS)
 endif
 LIBS := $(LIBS) $(BRLAPI_LIBS) $(SDL_LIBS) $(SPICE_LIBS) $(OPENGL_LIBS) $(SECCOMP_LIBS)
 LIBS := $(LIBS) $(COREAUDIO_LIBS) $(DSOUND_LIBS)
+LIBS := $(LIBS) $(VDE_LIBS) $(SLIRP_LIBS)
 
 # Hardware support
 ifeq ($(TARGET_NAME), sparc64)
meson.build +10 -0
index d264d9e..151f4ca 100644
@@ -137,6 +137,15 @@ if 'CONFIG_XKBCOMMON' in config_host
   xkbcommon = declare_dependency(compile_args: config_host['XKBCOMMON_CFLAGS'].split(),
                                  link_args: config_host['XKBCOMMON_LIBS'].split())
 endif
+slirp = not_found
+if config_host.has_key('CONFIG_SLIRP')
+  slirp = declare_dependency(compile_args: config_host['SLIRP_CFLAGS'].split(),
+                             link_args: config_host['SLIRP_LIBS'].split())
+endif
+vde = not_found
+if config_host.has_key('CONFIG_VDE')
+  vde = declare_dependency(link_args: config_host['VDE_LIBS'].split())
+endif
 pulse = not_found
 if 'CONFIG_LIBPULSE' in config_host
   pulse = declare_dependency(compile_args: config_host['PULSE_CFLAGS'].split(),
@@ -649,6 +658,7 @@ common_ss.add(files('cpus-common.c'))
 subdir('softmmu')
 subdir('migration')
 subdir('monitor')
+subdir('net')
 subdir('replay')
 
 # needed for fuzzing binaries
net/Makefile.objs deleted +0 -32
deleted file mode 100644
index 5ab4554..0000000
@@ -1,32 +0,0 @@
-common-obj-y = net.o queue.o checksum.o util.o hub.o
-common-obj-y += socket.o
-common-obj-y += dump.o
-common-obj-y += eth.o
-common-obj-y += announce.o
-common-obj-$(CONFIG_L2TPV3) += l2tpv3.o
-common-obj-$(call land,$(CONFIG_VIRTIO_NET),$(CONFIG_VHOST_NET_USER)) += vhost-user.o
-common-obj-$(call land,$(call lnot,$(CONFIG_VIRTIO_NET)),$(CONFIG_VHOST_NET_USER)) += vhost-user-stub.o
-common-obj-$(CONFIG_ALL) += vhost-user-stub.o
-common-obj-$(CONFIG_SLIRP) += slirp.o
-slirp.o-cflags := $(SLIRP_CFLAGS)
-slirp.o-libs := $(SLIRP_LIBS)
-common-obj-$(CONFIG_VDE) += vde.o
-common-obj-$(CONFIG_NETMAP) += netmap.o
-common-obj-y += filter.o
-common-obj-y += filter-buffer.o
-common-obj-y += filter-mirror.o
-common-obj-y += colo-compare.o
-common-obj-y += colo.o
-common-obj-y += filter-rewriter.o
-common-obj-y += filter-replay.o
-
-tap-obj-$(CONFIG_LINUX) = tap-linux.o
-tap-obj-$(CONFIG_BSD) = tap-bsd.o
-tap-obj-$(CONFIG_SOLARIS) = tap-solaris.o
-tap-obj-y ?= tap-stub.o
-common-obj-$(CONFIG_POSIX) += tap.o $(tap-obj-y)
-common-obj-$(CONFIG_WIN32) += tap-win32.o
-common-obj-$(CONFIG_VHOST_NET_VDPA) += vhost-vdpa.o
-vde.o-libs = $(VDE_LIBS)
-
-common-obj-$(CONFIG_CAN_BUS) += can/
net/can/Makefile.objs deleted +0 -2
deleted file mode 100644
index 9f35dc5..0000000
@@ -1,2 +0,0 @@
-common-obj-y += can_core.o can_host.o
-common-obj-$(CONFIG_LINUX) += can_socketcan.o
net/can/meson.build new file +5 -0
new file mode 100644
index 0000000..f53d9ec
@@ -0,0 +1,5 @@
+can_ss = ss.source_set()
+can_ss.add(files('can_core.c', 'can_host.c'))
+can_ss.add(when: 'CONFIG_LINUX', if_true: files('can_socketcan.c'))
+
+softmmu_ss.add_all(when: 'CONFIG_CAN_BUS', if_true: can_ss)
net/meson.build new file +40 -0
new file mode 100644
index 0000000..6c2ec47
@@ -0,0 +1,40 @@
+softmmu_ss.add(files(
+  'announce.c',
+  'checksum.c',
+  'colo-compare.c',
+  'colo.c',
+  'dump.c',
+  'eth.c',
+  'filter-buffer.c',
+  'filter-mirror.c',
+  'filter-replay.c',
+  'filter-rewriter.c',
+  'filter.c',
+  'hub.c',
+  'net.c',
+  'queue.c',
+  'socket.c',
+  'util.c',
+))
+
+softmmu_ss.add(when: 'CONFIG_L2TPV3', if_true: files('l2tpv3.c'))
+softmmu_ss.add(when: ['CONFIG_SLIRP', slirp], if_true: files('slirp.c'))
+softmmu_ss.add(when: ['CONFIG_VDE', vde], if_true: files('vde.c'))
+softmmu_ss.add(when: 'CONFIG_NETMAP', if_true: files('netmap.c'))
+vhost_user_ss = ss.source_set()
+vhost_user_ss.add(when: 'CONFIG_VIRTIO_NET', if_true: files('vhost-user.c'), if_false: files('vhost-user-stub.c'))
+softmmu_ss.add_all(when: 'CONFIG_VHOST_NET_USER', if_true: vhost_user_ss)
+softmmu_ss.add(when: 'CONFIG_ALL', if_true: files('vhost-user-stub.c'))
+
+softmmu_ss.add(when: 'CONFIG_LINUX', if_true: files('tap-linux.c'))
+softmmu_ss.add(when: 'CONFIG_BSD', if_true: files('tap-bsd.c'))
+softmmu_ss.add(when: 'CONFIG_SOLARIS', if_true: files('tap-solaris.c'))
+tap_posix = ['tap.c']
+if not config_host.has_key('CONFIG_LINUX') and not config_host.has_key('CONFIG_BSD') and not config_host.has_key('CONFIG_SOLARIS')
+  tap_posix += 'tap-stub.c'
+endif
+softmmu_ss.add(when: 'CONFIG_POSIX', if_true: files(tap_posix))
+softmmu_ss.add(when: 'CONFIG_WIN32', if_true: files('tap-win32.c'))
+softmmu_ss.add(when: 'CONFIG_VHOST_NET_VDPA', if_true: files('vhost-vdpa.c'))
+
+subdir('can')
Signature · 1 line
1.8.3.1
#82 lore raw

PATCH 78/147 meson: convert backends directory to Meson

In reply to Paolo Bonzini

From: Marc-André Lureau <[email protected]>

---
 Makefile.objs              |  2 --
 backends/Makefile.objs     | 23 -----------------------
 backends/meson.build       | 19 +++++++++++++++++++
 backends/tpm/Makefile.objs |  4 ----
 backends/tpm/meson.build   |  8 ++++++++
 configure                  |  2 ++
 meson.build                |  5 +++++
 7 files changed, 34 insertions(+), 29 deletions(-)
 delete mode 100644 backends/Makefile.objs
 create mode 100644 backends/meson.build
 delete mode 100644 backends/tpm/Makefile.objs
 create mode 100644 backends/tpm/meson.build
Makefile.objs +0 -2
index f270044..c00851a 100644
@@ -66,8 +66,6 @@ common-obj-$(if $(and $(CONFIG_BZIP2),$(CONFIG_DMG)),m) += block-dmg-bz2$(DSOSUF
 common-obj-y += hw/
 common-obj-m += hw/
 
-common-obj-y += backends/
-
 common-obj-y += qapi/
 
 common-obj-y += libqmp.fa
backends/Makefile.objs deleted +0 -23
deleted file mode 100644
index 22d204c..0000000
@@ -1,23 +0,0 @@
-common-obj-y += rng.o rng-egd.o rng-builtin.o
-common-obj-$(CONFIG_POSIX) += rng-random.o
-
-common-obj-$(CONFIG_TPM) += tpm/
-
-common-obj-y += hostmem.o hostmem-ram.o
-common-obj-$(CONFIG_POSIX) += hostmem-file.o
-
-common-obj-y += cryptodev.o
-common-obj-y += cryptodev-builtin.o
-
-ifeq ($(CONFIG_VIRTIO_CRYPTO),y)
-common-obj-y += cryptodev-vhost.o
-common-obj-$(CONFIG_VHOST_CRYPTO) += cryptodev-vhost-user.o
-endif
-
-common-obj-$(call land,$(CONFIG_VHOST_USER),$(CONFIG_VIRTIO)) += vhost-user.o
-
-common-obj-$(CONFIG_LINUX) += hostmem-memfd.o
-
-common-obj-$(CONFIG_GIO) += dbus-vmstate.o
-dbus-vmstate.o-cflags = $(GIO_CFLAGS)
-dbus-vmstate.o-libs = $(GIO_LIBS)
backends/meson.build new file +19 -0
new file mode 100644
index 0000000..484456e
@@ -0,0 +1,19 @@
+softmmu_ss.add([files(
+  'cryptodev-builtin.c',
+  'cryptodev.c',
+  'hostmem-ram.c',
+  'hostmem.c',
+  'rng-builtin.c',
+  'rng-egd.c',
+  'rng.c',
+), numa])
+
+softmmu_ss.add(when: 'CONFIG_POSIX', if_true: files('rng-random.c'))
+softmmu_ss.add(when: 'CONFIG_POSIX', if_true: files('hostmem-file.c'))
+softmmu_ss.add(when: 'CONFIG_LINUX', if_true: files('hostmem-memfd.c'))
+softmmu_ss.add(when: ['CONFIG_VHOST_USER', 'CONFIG_VIRTIO'], if_true: files('vhost-user.c'))
+softmmu_ss.add(when: 'CONFIG_VIRTIO_CRYPTO', if_true: files('cryptodev-vhost.c'))
+softmmu_ss.add(when: ['CONFIG_VIRTIO_CRYPTO', 'CONFIG_VHOST_CRYPTO'], if_true: files('cryptodev-vhost-user.c'))
+softmmu_ss.add(when: 'CONFIG_GIO', if_true: [files('dbus-vmstate.c'), gio])
+
+subdir('tpm')
backends/tpm/Makefile.objs deleted +0 -4
deleted file mode 100644
index db2731f..0000000
@@ -1,4 +0,0 @@
-common-obj-y += tpm_backend.o
-common-obj-y += tpm_util.o
-common-obj-$(CONFIG_TPM_PASSTHROUGH) += tpm_passthrough.o
-common-obj-$(CONFIG_TPM_EMULATOR) += tpm_emulator.o
backends/tpm/meson.build new file +8 -0
new file mode 100644
index 0000000..8579290
@@ -0,0 +1,8 @@
+tpm_ss = ss.source_set()
+
+tpm_ss.add(files('tpm_backend.c'))
+tpm_ss.add(files('tpm_util.c'))
+tpm_ss.add(when: 'CONFIG_TPM_PASSTHROUGH', if_true: files('tpm_passthrough.c'))
+tpm_ss.add(when: 'CONFIG_TPM_EMULATOR', if_true: files('tpm_emulator.c'))
+
+softmmu_ss.add_all(when: 'CONFIG_TPM', if_true: tpm_ss)
configure +2 -0
index 6f02538..f3baba1 100755
@@ -4678,6 +4678,7 @@ EOF
   if compile_prog "" "-lnuma" ; then
     numa=yes
     libs_softmmu="-lnuma $libs_softmmu"
+    numa_libs="-lnuma"
   else
     if test "$numa" = "yes" ; then
       feature_not_found "numa" "install numactl devel"
@@ -8314,6 +8315,7 @@ fi
 
 if test "$numa" = "yes"; then
   echo "CONFIG_NUMA=y" >> $config_host_mak
+  echo "NUMA_LIBS=$numa_libs" >> $config_host_mak
 fi
 
 if test "$ccache_cpp2" = "yes"; then
meson.build +5 -0
index 151f4ca..67e7342 100644
@@ -309,6 +309,10 @@ rdma = not_found
 if 'CONFIG_RDMA' in config_host
   rdma = declare_dependency(link_args: config_host['RDMA_LIBS'].split())
 endif
+numa = not_found
+if 'CONFIG_NUMA' in config_host
+  numa = declare_dependency(link_args: config_host['NUMA_LIBS'].split())
+endif
 
 create_config = find_program('scripts/create_config')
 minikconf = find_program('scripts/minikconf.py')
@@ -656,6 +660,7 @@ softmmu_ss.add(when: ['CONFIG_FDT', fdt],  if_true: [files('device_tree.c')])
 common_ss.add(files('cpus-common.c'))
 
 subdir('softmmu')
+subdir('backends')
 subdir('migration')
 subdir('monitor')
 subdir('net')
Signature · 1 line
1.8.3.1
#83 lore raw

PATCH 79/147 meson: convert fsdev/

In reply to Paolo Bonzini

From: Marc-André Lureau <[email protected]>

---
 Makefile.objs       |  4 +---
 fsdev/Makefile.objs | 12 ------------
 fsdev/meson.build   | 10 ++++++++++
 3 files changed, 11 insertions(+), 15 deletions(-)
 delete mode 100644 fsdev/Makefile.objs
Makefile.objs +1 -3
index c00851a..7158031 100644
@@ -39,9 +39,7 @@ endif # CONFIG_SOFTMMU or CONFIG_TOOLS
 # single QEMU executable should support all CPUs and machines.
 
 ifeq ($(CONFIG_SOFTMMU),y)
-common-obj-$(CONFIG_LINUX) = fsdev/
-
-common-obj-y += accel/
+common-obj-y = accel/
 
 common-obj-$(CONFIG_AUDIO_ALSA) += audio-alsa$(DSOSUF)
 common-obj-$(CONFIG_AUDIO_OSS) += audio-oss$(DSOSUF)
fsdev/Makefile.objs deleted +0 -12
deleted file mode 100644
index 42cd70c..0000000
@@ -1,12 +0,0 @@
-# Lots of the fsdev/9pcode is pulled in by vl.c via qemu_fsdev_add.
-# only pull in the actual 9p backend if we also enabled virtio or xen.
-ifeq ($(CONFIG_FSDEV_9P),y)
-common-obj-y = qemu-fsdev.o 9p-marshal.o 9p-iov-marshal.o
-else
-common-obj-y = qemu-fsdev-dummy.o
-endif
-common-obj-y += qemu-fsdev-opts.o qemu-fsdev-throttle.o
-
-# Toplevel always builds this; targets without virtio will put it in
-# common-obj-y
-common-obj-$(CONFIG_ALL) += qemu-fsdev-dummy.o
fsdev/meson.build +10 -0
index 30e2319..7dd1cc9 100644
@@ -1,3 +1,13 @@
+fsdev_ss = ss.source_set()
+fsdev_ss.add(files('qemu-fsdev-opts.c', 'qemu-fsdev-throttle.c'))
+fsdev_ss.add(when: 'CONFIG_ALL', if_true: files('qemu-fsdev-dummy.c'))
+fsdev_ss.add(when: ['CONFIG_FSDEV_9P'], if_true: files(
+  '9p-iov-marshal.c',
+  '9p-marshal.c',
+  'qemu-fsdev.c',
+), if_false: files('qemu-fsdev-dummy.c'))
+softmmu_ss.add_all(when: 'CONFIG_LINUX', if_true: fsdev_ss)
+
 have_virtfs_proxy_helper = have_tools and libattr.found() and libcap_ng.found() and 'CONFIG_VIRTFS' in config_host
 if have_virtfs_proxy_helper
   executable('virtfs-proxy-helper',
Signature · 1 line
1.8.3.1
#84 lore raw

PATCH 80/147 meson: convert disas directory to Meson

In reply to Paolo Bonzini

From: Marc-André Lureau <[email protected]>

---
 Makefile.objs               |  2 --
 disas/Makefile.objs         | 30 ------------------------------
 disas/libvixl/Makefile.objs |  5 -----
 disas/libvixl/meson.build   |  7 +++++++
 disas/meson.build           | 27 +++++++++++++++++++++++++++
 meson.build                 |  1 +
 6 files changed, 35 insertions(+), 37 deletions(-)
 delete mode 100644 disas/Makefile.objs
 delete mode 100644 disas/libvixl/Makefile.objs
 create mode 100644 disas/libvixl/meson.build
 create mode 100644 disas/meson.build
Makefile.objs +0 -2
index 7158031..3b32a4c 100644
@@ -74,8 +74,6 @@ endif # CONFIG_SOFTMMU
 # Target-independent parts used in system and user emulation
 
 common-obj-y += hw/
-common-obj-y += qom/
-common-obj-y += disas/
 
 ######################################################################
 # Resource file for Windows executables
disas/Makefile.objs deleted +0 -30
deleted file mode 100644
index 3c1cdce..0000000
@@ -1,30 +0,0 @@
-
-common-obj-$(CONFIG_ALPHA_DIS) += alpha.o
-common-obj-$(CONFIG_ARM_DIS) += arm.o
-common-obj-$(CONFIG_ARM_A64_DIS) += arm-a64.o
-common-obj-$(CONFIG_ARM_A64_DIS) += libvixl/
-libvixldir = $(SRC_PATH)/disas/libvixl
-# The -Wno-sign-compare is needed only for gcc 4.6, which complains about
-# some signed-unsigned equality comparisons in libvixl which later gcc
-# versions do not.
-arm-a64.o-cflags := -I$(libvixldir) -Wno-sign-compare
-common-obj-$(CONFIG_CRIS_DIS) += cris.o
-common-obj-$(CONFIG_HPPA_DIS) += hppa.o
-common-obj-$(CONFIG_I386_DIS) += i386.o
-common-obj-$(CONFIG_M68K_DIS) += m68k.o
-common-obj-$(CONFIG_MICROBLAZE_DIS) += microblaze.o
-common-obj-$(CONFIG_MIPS_DIS) += mips.o
-common-obj-$(CONFIG_NANOMIPS_DIS) += nanomips.o
-common-obj-$(CONFIG_NIOS2_DIS) += nios2.o
-common-obj-$(CONFIG_MOXIE_DIS) += moxie.o
-common-obj-$(CONFIG_PPC_DIS) += ppc.o
-common-obj-$(CONFIG_RISCV_DIS) += riscv.o
-common-obj-$(CONFIG_S390_DIS) += s390.o
-common-obj-$(CONFIG_SH4_DIS) += sh4.o
-common-obj-$(CONFIG_SPARC_DIS) += sparc.o
-common-obj-$(CONFIG_LM32_DIS) += lm32.o
-common-obj-$(CONFIG_XTENSA_DIS) += xtensa.o
-
-# TODO: As long as the TCG interpreter and its generated code depend
-# on the QEMU target, we cannot compile the disassembler here.
-#common-obj-$(CONFIG_TCI_DIS) += tci.o
disas/libvixl/Makefile.objs deleted +0 -5
deleted file mode 100644
index 99a637f..0000000
@@ -1,5 +0,0 @@
-common-obj-$(CONFIG_ARM_A64_DIS) = vixl/utils.o \
-               vixl/compiler-intrinsics.o \
-               vixl/a64/instructions-a64.o \
-               vixl/a64/decoder-a64.o \
-               vixl/a64/disasm-a64.o
disas/libvixl/meson.build new file +7 -0
new file mode 100644
index 0000000..5e2eb33
@@ -0,0 +1,7 @@
+libvixl_ss.add(files(
+  'vixl/a64/decoder-a64.cc',
+  'vixl/a64/disasm-a64.cc',
+  'vixl/a64/instructions-a64.cc',
+  'vixl/compiler-intrinsics.cc',
+  'vixl/utils.cc',
+))
disas/meson.build new file +27 -0
new file mode 100644
index 0000000..0527d69
@@ -0,0 +1,27 @@
+libvixl_ss = ss.source_set()
+subdir('libvixl')
+
+common_ss.add(when: 'CONFIG_ALPHA_DIS', if_true: files('alpha.c'))
+common_ss.add(when: 'CONFIG_ARM_A64_DIS', if_true: files('arm-a64.cc'))
+common_ss.add_all(when: 'CONFIG_ARM_A64_DIS', if_true: libvixl_ss)
+common_ss.add(when: 'CONFIG_ARM_DIS', if_true: files('arm.c'))
+common_ss.add(when: 'CONFIG_CRIS_DIS', if_true: files('cris.c'))
+common_ss.add(when: 'CONFIG_HPPA_DIS', if_true: files('hppa.c'))
+common_ss.add(when: 'CONFIG_I386_DIS', if_true: files('i386.c'))
+common_ss.add(when: 'CONFIG_LM32_DIS', if_true: files('lm32.c'))
+common_ss.add(when: 'CONFIG_M68K_DIS', if_true: files('m68k.c'))
+common_ss.add(when: 'CONFIG_MICROBLAZE_DIS', if_true: files('microblaze.c'))
+common_ss.add(when: 'CONFIG_MIPS_DIS', if_true: files('mips.c'))
+common_ss.add(when: 'CONFIG_MOXIE_DIS', if_true: files('moxie.c'))
+common_ss.add(when: 'CONFIG_NANOMIPS_DIS', if_true: files('nanomips.cpp'))
+common_ss.add(when: 'CONFIG_NIOS2_DIS', if_true: files('nios2.c'))
+common_ss.add(when: 'CONFIG_PPC_DIS', if_true: files('ppc.c'))
+common_ss.add(when: 'CONFIG_RISCV_DIS', if_true: files('riscv.c'))
+common_ss.add(when: 'CONFIG_S390_DIS', if_true: files('s390.c'))
+common_ss.add(when: 'CONFIG_SH4_DIS', if_true: files('sh4.c'))
+common_ss.add(when: 'CONFIG_SPARC_DIS', if_true: files('sparc.c'))
+common_ss.add(when: 'CONFIG_XTENSA_DIS', if_true: files('xtensa.c'))
+
+# TODO: As long as the TCG interpreter and its generated code depend
+# on the QEMU target, we cannot compile the disassembler here.
+#common_ss.add(when: 'CONFIG_TCI_DIS', if_true: files('tci.c'))
meson.build +1 -0
index 67e7342..49ad9e7 100644
@@ -661,6 +661,7 @@ common_ss.add(files('cpus-common.c'))
 
 subdir('softmmu')
 subdir('backends')
+subdir('disas')
 subdir('migration')
 subdir('monitor')
 subdir('net')
Signature · 1 line
1.8.3.1
#85 lore raw

PATCH 81/147 meson: convert qapi-specific to meson

In reply to Paolo Bonzini

From: Marc-André Lureau <[email protected]>

---
 Makefile.objs      |  2 --
 Makefile.target    |  1 -
 qapi/Makefile.objs | 15 ---------------
 qapi/meson.build   | 10 +++++++---
 4 files changed, 7 insertions(+), 21 deletions(-)
 delete mode 100644 qapi/Makefile.objs
Makefile.objs +0 -2
index 3b32a4c..c332323 100644
@@ -64,8 +64,6 @@ common-obj-$(if $(and $(CONFIG_BZIP2),$(CONFIG_DMG)),m) += block-dmg-bz2$(DSOSUF
 common-obj-y += hw/
 common-obj-m += hw/
 
-common-obj-y += qapi/
-
 common-obj-y += libqmp.fa
 
 endif # CONFIG_SOFTMMU
Makefile.target +0 -1
index bf3fda9..386378b 100644
@@ -157,7 +157,6 @@ ifdef CONFIG_SOFTMMU
 obj-y += softmmu/
 obj-y += gdbstub.o
 obj-y += hw/
-obj-y += qapi/
 LIBS := $(libs_softmmu) $(LIBS)
 
 # Temporary until emulators are linked by Meson
qapi/Makefile.objs deleted +0 -15
deleted file mode 100644
index c0a31be..0000000
@@ -1,15 +0,0 @@
-QAPI_TARGET_MODULES = machine-target misc-target
-
-obj-y = qapi-introspect.o
-obj-y += $(QAPI_TARGET_MODULES:%=qapi-types-%.o)
-obj-y += qapi-types.o
-obj-y += $(QAPI_TARGET_MODULES:%=qapi-visit-%.o)
-obj-y += qapi-visit.o
-obj-y += $(QAPI_TARGET_MODULES:%=qapi-events-%.o)
-obj-y += qapi-events.o
-obj-y += $(QAPI_TARGET_MODULES:%=qapi-commands-%.o)
-obj-y += qapi-commands.o
-obj-y += qapi-init-commands.o
-
-QAPI_MODULES_STORAGE_DAEMON = block-core char common control crypto
-QAPI_MODULES_STORAGE_DAEMON += introspect job qom sockets pragma transaction
qapi/meson.build +7 -3
index 51d11ce..de5b16f 100644
@@ -113,8 +113,12 @@ foreach output : qapi_util_outputs
   i = i + 1
 endforeach
 
-# These are still handled by the Makefile
-i += qapi_nonmodule_outputs.length()
-i += qapi_specific_outputs.length()
+foreach output : qapi_specific_outputs + qapi_nonmodule_outputs
+  if output.endswith('.h')
+    genh += qapi_files[i]
+  endif
+  specific_ss.add(when: 'CONFIG_SOFTMMU', if_true: qapi_files[i])
+  i = i + 1
+endforeach
 
 qapi_doc_texi = qapi_files[i]
Signature · 1 line
1.8.3.1
#86 lore raw

PATCH 82/147 meson: convert hw/xen

In reply to Paolo Bonzini

From: Marc-André Lureau <[email protected]>

---
 configure            |  7 +++++--
 hw/Makefile.objs     |  1 -
 hw/meson.build       |  1 +
 hw/xen/Makefile.objs |  7 -------
 hw/xen/meson.build   | 20 ++++++++++++++++++++
 meson.build          |  6 ++++++
 6 files changed, 32 insertions(+), 10 deletions(-)
 create mode 100644 hw/meson.build
 delete mode 100644 hw/xen/Makefile.objs
 create mode 100644 hw/xen/meson.build
configure +5 -2
index f3baba1..1bdea00 100755
@@ -2676,6 +2676,8 @@ if test "$xen" != "no" ; then
     fi
     QEMU_CFLAGS="$QEMU_CFLAGS $($pkg_config --cflags $xen_pc)"
     libs_softmmu="$($pkg_config --libs $xen_pc) $libs_softmmu"
+    xen_cflags="$($pkg_config --cflags $xen_pc)"
+    xen_libs="$($pkg_config --libs $xen_pc)"
   else
 
     xen_libs="-lxenstore -lxenctrl -lxenguest"
@@ -2956,9 +2958,8 @@ EOF
 
     if test "$xen" = yes; then
       if test $xen_ctrl_version -ge 40701  ; then
-        libs_softmmu="$xen_stable_libs $libs_softmmu"
+        xen_libs="$xen_libs $xen_stable_libs "
       fi
-      libs_softmmu="$xen_libs $libs_softmmu"
     fi
   fi
 fi
@@ -7242,6 +7243,8 @@ fi
 if test "$xen" = "yes" ; then
   echo "CONFIG_XEN_BACKEND=y" >> $config_host_mak
   echo "CONFIG_XEN_CTRL_INTERFACE_VERSION=$xen_ctrl_version" >> $config_host_mak
+  echo "XEN_CFLAGS=$xen_cflags" >> $config_host_mak
+  echo "XEN_LIBS=$xen_libs" >> $config_host_mak
 fi
 if test "$linux_aio" = "yes" ; then
   echo "CONFIG_LINUX_AIO=y" >> $config_host_mak
hw/Makefile.objs +0 -1
index 14b7ea4..d204a90 100644
@@ -35,7 +35,6 @@ devices-dirs-y += usb/
 devices-dirs-$(CONFIG_VFIO) += vfio/
 devices-dirs-y += virtio/
 devices-dirs-y += watchdog/
-devices-dirs-$(CONFIG_XEN) += xen/
 devices-dirs-$(CONFIG_MEM_DEVICE) += mem/
 devices-dirs-$(CONFIG_NUBUS) += nubus/
 devices-dirs-y += semihosting/
hw/meson.build new file +1 -0
new file mode 100644
index 0000000..08112a5
@@ -0,0 +1 @@
+subdir('xen')
hw/xen/Makefile.objs deleted +0 -7
deleted file mode 100644
index 502b32d..0000000
@@ -1,7 +0,0 @@
-# xen backend driver support
-common-obj-y += xen-legacy-backend.o xen_devconfig.o xen_pvdev.o xen-bus.o xen-bus-helper.o xen-backend.o
-
-obj-$(CONFIG_XEN_PCI_PASSTHROUGH) += xen-host-pci-device.o
-obj-$(CONFIG_XEN_PCI_PASSTHROUGH) += xen_pt.o xen_pt_config_init.o xen_pt_graphics.o xen_pt_msi.o
-obj-$(CONFIG_XEN_PCI_PASSTHROUGH) += xen_pt_load_rom.o
-obj-$(call lnot,$(CONFIG_XEN_PCI_PASSTHROUGH)) += xen_pt_stub.o
hw/xen/meson.build new file +20 -0
new file mode 100644
index 0000000..076954b
@@ -0,0 +1,20 @@
+softmmu_ss.add(when: ['CONFIG_XEN', xen], if_true: files(
+  'xen-backend.c',
+  'xen-bus-helper.c',
+  'xen-bus.c',
+  'xen-legacy-backend.c',
+  'xen_devconfig.c',
+  'xen_pvdev.c',
+))
+
+xen_specific_ss = ss.source_set()
+xen_specific_ss.add(when: 'CONFIG_XEN_PCI_PASSTHROUGH', if_true: files(
+  'xen-host-pci-device.c',
+  'xen_pt.c',
+  'xen_pt_config_init.c',
+  'xen_pt_graphics.c',
+  'xen_pt_load_rom.c',
+  'xen_pt_msi.c',
+), if_false: files('xen_pt_stub.c'))
+
+specific_ss.add_all(when: ['CONFIG_XEN', xen], if_true: xen_specific_ss)
meson.build +6 -0
index 49ad9e7..19c81b6 100644
@@ -313,6 +313,11 @@ numa = not_found
 if 'CONFIG_NUMA' in config_host
   numa = declare_dependency(link_args: config_host['NUMA_LIBS'].split())
 endif
+xen = not_found
+if 'CONFIG_XEN_BACKEND' in config_host
+  xen = declare_dependency(compile_args: config_host['XEN_CFLAGS'].split(),
+                           link_args: config_host['XEN_LIBS'].split())
+endif
 
 create_config = find_program('scripts/create_config')
 minikconf = find_program('scripts/minikconf.py')
@@ -666,6 +671,7 @@ subdir('migration')
 subdir('monitor')
 subdir('net')
 subdir('replay')
+subdir('hw')
 
 # needed for fuzzing binaries
 subdir('tests/qtest/libqos')
Signature · 1 line
1.8.3.1
#87 lore raw

PATCH 83/147 meson: convert hw/core

In reply to Paolo Bonzini

From: Marc-André Lureau <[email protected]>

---
 hw/Makefile.objs       |  1 -
 hw/core/Makefile.objs  | 34 ----------------------------------
 hw/core/meson.build    | 49 +++++++++++++++++++++++++++++++++++++++++++++++++
 hw/meson.build         |  1 +
 tests/Makefile.include | 10 +---------
 5 files changed, 51 insertions(+), 44 deletions(-)
 delete mode 100644 hw/core/Makefile.objs
 create mode 100644 hw/core/meson.build
hw/Makefile.objs +0 -1
index d204a90..bdf8bdf 100644
@@ -1,4 +1,3 @@
-devices-dirs-y = core/
 ifeq ($(CONFIG_SOFTMMU), y)
 devices-dirs-$(call lor,$(CONFIG_VIRTIO_9P),$(call land,$(CONFIG_VIRTFS),$(CONFIG_XEN))) += 9pfs/
 devices-dirs-y += acpi/
hw/core/Makefile.objs deleted +0 -34
deleted file mode 100644
index d8fee8e..0000000
@@ -1,34 +0,0 @@
-# core qdev-related obj files, also used by *-user:
-common-obj-y += qdev.o qdev-properties.o
-common-obj-y += bus.o
-common-obj-y += cpu.o
-common-obj-y += resettable.o
-common-obj-y += hotplug.o
-common-obj-y += vmstate-if.o
-# irq.o needed for qdev GPIO handling:
-common-obj-y += irq.o
-common-obj-y += clock.o qdev-clock.o
-
-common-obj-$(CONFIG_SOFTMMU) += reset.o
-common-obj-$(CONFIG_SOFTMMU) += qdev-fw.o
-common-obj-$(CONFIG_SOFTMMU) += fw-path-provider.o
-common-obj-$(CONFIG_SOFTMMU) += nmi.o
-common-obj-$(CONFIG_SOFTMMU) += vm-change-state-handler.o
-common-obj-$(CONFIG_SOFTMMU) += qdev-properties-system.o
-common-obj-$(CONFIG_SOFTMMU) += sysbus.o
-common-obj-$(CONFIG_SOFTMMU) += machine.o
-common-obj-$(CONFIG_SOFTMMU) += null-machine.o
-common-obj-$(CONFIG_SOFTMMU) += loader.o
-common-obj-$(CONFIG_SOFTMMU) += machine-hmp-cmds.o
-common-obj-$(CONFIG_SOFTMMU) += numa.o
-common-obj-$(CONFIG_SOFTMMU) += clock-vmstate.o
-obj-$(CONFIG_SOFTMMU) += machine-qmp-cmds.o
-
-common-obj-$(CONFIG_XILINX_AXI) += stream.o
-common-obj-$(CONFIG_PTIMER) += ptimer.o
-common-obj-$(CONFIG_FITLOADER) += loader-fit.o
-common-obj-$(CONFIG_REGISTER) += register.o
-common-obj-$(CONFIG_OR_IRQ) += or-irq.o
-common-obj-$(CONFIG_SPLIT_IRQ) += split-irq.o
-common-obj-$(CONFIG_PLATFORM_BUS) += platform-bus.o
-common-obj-$(CONFIG_GENERIC_LOADER) += generic-loader.o
hw/core/meson.build new file +49 -0

49 lines not on this page · raw message

hw/meson.build +1 -0
index 08112a5..fe7c466 100644
@@ -1 +1,2 @@
+subdir('core')
 subdir('xen')
tests/Makefile.include +1 -9
index 425c8ce..b6d9661 100644
@@ -244,15 +244,7 @@ tests/test-bufferiszero$(EXESUF): tests/test-bufferiszero.o $(test-util-obj-y)
 tests/atomic_add-bench$(EXESUF): tests/atomic_add-bench.o $(test-util-obj-y)
 tests/atomic64-bench$(EXESUF): tests/atomic64-bench.o $(test-util-obj-y)
 
-tests/test-qdev-global-props$(EXESUF): tests/test-qdev-global-props.o \
-	hw/core/qdev.o hw/core/qdev-properties.o hw/core/hotplug.o\
-	hw/core/bus.o \
-	hw/core/resettable.o \
-	hw/core/irq.o \
-	hw/core/fw-path-provider.o \
-	hw/core/reset.o \
-	hw/core/vmstate-if.o \
-	hw/core/clock.o hw/core/qdev-clock.o \
+tests/test-qdev-global-props$(EXESUF): tests/test-qdev-global-props.o hw/core/libhwcore.fa \
 	$(test-qapi-obj-y)
 tests/test-vmstate$(EXESUF): tests/test-vmstate.o migration/libmigration.fa \
 	$(test-io-obj-y)
Signature · 1 line
1.8.3.1
#88 lore raw

PATCH 84/147 meson: convert hw/semihosting

In reply to Paolo Bonzini
---
 hw/Makefile.objs             | 1 -
 hw/meson.build               | 1 +
 hw/semihosting/Makefile.objs | 2 --
 hw/semihosting/meson.build   | 4 ++++
 4 files changed, 5 insertions(+), 3 deletions(-)
 delete mode 100644 hw/semihosting/Makefile.objs
 create mode 100644 hw/semihosting/meson.build
hw/Makefile.objs +0 -1
index bdf8bdf..6a7ca0f 100644
@@ -36,7 +36,6 @@ devices-dirs-y += virtio/
 devices-dirs-y += watchdog/
 devices-dirs-$(CONFIG_MEM_DEVICE) += mem/
 devices-dirs-$(CONFIG_NUBUS) += nubus/
-devices-dirs-y += semihosting/
 devices-dirs-y += smbios/
 endif
 
hw/meson.build +1 -0
index fe7c466..66a2f6c 100644
@@ -1,2 +1,3 @@
 subdir('core')
+subdir('semihosting')
 subdir('xen')
hw/semihosting/Makefile.objs deleted +0 -2
deleted file mode 100644
index 4ad47c0..0000000
@@ -1,2 +0,0 @@
-obj-$(CONFIG_SEMIHOSTING) += config.o
-obj-$(CONFIG_SEMIHOSTING) += console.o
hw/semihosting/meson.build new file +4 -0
new file mode 100644
index 0000000..f40ac57
@@ -0,0 +1,4 @@
+specific_ss.add(when: 'CONFIG_SEMIHOSTING', if_true: files(
+  'config.c',
+  'console.c',
+))
Signature · 1 line
1.8.3.1
#89 lore raw

PATCH 85/147 meson: convert hw/nubus

In reply to Paolo Bonzini
---
 hw/Makefile.objs       | 1 -
 hw/meson.build         | 1 +
 hw/nubus/Makefile.objs | 4 ----
 hw/nubus/meson.build   | 7 +++++++
 4 files changed, 8 insertions(+), 5 deletions(-)
 delete mode 100644 hw/nubus/Makefile.objs
 create mode 100644 hw/nubus/meson.build
hw/Makefile.objs +0 -1
index 6a7ca0f..86bc201 100644
@@ -35,7 +35,6 @@ devices-dirs-$(CONFIG_VFIO) += vfio/
 devices-dirs-y += virtio/
 devices-dirs-y += watchdog/
 devices-dirs-$(CONFIG_MEM_DEVICE) += mem/
-devices-dirs-$(CONFIG_NUBUS) += nubus/
 devices-dirs-y += smbios/
 endif
 
hw/meson.build +1 -0
index 66a2f6c..03ef302 100644
@@ -1,3 +1,4 @@
 subdir('core')
+subdir('nubus')
 subdir('semihosting')
 subdir('xen')
hw/nubus/Makefile.objs deleted +0 -4
deleted file mode 100644
index 135ba78..0000000
@@ -1,4 +0,0 @@
-common-obj-y += nubus-device.o
-common-obj-y += nubus-bus.o
-common-obj-y += nubus-bridge.o
-common-obj-$(CONFIG_Q800) += mac-nubus-bridge.o
hw/nubus/meson.build new file +7 -0
new file mode 100644
index 0000000..9287c63
@@ -0,0 +1,7 @@
+nubus_ss = ss.source_set()
+nubus_ss.add(files('nubus-device.c'))
+nubus_ss.add(files('nubus-bus.c'))
+nubus_ss.add(files('nubus-bridge.c'))
+nubus_ss.add(when: 'CONFIG_Q800', if_true: files('mac-nubus-bridge.c'))
+
+softmmu_ss.add_all(when: 'CONFIG_NUBUS', if_true: nubus_ss)
Signature · 1 line
1.8.3.1
#90 lore raw

PATCH 86/147 meson: convert hw/smbios

In reply to Paolo Bonzini

From: Marc-André Lureau <[email protected]>

---
 hw/Makefile.objs        |  1 -
 hw/meson.build          |  1 +
 hw/smbios/Makefile.objs | 10 ----------
 hw/smbios/meson.build   | 13 +++++++++++++
 4 files changed, 14 insertions(+), 11 deletions(-)
 delete mode 100644 hw/smbios/Makefile.objs
 create mode 100644 hw/smbios/meson.build
hw/Makefile.objs +0 -1
index 86bc201..73c49dd 100644
@@ -35,7 +35,6 @@ devices-dirs-$(CONFIG_VFIO) += vfio/
 devices-dirs-y += virtio/
 devices-dirs-y += watchdog/
 devices-dirs-$(CONFIG_MEM_DEVICE) += mem/
-devices-dirs-y += smbios/
 endif
 
 common-obj-y += $(devices-dirs-y)
hw/meson.build +1 -0
index 03ef302..dccc2d1 100644
@@ -1,4 +1,5 @@
 subdir('core')
 subdir('nubus')
 subdir('semihosting')
+subdir('smbios')
 subdir('xen')
hw/smbios/Makefile.objs deleted +0 -10
deleted file mode 100644
index 23bb2ba..0000000
@@ -1,10 +0,0 @@
-ifeq ($(CONFIG_SMBIOS),y)
-common-obj-y += smbios.o
-common-obj-$(CONFIG_IPMI) += smbios_type_38.o
-common-obj-$(call lnot,$(CONFIG_IPMI)) += smbios_type_38-stub.o
-else
-common-obj-y += smbios-stub.o
-endif
-
-common-obj-$(CONFIG_ALL) += smbios-stub.o
-common-obj-$(CONFIG_ALL) += smbios_type_38-stub.o
hw/smbios/meson.build new file +13 -0
new file mode 100644
index 0000000..9e762c7
@@ -0,0 +1,13 @@
+smbios_ss = ss.source_set()
+smbios_ss.add(files('smbios.c'))
+smbios_ss.add(when: 'CONFIG_IPMI',
+              if_true: files('smbios_type_38.c'),
+              if_false: files('smbios_type_38-stub.c'))
+
+softmmu_ss.add_all(when: 'CONFIG_SMBIOS', if_true: smbios_ss)
+softmmu_ss.add(when: 'CONFIG_SMBIOS', if_false: files('smbios-stub.c'))
+
+softmmu_ss.add(when: 'CONFIG_ALL', if_true: files(
+  'smbios-stub.c',
+  'smbios_type_38-stub.c',
+))
Signature · 1 line
1.8.3.1
#91 lore raw

PATCH 87/147 meson: convert hw/mem

In reply to Paolo Bonzini

From: Marc-André Lureau <[email protected]>

---
 hw/Makefile.objs     | 1 -
 hw/mem/Kconfig       | 1 +
 hw/mem/Makefile.objs | 3 ---
 hw/mem/meson.build   | 6 ++++++
 hw/meson.build       | 1 +
 5 files changed, 8 insertions(+), 4 deletions(-)
 delete mode 100644 hw/mem/Makefile.objs
 create mode 100644 hw/mem/meson.build
hw/Makefile.objs +0 -1
index 73c49dd..df72b25 100644
@@ -34,7 +34,6 @@ devices-dirs-y += usb/
 devices-dirs-$(CONFIG_VFIO) += vfio/
 devices-dirs-y += virtio/
 devices-dirs-y += watchdog/
-devices-dirs-$(CONFIG_MEM_DEVICE) += mem/
 endif
 
 common-obj-y += $(devices-dirs-y)
hw/mem/Kconfig +1 -0
index c278449..a0ef2cf 100644
@@ -9,3 +9,4 @@ config NVDIMM
     bool
     default y
     depends on (PC || PSERIES || ARM_VIRT)
+    select MEM_DEVICE
hw/mem/Makefile.objs deleted +0 -3
deleted file mode 100644
index 56345be..0000000
@@ -1,3 +0,0 @@
-common-obj-$(CONFIG_DIMM) += pc-dimm.o
-common-obj-y += memory-device.o
-common-obj-$(CONFIG_NVDIMM) += nvdimm.o
hw/mem/meson.build new file +6 -0
new file mode 100644
index 0000000..ba42462
@@ -0,0 +1,6 @@
+mem_ss = ss.source_set()
+mem_ss.add(files('memory-device.c'))
+mem_ss.add(when: 'CONFIG_DIMM', if_true: files('pc-dimm.c'))
+mem_ss.add(when: 'CONFIG_NVDIMM', if_true: files('nvdimm.c'))
+
+softmmu_ss.add_all(when: 'CONFIG_MEM_DEVICE', if_true: mem_ss)
hw/meson.build +1 -0
index dccc2d1..542d675 100644
@@ -1,4 +1,5 @@
 subdir('core')
+subdir('mem')
 subdir('nubus')
 subdir('semihosting')
 subdir('smbios')
Signature · 1 line
1.8.3.1
#92 lore raw

PATCH 88/147 meson: convert hw/watchdog

In reply to Paolo Bonzini

From: Marc-André Lureau <[email protected]>

---
 hw/Makefile.objs          | 1 -
 hw/meson.build            | 1 +
 hw/watchdog/Makefile.objs | 7 -------
 hw/watchdog/meson.build   | 7 +++++++
 4 files changed, 8 insertions(+), 8 deletions(-)
 delete mode 100644 hw/watchdog/Makefile.objs
 create mode 100644 hw/watchdog/meson.build
hw/Makefile.objs +0 -1
index df72b25..9ebd13d 100644
@@ -33,7 +33,6 @@ devices-dirs-$(CONFIG_TPM) += tpm/
 devices-dirs-y += usb/
 devices-dirs-$(CONFIG_VFIO) += vfio/
 devices-dirs-y += virtio/
-devices-dirs-y += watchdog/
 endif
 
 common-obj-y += $(devices-dirs-y)
hw/meson.build +1 -0
index 542d675..f2209d9 100644
@@ -3,4 +3,5 @@ subdir('mem')
 subdir('nubus')
 subdir('semihosting')
 subdir('smbios')
+subdir('watchdog')
 subdir('xen')
hw/watchdog/Makefile.objs deleted +0 -7
deleted file mode 100644
index 631b711..0000000
@@ -1,7 +0,0 @@
-common-obj-y += watchdog.o
-common-obj-$(CONFIG_CMSDK_APB_WATCHDOG) += cmsdk-apb-watchdog.o
-common-obj-$(CONFIG_WDT_IB6300ESB) += wdt_i6300esb.o
-common-obj-$(CONFIG_WDT_IB700) += wdt_ib700.o
-common-obj-$(CONFIG_WDT_DIAG288) += wdt_diag288.o
-common-obj-$(CONFIG_ASPEED_SOC) += wdt_aspeed.o
-common-obj-$(CONFIG_WDT_IMX2) += wdt_imx2.o
hw/watchdog/meson.build new file +7 -0
new file mode 100644
index 0000000..9b8725e
@@ -0,0 +1,7 @@
+softmmu_ss.add(files('watchdog.c'))
+softmmu_ss.add(when: 'CONFIG_CMSDK_APB_WATCHDOG', if_true: files('cmsdk-apb-watchdog.c'))
+softmmu_ss.add(when: 'CONFIG_WDT_IB6300ESB', if_true: files('wdt_i6300esb.c'))
+softmmu_ss.add(when: 'CONFIG_WDT_IB700', if_true: files('wdt_ib700.c'))
+softmmu_ss.add(when: 'CONFIG_WDT_DIAG288', if_true: files('wdt_diag288.c'))
+softmmu_ss.add(when: 'CONFIG_ASPEED_SOC', if_true: files('wdt_aspeed.c'))
+softmmu_ss.add(when: 'CONFIG_WDT_IMX2', if_true: files('wdt_imx2.c'))
Signature · 1 line
1.8.3.1
#93 lore raw

PATCH 89/147 meson: convert hw/virtio

In reply to Paolo Bonzini

From: Marc-André Lureau <[email protected]>

---
 hw/Makefile.objs        |  1 -
 hw/meson.build          |  1 +
 hw/virtio/Makefile.objs | 48 ----------------------------------------------
 hw/virtio/meson.build   | 51 +++++++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 52 insertions(+), 49 deletions(-)
 delete mode 100644 hw/virtio/Makefile.objs
 create mode 100644 hw/virtio/meson.build
hw/Makefile.objs +0 -1
index 9ebd13d..a1cfb99 100644
@@ -32,7 +32,6 @@ devices-dirs-y += timer/
 devices-dirs-$(CONFIG_TPM) += tpm/
 devices-dirs-y += usb/
 devices-dirs-$(CONFIG_VFIO) += vfio/
-devices-dirs-y += virtio/
 endif
 
 common-obj-y += $(devices-dirs-y)
hw/meson.build +1 -0
index f2209d9..8338fc4 100644
@@ -3,5 +3,6 @@ subdir('mem')
 subdir('nubus')
 subdir('semihosting')
 subdir('smbios')
+subdir('virtio')
 subdir('watchdog')
 subdir('xen')
hw/virtio/Makefile.objs deleted +0 -48

48 lines not on this page · raw message

hw/virtio/meson.build new file +51 -0

51 lines not on this page · raw message

Signature · 1 line
1.8.3.1
#94 lore raw

PATCH 90/147 meson: convert hw/vfio

In reply to Paolo Bonzini

From: Marc-André Lureau <[email protected]>

---
 hw/Makefile.objs      |  1 -
 hw/meson.build        |  1 +
 hw/vfio/Makefile.objs |  8 --------
 hw/vfio/meson.build   | 18 ++++++++++++++++++
 4 files changed, 19 insertions(+), 9 deletions(-)
 delete mode 100644 hw/vfio/Makefile.objs
 create mode 100644 hw/vfio/meson.build
hw/Makefile.objs +0 -1
index a1cfb99..f6e08f6 100644
@@ -31,7 +31,6 @@ devices-dirs-y += ssi/
 devices-dirs-y += timer/
 devices-dirs-$(CONFIG_TPM) += tpm/
 devices-dirs-y += usb/
-devices-dirs-$(CONFIG_VFIO) += vfio/
 endif
 
 common-obj-y += $(devices-dirs-y)
hw/meson.build +1 -0
index 8338fc4..4dafc8a 100644
@@ -3,6 +3,7 @@ subdir('mem')
 subdir('nubus')
 subdir('semihosting')
 subdir('smbios')
+subdir('vfio')
 subdir('virtio')
 subdir('watchdog')
 subdir('xen')
hw/vfio/Makefile.objs deleted +0 -8
deleted file mode 100644
index 9bb1c09..0000000
@@ -1,8 +0,0 @@
-obj-y += common.o spapr.o
-obj-$(CONFIG_VFIO_PCI) += pci.o pci-quirks.o display.o
-obj-$(CONFIG_VFIO_CCW) += ccw.o
-obj-$(CONFIG_VFIO_PLATFORM) += platform.o
-obj-$(CONFIG_VFIO_XGMAC) += calxeda-xgmac.o
-obj-$(CONFIG_VFIO_AMD_XGBE) += amd-xgbe.o
-obj-$(CONFIG_VFIO_AP) += ap.o
-obj-$(CONFIG_VFIO_IGD) += igd.o
hw/vfio/meson.build new file +18 -0
new file mode 100644
index 0000000..37efa74
@@ -0,0 +1,18 @@
+vfio_ss = ss.source_set()
+vfio_ss.add(files(
+  'common.c',
+  'spapr.c',
+))
+vfio_ss.add(when: 'CONFIG_VFIO_PCI', if_true: files(
+  'display.c',
+  'pci-quirks.c',
+  'pci.c',
+))
+vfio_ss.add(when: 'CONFIG_VFIO_CCW', if_true: files('ccw.c'))
+vfio_ss.add(when: 'CONFIG_VFIO_PLATFORM', if_true: files('platform.c'))
+vfio_ss.add(when: 'CONFIG_VFIO_XGMAC', if_true: files('calxeda-xgmac.c'))
+vfio_ss.add(when: 'CONFIG_VFIO_AMD_XGBE', if_true: files('amd-xgbe.c'))
+vfio_ss.add(when: 'CONFIG_VFIO_AP', if_true: files('ap.c'))
+vfio_ss.add(when: 'CONFIG_VFIO_IGD', if_true: files('igd.c'))
+
+specific_ss.add_all(when: 'CONFIG_VFIO', if_true: vfio_ss)
Signature · 1 line
1.8.3.1
#95 lore raw

PATCH 91/147 meson: convert hw/usb

In reply to Paolo Bonzini
---
 Makefile.target      |  1 +
 hw/Makefile.objs     |  1 -
 hw/meson.build       |  1 +
 hw/usb/Makefile.objs | 71 ----------------------------------------------------
 hw/usb/meson.build   | 69 ++++++++++++++++++++++++++++++++++++++++++++++++++
 meson.build          | 15 +++++++++++
 6 files changed, 86 insertions(+), 72 deletions(-)
 delete mode 100644 hw/usb/Makefile.objs
 create mode 100644 hw/usb/meson.build
Makefile.target +1 -0
index 386378b..3d5a2af 100644
@@ -168,6 +168,7 @@ endif
 LIBS := $(LIBS) $(BRLAPI_LIBS) $(SDL_LIBS) $(SPICE_LIBS) $(OPENGL_LIBS) $(SECCOMP_LIBS)
 LIBS := $(LIBS) $(COREAUDIO_LIBS) $(DSOUND_LIBS)
 LIBS := $(LIBS) $(VDE_LIBS) $(SLIRP_LIBS)
+LIBS := $(LIBS) $(LIBUSB_LIBS) $(SMARTCARD_LIBS) $(USB_REDIR_LIBS)
 
 # Hardware support
 ifeq ($(TARGET_NAME), sparc64)
hw/Makefile.objs +0 -1
index f6e08f6..c2619bb 100644
@@ -30,7 +30,6 @@ devices-dirs-y += sd/
 devices-dirs-y += ssi/
 devices-dirs-y += timer/
 devices-dirs-$(CONFIG_TPM) += tpm/
-devices-dirs-y += usb/
 endif
 
 common-obj-y += $(devices-dirs-y)
hw/meson.build +1 -0
index 4dafc8a..89bd6ad 100644
@@ -3,6 +3,7 @@ subdir('mem')
 subdir('nubus')
 subdir('semihosting')
 subdir('smbios')
+subdir('usb')
 subdir('vfio')
 subdir('virtio')
 subdir('watchdog')
hw/usb/Makefile.objs deleted +0 -71

71 lines not on this page · raw message

hw/usb/meson.build new file +69 -0

69 lines not on this page · raw message

meson.build +15 -0
index 19c81b6..696d743 100644
@@ -318,6 +318,21 @@ if 'CONFIG_XEN_BACKEND' in config_host
   xen = declare_dependency(compile_args: config_host['XEN_CFLAGS'].split(),
                            link_args: config_host['XEN_LIBS'].split())
 endif
+cacard = not_found
+if 'CONFIG_SMARTCARD' in config_host
+  cacard = declare_dependency(compile_args: config_host['SMARTCARD_CFLAGS'].split(),
+                              link_args: config_host['SMARTCARD_LIBS'].split())
+endif
+usbredir = not_found
+if 'CONFIG_USB_REDIR' in config_host
+  usbredir = declare_dependency(compile_args: config_host['USB_REDIR_CFLAGS'].split(),
+                                link_args: config_host['USB_REDIR_LIBS'].split())
+endif
+libusb = not_found
+if 'CONFIG_USB_LIBUSB' in config_host
+  libusb = declare_dependency(compile_args: config_host['LIBUSB_CFLAGS'].split(),
+                              link_args: config_host['LIBUSB_LIBS'].split())
+endif
 
 create_config = find_program('scripts/create_config')
 minikconf = find_program('scripts/minikconf.py')
Signature · 1 line
1.8.3.1
#96 lore raw

PATCH 92/147 meson: convert hw/tpm

In reply to Paolo Bonzini
---
 hw/Makefile.objs     | 1 -
 hw/meson.build       | 1 +
 hw/tpm/Makefile.objs | 6 ------
 hw/tpm/meson.build   | 8 ++++++++
 4 files changed, 9 insertions(+), 7 deletions(-)
 delete mode 100644 hw/tpm/Makefile.objs
 create mode 100644 hw/tpm/meson.build
hw/Makefile.objs +0 -1
index c2619bb..f0e5728 100644
@@ -29,7 +29,6 @@ devices-dirs-$(CONFIG_SCSI) += scsi/
 devices-dirs-y += sd/
 devices-dirs-y += ssi/
 devices-dirs-y += timer/
-devices-dirs-$(CONFIG_TPM) += tpm/
 endif
 
 common-obj-y += $(devices-dirs-y)
hw/meson.build +1 -0
index 89bd6ad..2ddf6ba 100644
@@ -3,6 +3,7 @@ subdir('mem')
 subdir('nubus')
 subdir('semihosting')
 subdir('smbios')
+subdir('tpm')
 subdir('usb')
 subdir('vfio')
 subdir('virtio')
hw/tpm/Makefile.objs deleted +0 -6
deleted file mode 100644
index 6fc05be..0000000
@@ -1,6 +0,0 @@
-obj-$(call lor,$(CONFIG_TPM_TIS),$(CONFIG_TPM_CRB)) += tpm_ppi.o
-common-obj-$(CONFIG_TPM_TIS_ISA) += tpm_tis_isa.o
-common-obj-$(CONFIG_TPM_TIS_SYSBUS) += tpm_tis_sysbus.o
-common-obj-$(CONFIG_TPM_TIS) += tpm_tis_common.o
-common-obj-$(CONFIG_TPM_CRB) += tpm_crb.o
-obj-$(CONFIG_TPM_SPAPR) += tpm_spapr.o
hw/tpm/meson.build new file +8 -0
new file mode 100644
index 0000000..1c68d81
@@ -0,0 +1,8 @@
+softmmu_ss.add(when: 'CONFIG_TPM_TIS', if_true: files('tpm_tis_common.c'))
+softmmu_ss.add(when: 'CONFIG_TPM_TIS_ISA', if_true: files('tpm_tis_isa.c'))
+softmmu_ss.add(when: 'CONFIG_TPM_TIS_SYSBUS', if_true: files('tpm_tis_sysbus.c'))
+softmmu_ss.add(when: 'CONFIG_TPM_CRB', if_true: files('tpm_crb.c'))
+
+specific_ss.add(when: ['CONFIG_SOFTMMU', 'CONFIG_TPM_TIS'], if_true: files('tpm_ppi.c'))
+specific_ss.add(when: ['CONFIG_SOFTMMU', 'CONFIG_TPM_CRB'], if_true: files('tpm_ppi.c'))
+specific_ss.add(when: 'CONFIG_TPM_SPAPR', if_true: files('tpm_spapr.c'))
Signature · 1 line
1.8.3.1
#97 lore raw

PATCH 93/147 meson: convert hw/timer

In reply to Paolo Bonzini
---
 hw/Makefile.objs       |  1 -
 hw/meson.build         |  1 +
 hw/timer/Makefile.objs | 41 -----------------------------------------
 hw/timer/meson.build   | 37 +++++++++++++++++++++++++++++++++++++
 4 files changed, 38 insertions(+), 42 deletions(-)
 delete mode 100644 hw/timer/Makefile.objs
 create mode 100644 hw/timer/meson.build
hw/Makefile.objs +0 -1
index f0e5728..70ecaa8 100644
@@ -28,7 +28,6 @@ devices-dirs-y += rtc/
 devices-dirs-$(CONFIG_SCSI) += scsi/
 devices-dirs-y += sd/
 devices-dirs-y += ssi/
-devices-dirs-y += timer/
 endif
 
 common-obj-y += $(devices-dirs-y)
hw/meson.build +1 -0
index 2ddf6ba..50b26db 100644
@@ -3,6 +3,7 @@ subdir('mem')
 subdir('nubus')
 subdir('semihosting')
 subdir('smbios')
+subdir('timer')
 subdir('tpm')
 subdir('usb')
 subdir('vfio')
hw/timer/Makefile.objs deleted +0 -41

41 lines not on this page · raw message

hw/timer/meson.build new file +37 -0
new file mode 100644
index 0000000..9f0a267
@@ -0,0 +1,37 @@
+softmmu_ss.add(when: 'CONFIG_A9_GTIMER', if_true: files('a9gtimer.c'))
+softmmu_ss.add(when: 'CONFIG_ALLWINNER_A10_PIT', if_true: files('allwinner-a10-pit.c'))
+softmmu_ss.add(when: 'CONFIG_ALTERA_TIMER', if_true: files('altera_timer.c'))
+softmmu_ss.add(when: 'CONFIG_ARM_MPTIMER', if_true: files('arm_mptimer.c'))
+softmmu_ss.add(when: 'CONFIG_ARM_TIMER', if_true: files('arm_timer.c'))
+softmmu_ss.add(when: 'CONFIG_ARM_V7M', if_true: files('armv7m_systick.c'))
+softmmu_ss.add(when: 'CONFIG_ASPEED_SOC', if_true: files('aspeed_timer.c'))
+softmmu_ss.add(when: 'CONFIG_CADENCE', if_true: files('cadence_ttc.c'))
+softmmu_ss.add(when: 'CONFIG_CMSDK_APB_DUALTIMER', if_true: files('cmsdk-apb-dualtimer.c'))
+softmmu_ss.add(when: 'CONFIG_CMSDK_APB_TIMER', if_true: files('cmsdk-apb-timer.c'))
+softmmu_ss.add(when: 'CONFIG_RENESAS_TMR', if_true: files('renesas_tmr.c'))
+softmmu_ss.add(when: 'CONFIG_RENESAS_CMT', if_true: files('renesas_cmt.c'))
+softmmu_ss.add(when: 'CONFIG_DIGIC', if_true: files('digic-timer.c'))
+softmmu_ss.add(when: 'CONFIG_ETRAXFS', if_true: files('etraxfs_timer.c'))
+softmmu_ss.add(when: 'CONFIG_EXYNOS4', if_true: files('exynos4210_mct.c'))
+softmmu_ss.add(when: 'CONFIG_EXYNOS4', if_true: files('exynos4210_pwm.c'))
+softmmu_ss.add(when: 'CONFIG_GRLIB', if_true: files('grlib_gptimer.c'))
+softmmu_ss.add(when: 'CONFIG_HPET', if_true: files('hpet.c'))
+softmmu_ss.add(when: 'CONFIG_I8254', if_true: files('i8254_common.c', 'i8254.c'))
+softmmu_ss.add(when: 'CONFIG_IMX', if_true: files('imx_epit.c'))
+softmmu_ss.add(when: 'CONFIG_IMX', if_true: files('imx_gpt.c'))
+softmmu_ss.add(when: 'CONFIG_LM32', if_true: files('lm32_timer.c'))
+softmmu_ss.add(when: 'CONFIG_MILKYMIST', if_true: files('milkymist-sysctl.c'))
+softmmu_ss.add(when: 'CONFIG_MIPS_CPS', if_true: files('mips_gictimer.c'))
+softmmu_ss.add(when: 'CONFIG_MSF2', if_true: files('mss-timer.c'))
+softmmu_ss.add(when: 'CONFIG_NRF51_SOC', if_true: files('nrf51_timer.c'))
+softmmu_ss.add(when: 'CONFIG_OMAP', if_true: files('omap_gptimer.c'))
+softmmu_ss.add(when: 'CONFIG_OMAP', if_true: files('omap_synctimer.c'))
+softmmu_ss.add(when: 'CONFIG_PUV3', if_true: files('puv3_ost.c'))
+softmmu_ss.add(when: 'CONFIG_PXA2XX', if_true: files('pxa2xx_timer.c'))
+softmmu_ss.add(when: 'CONFIG_RASPI', if_true: files('bcm2835_systmr.c'))
+softmmu_ss.add(when: 'CONFIG_SH4', if_true: files('sh_timer.c'))
+softmmu_ss.add(when: 'CONFIG_SLAVIO', if_true: files('slavio_timer.c'))
+softmmu_ss.add(when: 'CONFIG_STM32F2XX_TIMER', if_true: files('stm32f2xx_timer.c'))
+softmmu_ss.add(when: 'CONFIG_XILINX', if_true: files('xilinx_timer.c'))
+
+specific_ss.add(when: 'CONFIG_AVR_TIMER16', if_true: files('avr_timer16.c'))
Signature · 1 line
1.8.3.1
#98 lore raw

PATCH 94/147 meson: convert hw/rtc

In reply to Paolo Bonzini
---
 hw/Makefile.objs     |  1 -
 hw/meson.build       |  1 +
 hw/rtc/Makefile.objs | 15 ---------------
 hw/rtc/meson.build   | 16 ++++++++++++++++
 4 files changed, 17 insertions(+), 16 deletions(-)
 delete mode 100644 hw/rtc/Makefile.objs
 create mode 100644 hw/rtc/meson.build
hw/Makefile.objs +0 -1
index 70ecaa8..f60fd01 100644
@@ -24,7 +24,6 @@ devices-dirs-y += nvram/
 devices-dirs-y += pci/
 devices-dirs-$(CONFIG_PCI) += pci-bridge/ pci-host/
 devices-dirs-y += pcmcia/
-devices-dirs-y += rtc/
 devices-dirs-$(CONFIG_SCSI) += scsi/
 devices-dirs-y += sd/
 devices-dirs-y += ssi/
hw/meson.build +1 -0
index 50b26db..1fb1687 100644
@@ -1,6 +1,7 @@
 subdir('core')
 subdir('mem')
 subdir('nubus')
+subdir('rtc')
 subdir('semihosting')
 subdir('smbios')
 subdir('timer')
hw/rtc/Makefile.objs deleted +0 -15
deleted file mode 100644
index e4c1b86..0000000
@@ -1,15 +0,0 @@
-common-obj-$(CONFIG_DS1338) += ds1338.o
-common-obj-$(CONFIG_M41T80) += m41t80.o
-common-obj-$(CONFIG_M48T59) += m48t59.o
-ifeq ($(CONFIG_ISA_BUS),y)
-common-obj-$(CONFIG_M48T59) += m48t59-isa.o
-endif
-common-obj-$(CONFIG_PL031) += pl031.o
-common-obj-$(CONFIG_TWL92230) += twl92230.o
-common-obj-$(CONFIG_XLNX_ZYNQMP) += xlnx-zynqmp-rtc.o
-common-obj-$(CONFIG_EXYNOS4) += exynos4210_rtc.o
-obj-$(CONFIG_MC146818RTC) += mc146818rtc.o
-common-obj-$(CONFIG_SUN4V_RTC) += sun4v-rtc.o
-common-obj-$(CONFIG_ASPEED_SOC) += aspeed_rtc.o
-common-obj-$(CONFIG_GOLDFISH_RTC) += goldfish_rtc.o
-common-obj-$(CONFIG_ALLWINNER_H3) += allwinner-rtc.o
hw/rtc/meson.build new file +16 -0
new file mode 100644
index 0000000..7cecdee
@@ -0,0 +1,16 @@
+
+softmmu_ss.add(when: 'CONFIG_DS1338', if_true: files('ds1338.c'))
+softmmu_ss.add(when: 'CONFIG_M41T80', if_true: files('m41t80.c'))
+softmmu_ss.add(when: 'CONFIG_M48T59', if_true: files('m48t59.c'))
+softmmu_ss.add(when: 'CONFIG_PL031', if_true: files('pl031.c'))
+softmmu_ss.add(when: 'CONFIG_TWL92230', if_true: files('twl92230.c'))
+softmmu_ss.add(when: ['CONFIG_ISA_BUS', 'CONFIG_M48T59'], if_true: files('m48t59-isa.c'))
+softmmu_ss.add(when: 'CONFIG_XLNX_ZYNQMP', if_true: files('xlnx-zynqmp-rtc.c'))
+
+softmmu_ss.add(when: 'CONFIG_EXYNOS4', if_true: files('exynos4210_rtc.c'))
+softmmu_ss.add(when: 'CONFIG_SUN4V_RTC', if_true: files('sun4v-rtc.c'))
+softmmu_ss.add(when: 'CONFIG_ASPEED_SOC', if_true: files('aspeed_rtc.c'))
+softmmu_ss.add(when: 'CONFIG_GOLDFISH_RTC', if_true: files('goldfish_rtc.c'))
+softmmu_ss.add(when: 'CONFIG_ALLWINNER_H3', if_true: files('allwinner-rtc.c'))
+
+specific_ss.add(when: 'CONFIG_MC146818RTC', if_true: files('mc146818rtc.c'))
Signature · 1 line
1.8.3.1
#99 lore raw

PATCH 95/147 meson: convert hw/ssi

In reply to Paolo Bonzini

From: Marc-André Lureau <[email protected]>

---
 hw/Makefile.objs     |  1 -
 hw/meson.build       |  1 +
 hw/ssi/Makefile.objs | 10 ----------
 hw/ssi/meson.build   |  9 +++++++++
 4 files changed, 10 insertions(+), 11 deletions(-)
 delete mode 100644 hw/ssi/Makefile.objs
 create mode 100644 hw/ssi/meson.build
hw/Makefile.objs +0 -1
index f60fd01..e50eb04 100644
@@ -26,7 +26,6 @@ devices-dirs-$(CONFIG_PCI) += pci-bridge/ pci-host/
 devices-dirs-y += pcmcia/
 devices-dirs-$(CONFIG_SCSI) += scsi/
 devices-dirs-y += sd/
-devices-dirs-y += ssi/
 endif
 
 common-obj-y += $(devices-dirs-y)
hw/meson.build +1 -0
index 1fb1687..7564426 100644
@@ -4,6 +4,7 @@ subdir('nubus')
 subdir('rtc')
 subdir('semihosting')
 subdir('smbios')
+subdir('ssi')
 subdir('timer')
 subdir('tpm')
 subdir('usb')
hw/ssi/Makefile.objs deleted +0 -10
deleted file mode 100644
index 07a85f1..0000000
@@ -1,10 +0,0 @@
-common-obj-$(CONFIG_PL022) += pl022.o
-common-obj-$(CONFIG_SSI) += ssi.o
-common-obj-$(CONFIG_XILINX_SPI) += xilinx_spi.o
-common-obj-$(CONFIG_XILINX_SPIPS) += xilinx_spips.o
-common-obj-$(CONFIG_ASPEED_SOC) += aspeed_smc.o
-common-obj-$(CONFIG_STM32F2XX_SPI) += stm32f2xx_spi.o
-common-obj-$(CONFIG_MSF2) += mss-spi.o
-
-common-obj-$(CONFIG_OMAP) += omap_spi.o
-common-obj-$(CONFIG_IMX) += imx_spi.o
hw/ssi/meson.build new file +9 -0
new file mode 100644
index 0000000..f1f5c28
@@ -0,0 +1,9 @@
+softmmu_ss.add(when: 'CONFIG_ASPEED_SOC', if_true: files('aspeed_smc.c'))
+softmmu_ss.add(when: 'CONFIG_MSF2', if_true: files('mss-spi.c'))
+softmmu_ss.add(when: 'CONFIG_PL022', if_true: files('pl022.c'))
+softmmu_ss.add(when: 'CONFIG_SSI', if_true: files('ssi.c'))
+softmmu_ss.add(when: 'CONFIG_STM32F2XX_SPI', if_true: files('stm32f2xx_spi.c'))
+softmmu_ss.add(when: 'CONFIG_XILINX_SPI', if_true: files('xilinx_spi.c'))
+softmmu_ss.add(when: 'CONFIG_XILINX_SPIPS', if_true: files('xilinx_spips.c'))
+softmmu_ss.add(when: 'CONFIG_IMX', if_true: files('imx_spi.c'))
+softmmu_ss.add(when: 'CONFIG_OMAP', if_true: files('omap_spi.c'))
Signature · 1 line
1.8.3.1
#100 lore raw

PATCH 96/147 meson: convert hw/sd

In reply to Paolo Bonzini

From: Marc-André Lureau <[email protected]>

---
 hw/Makefile.objs    |  1 -
 hw/meson.build      |  1 +
 hw/sd/Makefile.objs | 12 ------------
 hw/sd/meson.build   | 12 ++++++++++++
 4 files changed, 13 insertions(+), 13 deletions(-)
 delete mode 100644 hw/sd/Makefile.objs
 create mode 100644 hw/sd/meson.build
hw/Makefile.objs +0 -1
index e50eb04..6f9c0b7 100644
@@ -25,7 +25,6 @@ devices-dirs-y += pci/
 devices-dirs-$(CONFIG_PCI) += pci-bridge/ pci-host/
 devices-dirs-y += pcmcia/
 devices-dirs-$(CONFIG_SCSI) += scsi/
-devices-dirs-y += sd/
 endif
 
 common-obj-y += $(devices-dirs-y)
hw/meson.build +1 -0
index 7564426..a73f4ae 100644
@@ -2,6 +2,7 @@ subdir('core')
 subdir('mem')
 subdir('nubus')
 subdir('rtc')
+subdir('sd')
 subdir('semihosting')
 subdir('smbios')
 subdir('ssi')
hw/sd/Makefile.objs deleted +0 -12
deleted file mode 100644
index 0d1df17..0000000
@@ -1,12 +0,0 @@
-common-obj-$(CONFIG_PL181) += pl181.o
-common-obj-$(CONFIG_SSI_SD) += ssi-sd.o
-common-obj-$(CONFIG_SD) += sd.o core.o sdmmc-internal.o
-common-obj-$(CONFIG_SDHCI) += sdhci.o
-common-obj-$(CONFIG_SDHCI_PCI) += sdhci-pci.o
-
-common-obj-$(CONFIG_ALLWINNER_H3) += allwinner-sdhost.o
-common-obj-$(CONFIG_MILKYMIST) += milkymist-memcard.o
-common-obj-$(CONFIG_OMAP) += omap_mmc.o
-common-obj-$(CONFIG_PXA2XX) += pxa2xx_mmci.o
-common-obj-$(CONFIG_RASPI) += bcm2835_sdhost.o
-common-obj-$(CONFIG_ASPEED_SOC) += aspeed_sdhci.o
hw/sd/meson.build new file +12 -0
new file mode 100644
index 0000000..b43e59b
@@ -0,0 +1,12 @@
+softmmu_ss.add(when: 'CONFIG_PL181', if_true: files('pl181.c'))
+softmmu_ss.add(when: 'CONFIG_SD', if_true: files('sd.c', 'core.c', 'sdmmc-internal.c'))
+softmmu_ss.add(when: 'CONFIG_SDHCI', if_true: files('sdhci.c'))
+softmmu_ss.add(when: 'CONFIG_SDHCI_PCI', if_true: files('sdhci-pci.c'))
+softmmu_ss.add(when: 'CONFIG_SSI_SD', if_true: files('ssi-sd.c'))
+
+softmmu_ss.add(when: 'CONFIG_MILKYMIST', if_true: files('milkymist-memcard.c'))
+softmmu_ss.add(when: 'CONFIG_OMAP', if_true: files('omap_mmc.c'))
+softmmu_ss.add(when: 'CONFIG_PXA2XX', if_true: files('pxa2xx_mmci.c'))
+softmmu_ss.add(when: 'CONFIG_RASPI', if_true: files('bcm2835_sdhost.c'))
+softmmu_ss.add(when: 'CONFIG_ASPEED_SOC', if_true: files('aspeed_sdhci.c'))
+softmmu_ss.add(when: 'CONFIG_ALLWINNER_H3', if_true: files('allwinner-sdhost.c'))
Signature · 1 line
1.8.3.1
Reviewed-by on v1 96/147
#101 lore raw

Re: [PATCH 096/147] meson: convert hw/sd

Quoted 4 lines · Paolo Bonzini

From: Marc-André Lureau <[email protected]>

This one already has:

https://www.mail-archive.com/[email protected]/msg728253.html

Quoted 70 lines
---
 hw/Makefile.objs    |  1 -
 hw/meson.build      |  1 +
 hw/sd/Makefile.objs | 12 ------------
 hw/sd/meson.build   | 12 ++++++++++++
 4 files changed, 13 insertions(+), 13 deletions(-)
 delete mode 100644 hw/sd/Makefile.objs
 create mode 100644 hw/sd/meson.build
hw/Makefile.objs +0 -1
index e50eb04..6f9c0b7 100644
@@ -25,7 +25,6 @@ devices-dirs-y += pci/
 devices-dirs-$(CONFIG_PCI) += pci-bridge/ pci-host/
 devices-dirs-y += pcmcia/
 devices-dirs-$(CONFIG_SCSI) += scsi/
-devices-dirs-y += sd/
 endif
 
 common-obj-y += $(devices-dirs-y)
hw/meson.build +1 -0
index 7564426..a73f4ae 100644
@@ -2,6 +2,7 @@ subdir('core')
 subdir('mem')
 subdir('nubus')
 subdir('rtc')
+subdir('sd')
 subdir('semihosting')
 subdir('smbios')
 subdir('ssi')
hw/sd/Makefile.objs deleted +0 -12
deleted file mode 100644
index 0d1df17..0000000
@@ -1,12 +0,0 @@
-common-obj-$(CONFIG_PL181) += pl181.o
-common-obj-$(CONFIG_SSI_SD) += ssi-sd.o
-common-obj-$(CONFIG_SD) += sd.o core.o sdmmc-internal.o
-common-obj-$(CONFIG_SDHCI) += sdhci.o
-common-obj-$(CONFIG_SDHCI_PCI) += sdhci-pci.o
-
-common-obj-$(CONFIG_ALLWINNER_H3) += allwinner-sdhost.o
-common-obj-$(CONFIG_MILKYMIST) += milkymist-memcard.o
-common-obj-$(CONFIG_OMAP) += omap_mmc.o
-common-obj-$(CONFIG_PXA2XX) += pxa2xx_mmci.o
-common-obj-$(CONFIG_RASPI) += bcm2835_sdhost.o
-common-obj-$(CONFIG_ASPEED_SOC) += aspeed_sdhci.o
hw/sd/meson.build new file +12 -0
new file mode 100644
index 0000000..b43e59b
@@ -0,0 +1,12 @@
+softmmu_ss.add(when: 'CONFIG_PL181', if_true: files('pl181.c'))
+softmmu_ss.add(when: 'CONFIG_SD', if_true: files('sd.c', 'core.c', 'sdmmc-internal.c'))
+softmmu_ss.add(when: 'CONFIG_SDHCI', if_true: files('sdhci.c'))
+softmmu_ss.add(when: 'CONFIG_SDHCI_PCI', if_true: files('sdhci-pci.c'))
+softmmu_ss.add(when: 'CONFIG_SSI_SD', if_true: files('ssi-sd.c'))
+
+softmmu_ss.add(when: 'CONFIG_MILKYMIST', if_true: files('milkymist-memcard.c'))
+softmmu_ss.add(when: 'CONFIG_OMAP', if_true: files('omap_mmc.c'))
+softmmu_ss.add(when: 'CONFIG_PXA2XX', if_true: files('pxa2xx_mmci.c'))
+softmmu_ss.add(when: 'CONFIG_RASPI', if_true: files('bcm2835_sdhost.c'))
+softmmu_ss.add(when: 'CONFIG_ASPEED_SOC', if_true: files('aspeed_sdhci.c'))
+softmmu_ss.add(when: 'CONFIG_ALLWINNER_H3', if_true: files('allwinner-sdhost.c'))
#102 lore raw

PATCH 97/147 meson: convert hw/scsi

In reply to Paolo Bonzini

From: Marc-André Lureau <[email protected]>

---
 hw/Makefile.objs      |  1 -
 hw/meson.build        |  1 +
 hw/scsi/Makefile.objs | 15 ---------------
 hw/scsi/meson.build   | 26 ++++++++++++++++++++++++++
 4 files changed, 27 insertions(+), 16 deletions(-)
 delete mode 100644 hw/scsi/Makefile.objs
 create mode 100644 hw/scsi/meson.build
hw/Makefile.objs +0 -1
index 6f9c0b7..b6461c2 100644
@@ -24,7 +24,6 @@ devices-dirs-y += nvram/
 devices-dirs-y += pci/
 devices-dirs-$(CONFIG_PCI) += pci-bridge/ pci-host/
 devices-dirs-y += pcmcia/
-devices-dirs-$(CONFIG_SCSI) += scsi/
 endif
 
 common-obj-y += $(devices-dirs-y)
hw/meson.build +1 -0
index a73f4ae..d4abb67 100644
@@ -2,6 +2,7 @@ subdir('core')
 subdir('mem')
 subdir('nubus')
 subdir('rtc')
+subdir('scsi')
 subdir('sd')
 subdir('semihosting')
 subdir('smbios')
hw/scsi/Makefile.objs deleted +0 -15
deleted file mode 100644
index 54b36ed..0000000
@@ -1,15 +0,0 @@
-common-obj-y += scsi-disk.o emulation.o
-common-obj-y += scsi-generic.o scsi-bus.o
-common-obj-$(CONFIG_LSI_SCSI_PCI) += lsi53c895a.o
-common-obj-$(CONFIG_MPTSAS_SCSI_PCI) += mptsas.o mptconfig.o mptendian.o
-common-obj-$(CONFIG_MEGASAS_SCSI_PCI) += megasas.o
-common-obj-$(CONFIG_VMW_PVSCSI_SCSI_PCI) += vmw_pvscsi.o
-common-obj-$(CONFIG_ESP) += esp.o
-common-obj-$(CONFIG_ESP_PCI) += esp-pci.o
-obj-$(CONFIG_SPAPR_VSCSI) += spapr_vscsi.o
-
-ifeq ($(CONFIG_VIRTIO_SCSI),y)
-obj-y += virtio-scsi.o virtio-scsi-dataplane.o
-obj-$(CONFIG_VHOST_SCSI) += vhost-scsi-common.o vhost-scsi.o
-obj-$(CONFIG_VHOST_USER_SCSI) += vhost-scsi-common.o vhost-user-scsi.o
-endif
hw/scsi/meson.build new file +26 -0
new file mode 100644
index 0000000..923a34f
@@ -0,0 +1,26 @@
+scsi_ss = ss.source_set()
+scsi_ss.add(files(
+  'emulation.c',
+  'scsi-bus.c',
+  'scsi-disk.c',
+  'scsi-generic.c',
+))
+scsi_ss.add(when: 'CONFIG_ESP', if_true: files('esp.c'))
+scsi_ss.add(when: 'CONFIG_ESP_PCI', if_true: files('esp-pci.c'))
+scsi_ss.add(when: 'CONFIG_LSI_SCSI_PCI', if_true: files('lsi53c895a.c'))
+scsi_ss.add(when: 'CONFIG_MEGASAS_SCSI_PCI', if_true: files('megasas.c'))
+scsi_ss.add(when: 'CONFIG_MPTSAS_SCSI_PCI', if_true: files('mptsas.c', 'mptconfig.c', 'mptendian.c'))
+scsi_ss.add(when: 'CONFIG_VMW_PVSCSI_SCSI_PCI', if_true: files('vmw_pvscsi.c'))
+softmmu_ss.add_all(when: 'CONFIG_SCSI', if_true: scsi_ss)
+
+specific_scsi_ss = ss.source_set()
+
+virtio_scsi_ss = ss.source_set()
+virtio_scsi_ss.add(files('virtio-scsi.c', 'virtio-scsi-dataplane.c'))
+virtio_scsi_ss.add(when: 'CONFIG_VHOST_SCSI', if_true: files('vhost-scsi-common.c', 'vhost-scsi.c'))
+virtio_scsi_ss.add(when: 'CONFIG_VHOST_USER_SCSI', if_true: files('vhost-scsi-common.c', 'vhost-user-scsi.c'))
+specific_scsi_ss.add_all(when: 'CONFIG_VIRTIO_SCSI', if_true: virtio_scsi_ss)
+
+specific_scsi_ss.add(when: 'CONFIG_SPAPR_VSCSI', if_true: files('spapr_vscsi.c'))
+
+specific_ss.add_all(when: 'CONFIG_SCSI', if_true: specific_scsi_ss)
Signature · 1 line
1.8.3.1
#103 lore raw

PATCH 98/147 meson: convert hw/pcmcia

In reply to Paolo Bonzini

From: Marc-André Lureau <[email protected]>

---
 hw/Makefile.objs        | 1 -
 hw/meson.build          | 1 +
 hw/pcmcia/Makefile.objs | 2 --
 hw/pcmcia/meson.build   | 2 ++
 4 files changed, 3 insertions(+), 3 deletions(-)
 delete mode 100644 hw/pcmcia/Makefile.objs
 create mode 100644 hw/pcmcia/meson.build
hw/Makefile.objs +0 -1
index b6461c2..f28da58 100644
@@ -23,7 +23,6 @@ devices-dirs-y += rdma/
 devices-dirs-y += nvram/
 devices-dirs-y += pci/
 devices-dirs-$(CONFIG_PCI) += pci-bridge/ pci-host/
-devices-dirs-y += pcmcia/
 endif
 
 common-obj-y += $(devices-dirs-y)
hw/meson.build +1 -0
index d4abb67..ed25644 100644
@@ -1,6 +1,7 @@
 subdir('core')
 subdir('mem')
 subdir('nubus')
+subdir('pcmcia')
 subdir('rtc')
 subdir('scsi')
 subdir('sd')
hw/pcmcia/Makefile.objs deleted +0 -2
deleted file mode 100644
index 02cd986..0000000
@@ -1,2 +0,0 @@
-common-obj-y += pcmcia.o
-common-obj-$(CONFIG_PXA2XX) += pxa2xx.o
hw/pcmcia/meson.build new file +2 -0
new file mode 100644
index 0000000..ab50bd3
@@ -0,0 +1,2 @@
+softmmu_ss.add(files('pcmcia.c'))
+softmmu_ss.add(when: 'CONFIG_PXA2XX', if_true: files('pxa2xx.c'))
Signature · 1 line
1.8.3.1
#104 lore raw

PATCH 99/147 meson: convert hw/pci-host

In reply to Paolo Bonzini

From: Marc-André Lureau <[email protected]>

---
 hw/Makefile.objs          |  2 +-
 hw/meson.build            |  1 +
 hw/pci-host/Makefile.objs | 24 ------------------------
 hw/pci-host/meson.build   | 31 +++++++++++++++++++++++++++++++
 4 files changed, 33 insertions(+), 25 deletions(-)
 delete mode 100644 hw/pci-host/Makefile.objs
 create mode 100644 hw/pci-host/meson.build
hw/Makefile.objs +1 -1
index f28da58..0038cf8 100644
@@ -22,7 +22,7 @@ devices-dirs-y += net/
 devices-dirs-y += rdma/
 devices-dirs-y += nvram/
 devices-dirs-y += pci/
-devices-dirs-$(CONFIG_PCI) += pci-bridge/ pci-host/
+devices-dirs-$(CONFIG_PCI) += pci-bridge/
 endif
 
 common-obj-y += $(devices-dirs-y)
hw/meson.build +1 -0
index ed25644..ca36e48 100644
@@ -1,6 +1,7 @@
 subdir('core')
 subdir('mem')
 subdir('nubus')
+subdir('pci-host')
 subdir('pcmcia')
 subdir('rtc')
 subdir('scsi')
hw/pci-host/Makefile.objs deleted +0 -24
deleted file mode 100644
index e422e0a..0000000
@@ -1,24 +0,0 @@
-common-obj-$(CONFIG_PAM) += pam.o
-
-# PPC devices
-common-obj-$(CONFIG_PREP_PCI) += prep.o
-common-obj-$(CONFIG_GRACKLE_PCI) += grackle.o
-# NewWorld PowerMac
-common-obj-$(CONFIG_UNIN_PCI) += uninorth.o
-# PowerPC E500 boards
-common-obj-$(CONFIG_PPCE500_PCI) += ppce500.o
-
-# ARM devices
-common-obj-$(CONFIG_VERSATILE_PCI) += versatile.o
-
-common-obj-$(CONFIG_PCI_SABRE) += sabre.o
-common-obj-$(CONFIG_PCI_BONITO) += bonito.o
-common-obj-$(CONFIG_PCI_I440FX) += i440fx.o
-common-obj-$(CONFIG_XEN_IGD_PASSTHROUGH) += xen_igd_pt.o
-common-obj-$(CONFIG_PCI_EXPRESS_Q35) += q35.o
-common-obj-$(CONFIG_PCI_EXPRESS_GENERIC_BRIDGE) += gpex.o
-common-obj-$(CONFIG_PCI_EXPRESS_XILINX) += xilinx-pcie.o
-
-common-obj-$(CONFIG_PCI_EXPRESS_DESIGNWARE) += designware.o
-obj-$(CONFIG_POWERNV) += pnv_phb4.o pnv_phb4_pec.o
-obj-$(CONFIG_POWERNV) += pnv_phb3.o pnv_phb3_msi.o pnv_phb3_pbcq.o
hw/pci-host/meson.build new file +31 -0
new file mode 100644
index 0000000..cd52f6f
@@ -0,0 +1,31 @@
+pci_ss = ss.source_set()
+pci_ss.add(when: 'CONFIG_PAM', if_true: files('pam.c'))
+pci_ss.add(when: 'CONFIG_PCI_BONITO', if_true: files('bonito.c'))
+pci_ss.add(when: 'CONFIG_PCI_EXPRESS_DESIGNWARE', if_true: files('designware.c'))
+pci_ss.add(when: 'CONFIG_PCI_EXPRESS_GENERIC_BRIDGE', if_true: files('gpex.c'))
+pci_ss.add(when: 'CONFIG_PCI_EXPRESS_Q35', if_true: files('q35.c'))
+pci_ss.add(when: 'CONFIG_PCI_EXPRESS_XILINX', if_true: files('xilinx-pcie.c'))
+pci_ss.add(when: 'CONFIG_PCI_I440FX', if_true: files('i440fx.c'))
+pci_ss.add(when: 'CONFIG_PCI_SABRE', if_true: files('sabre.c'))
+pci_ss.add(when: 'CONFIG_XEN_IGD_PASSTHROUGH', if_true: files('xen_igd_pt.c'))
+
+# PPC devices
+pci_ss.add(when: 'CONFIG_PREP_PCI', if_true: files('prep.c'))
+pci_ss.add(when: 'CONFIG_GRACKLE_PCI', if_true: files('grackle.c'))
+# NewWorld PowerMac
+pci_ss.add(when: 'CONFIG_UNIN_PCI', if_true: files('uninorth.c'))
+# PowerPC E500 boards
+pci_ss.add(when: 'CONFIG_PPCE500_PCI', if_true: files('ppce500.c'))
+
+# ARM devices
+pci_ss.add(when: 'CONFIG_VERSATILE_PCI', if_true: files('versatile.c'))
+
+softmmu_ss.add_all(when: 'CONFIG_PCI', if_true: pci_ss)
+
+specific_ss.add(when: 'CONFIG_POWERNV', if_true: files(
+  'pnv_phb3.c',
+  'pnv_phb3_msi.c',
+  'pnv_phb3_pbcq.c',
+  'pnv_phb4.c',
+  'pnv_phb4_pec.c'
+))
Signature · 1 line
1.8.3.1
#105 lore raw

PATCH 100/147 meson: convert hw/pci-bridge

In reply to Paolo Bonzini

From: Marc-André Lureau <[email protected]>

---
 hw/Makefile.objs            |  1 -
 hw/meson.build              |  1 +
 hw/pci-bridge/Makefile.objs | 10 ----------
 hw/pci-bridge/meson.build   | 14 ++++++++++++++
 4 files changed, 15 insertions(+), 11 deletions(-)
 delete mode 100644 hw/pci-bridge/Makefile.objs
 create mode 100644 hw/pci-bridge/meson.build
hw/Makefile.objs +0 -1
index 0038cf8..3513040 100644
@@ -22,7 +22,6 @@ devices-dirs-y += net/
 devices-dirs-y += rdma/
 devices-dirs-y += nvram/
 devices-dirs-y += pci/
-devices-dirs-$(CONFIG_PCI) += pci-bridge/
 endif
 
 common-obj-y += $(devices-dirs-y)
hw/meson.build +1 -0
index ca36e48..a7301f2 100644
@@ -1,6 +1,7 @@
 subdir('core')
 subdir('mem')
 subdir('nubus')
+subdir('pci-bridge')
 subdir('pci-host')
 subdir('pcmcia')
 subdir('rtc')
hw/pci-bridge/Makefile.objs deleted +0 -10
deleted file mode 100644
index 47065f8..0000000
@@ -1,10 +0,0 @@
-common-obj-y += pci_bridge_dev.o
-common-obj-$(CONFIG_PCIE_PORT) += pcie_root_port.o gen_pcie_root_port.o pcie_pci_bridge.o
-common-obj-$(CONFIG_PXB) += pci_expander_bridge.o
-common-obj-$(CONFIG_XIO3130) += xio3130_upstream.o xio3130_downstream.o
-common-obj-$(CONFIG_IOH3420) += ioh3420.o
-common-obj-$(CONFIG_I82801B11) += i82801b11.o
-# NewWorld PowerMac
-common-obj-$(CONFIG_DEC_PCI) += dec.o
-# Sun4u
-common-obj-$(CONFIG_SIMBA) += simba.o
hw/pci-bridge/meson.build new file +14 -0
new file mode 100644
index 0000000..daab8ac
@@ -0,0 +1,14 @@
+pci_ss = ss.source_set()
+pci_ss.add(files('pci_bridge_dev.c'))
+pci_ss.add(when: 'CONFIG_I82801B11', if_true: files('i82801b11.c'))
+pci_ss.add(when: 'CONFIG_IOH3420', if_true: files('ioh3420.c'))
+pci_ss.add(when: 'CONFIG_PCIE_PORT', if_true: files('pcie_root_port.c', 'gen_pcie_root_port.c', 'pcie_pci_bridge.c'))
+pci_ss.add(when: 'CONFIG_PXB', if_true: files('pci_expander_bridge.c'))
+pci_ss.add(when: 'CONFIG_XIO3130', if_true: files('xio3130_upstream.c', 'xio3130_downstream.c'))
+
+# NewWorld PowerMac
+pci_ss.add(when: 'CONFIG_DEC_PCI', if_true: files('dec.c'))
+# Sun4u
+pci_ss.add(when: 'CONFIG_SIMBA', if_true: files('simba.c'))
+
+softmmu_ss.add_all(when: 'CONFIG_PCI', if_true: pci_ss)
Signature · 1 line
1.8.3.1
#106 lore raw

PATCH 101/147 meson: convert hw/pci

In reply to Paolo Bonzini

From: Marc-André Lureau <[email protected]>

---
 hw/Makefile.objs     |  1 -
 hw/meson.build       |  1 +
 hw/pci/Makefile.objs | 14 --------------
 hw/pci/meson.build   | 19 +++++++++++++++++++
 4 files changed, 20 insertions(+), 15 deletions(-)
 delete mode 100644 hw/pci/Makefile.objs
 create mode 100644 hw/pci/meson.build
hw/Makefile.objs +0 -1
index 3513040..2083284 100644
@@ -21,7 +21,6 @@ devices-dirs-y += misc/
 devices-dirs-y += net/
 devices-dirs-y += rdma/
 devices-dirs-y += nvram/
-devices-dirs-y += pci/
 endif
 
 common-obj-y += $(devices-dirs-y)
hw/meson.build +1 -0
index a7301f2..53c347c 100644
@@ -1,6 +1,7 @@
 subdir('core')
 subdir('mem')
 subdir('nubus')
+subdir('pci')
 subdir('pci-bridge')
 subdir('pci-host')
 subdir('pcmcia')
hw/pci/Makefile.objs deleted +0 -14
deleted file mode 100644
index c78f2fb..0000000
@@ -1,14 +0,0 @@
-common-obj-$(CONFIG_PCI) += pci.o pci_bridge.o
-common-obj-$(CONFIG_PCI) += msix.o msi.o
-common-obj-$(CONFIG_PCI) += shpc.o
-common-obj-$(CONFIG_PCI) += slotid_cap.o
-common-obj-$(CONFIG_PCI) += pci_host.o
-
-# The functions in these modules can be used by devices too.  Since we
-# allow plugging PCIe devices into PCI buses, include them even if
-# CONFIG_PCI_EXPRESS=n.
-common-obj-$(CONFIG_PCI) += pcie.o pcie_aer.o
-common-obj-$(CONFIG_PCI_EXPRESS) += pcie_port.o pcie_host.o
-
-common-obj-$(call lnot,$(CONFIG_PCI)) += pci-stub.o
-common-obj-$(CONFIG_ALL) += pci-stub.o
hw/pci/meson.build new file +19 -0
new file mode 100644
index 0000000..5c4bbac
@@ -0,0 +1,19 @@
+pci_ss = ss.source_set()
+pci_ss.add(files(
+  'msi.c',
+  'msix.c',
+  'pci.c',
+  'pci_bridge.c',
+  'pci_host.c',
+  'shpc.c',
+  'slotid_cap.c'
+))
+# The functions in these modules can be used by devices too.  Since we
+# allow plugging PCIe devices into PCI buses, include them even if
+# CONFIG_PCI_EXPRESS=n.
+pci_ss.add(files('pcie.c', 'pcie_aer.c'))
+softmmu_ss.add(when: 'CONFIG_PCI_EXPRESS', if_true: files('pcie_port.c', 'pcie_host.c'))
+softmmu_ss.add_all(when: 'CONFIG_PCI', if_true: pci_ss)
+
+softmmu_ss.add(when: 'CONFIG_PCI', if_false: files('pci-stub.c'))
+softmmu_ss.add(when: 'CONFIG_ALL', if_true: files('pci-stub.c'))
Signature · 1 line
1.8.3.1
#107 lore raw

PATCH 102/147 meson: convert hw/nvram

In reply to Paolo Bonzini

From: Marc-André Lureau <[email protected]>

---
 hw/Makefile.objs       | 1 -
 hw/meson.build         | 1 +
 hw/nvram/Makefile.objs | 8 --------
 hw/nvram/meson.build   | 9 +++++++++
 4 files changed, 10 insertions(+), 9 deletions(-)
 delete mode 100644 hw/nvram/Makefile.objs
 create mode 100644 hw/nvram/meson.build
hw/Makefile.objs +0 -1
index 2083284..78860ae 100644
@@ -20,7 +20,6 @@ devices-dirs-y += isa/
 devices-dirs-y += misc/
 devices-dirs-y += net/
 devices-dirs-y += rdma/
-devices-dirs-y += nvram/
 endif
 
 common-obj-y += $(devices-dirs-y)
hw/meson.build +1 -0
index 53c347c..0bdd6a2 100644
@@ -1,6 +1,7 @@
 subdir('core')
 subdir('mem')
 subdir('nubus')
+subdir('nvram')
 subdir('pci')
 subdir('pci-bridge')
 subdir('pci-host')
hw/nvram/Makefile.objs deleted +0 -8
deleted file mode 100644
index f3ad921..0000000
@@ -1,8 +0,0 @@
-common-obj-$(CONFIG_DS1225Y) += ds1225y.o
-common-obj-$(CONFIG_NMC93XX_EEPROM) += eeprom93xx.o
-common-obj-$(CONFIG_AT24C) += eeprom_at24c.o
-common-obj-y += fw_cfg.o
-common-obj-$(CONFIG_CHRP_NVRAM) += chrp_nvram.o
-common-obj-$(CONFIG_MAC_NVRAM) += mac_nvram.o
-common-obj-$(CONFIG_NRF51_SOC) += nrf51_nvm.o
-obj-$(CONFIG_PSERIES) += spapr_nvram.o
hw/nvram/meson.build new file +9 -0
new file mode 100644
index 0000000..ba21455
@@ -0,0 +1,9 @@
+softmmu_ss.add(files('fw_cfg.c'))
+softmmu_ss.add(when: 'CONFIG_CHRP_NVRAM', if_true: files('chrp_nvram.c'))
+softmmu_ss.add(when: 'CONFIG_DS1225Y', if_true: files('ds1225y.c'))
+softmmu_ss.add(when: 'CONFIG_NMC93XX_EEPROM', if_true: files('eeprom93xx.c'))
+softmmu_ss.add(when: 'CONFIG_AT24C', if_true: files('eeprom_at24c.c'))
+softmmu_ss.add(when: 'CONFIG_MAC_NVRAM', if_true: files('mac_nvram.c'))
+softmmu_ss.add(when: 'CONFIG_NRF51_SOC', if_true: files('nrf51_nvm.c'))
+
+specific_ss.add(when: 'CONFIG_PSERIES', if_true: files('spapr_nvram.c'))
Signature · 1 line
1.8.3.1
#108 lore raw

PATCH 103/147 meson: convert hw/rdma

In reply to Paolo Bonzini

From: Marc-André Lureau <[email protected]>

---
 hw/Makefile.objs      |  1 -
 hw/meson.build        |  1 +
 hw/rdma/Makefile.objs |  3 ---
 hw/rdma/meson.build   | 10 ++++++++++
 4 files changed, 11 insertions(+), 4 deletions(-)
 delete mode 100644 hw/rdma/Makefile.objs
 create mode 100644 hw/rdma/meson.build
hw/Makefile.objs +0 -1
index 78860ae..748a718 100644
@@ -19,7 +19,6 @@ devices-dirs-$(CONFIG_IPMI) += ipmi/
 devices-dirs-y += isa/
 devices-dirs-y += misc/
 devices-dirs-y += net/
-devices-dirs-y += rdma/
 endif
 
 common-obj-y += $(devices-dirs-y)
hw/meson.build +1 -0
index 0bdd6a2..f704e51 100644
@@ -6,6 +6,7 @@ subdir('pci')
 subdir('pci-bridge')
 subdir('pci-host')
 subdir('pcmcia')
+subdir('rdma')
 subdir('rtc')
 subdir('scsi')
 subdir('sd')
hw/rdma/Makefile.objs deleted +0 -3
deleted file mode 100644
index 819bb12..0000000
@@ -1,3 +0,0 @@
-obj-$(CONFIG_VMW_PVRDMA) += rdma_utils.o rdma_backend.o rdma_rm.o rdma.o
-obj-$(CONFIG_VMW_PVRDMA) += vmw/pvrdma_dev_ring.o vmw/pvrdma_cmd.o \
-                     vmw/pvrdma_qp_ops.o vmw/pvrdma_main.o
hw/rdma/meson.build new file +10 -0
new file mode 100644
index 0000000..7325f40
@@ -0,0 +1,10 @@
+specific_ss.add(when: 'CONFIG_VMW_PVRDMA', if_true: files(
+  'rdma.c',
+  'rdma_backend.c',
+  'rdma_rm.c',
+  'rdma_utils.c',
+  'vmw/pvrdma_cmd.c',
+  'vmw/pvrdma_dev_ring.c',
+  'vmw/pvrdma_main.c',
+  'vmw/pvrdma_qp_ops.c',
+))
Signature · 1 line
1.8.3.1
#109 lore raw

PATCH 104/147 meson: convert hw/net

In reply to Paolo Bonzini

From: Marc-André Lureau <[email protected]>

---
 hw/Makefile.objs         |  1 -
 hw/meson.build           |  1 +
 hw/net/Makefile.objs     | 59 ------------------------------------------
 hw/net/can/Makefile.objs |  4 ---
 hw/net/can/meson.build   |  4 +++
 hw/net/meson.build       | 67 ++++++++++++++++++++++++++++++++++++++++++++++++
 6 files changed, 72 insertions(+), 64 deletions(-)
 delete mode 100644 hw/net/Makefile.objs
 delete mode 100644 hw/net/can/Makefile.objs
 create mode 100644 hw/net/can/meson.build
 create mode 100644 hw/net/meson.build
hw/Makefile.objs +0 -1
index 748a718..d0d7816 100644
@@ -18,7 +18,6 @@ devices-dirs-$(CONFIG_IPACK) += ipack/
 devices-dirs-$(CONFIG_IPMI) += ipmi/
 devices-dirs-y += isa/
 devices-dirs-y += misc/
-devices-dirs-y += net/
 endif
 
 common-obj-y += $(devices-dirs-y)
hw/meson.build +1 -0
index f704e51..1f7b2c4 100644
@@ -1,5 +1,6 @@
 subdir('core')
 subdir('mem')
+subdir('net')
 subdir('nubus')
 subdir('nvram')
 subdir('pci')
hw/net/Makefile.objs deleted +0 -59

59 lines not on this page · raw message

hw/net/can/Makefile.objs deleted +0 -4
deleted file mode 100644
index 9f0c4ee..0000000
@@ -1,4 +0,0 @@
-common-obj-$(CONFIG_CAN_SJA1000) += can_sja1000.o
-common-obj-$(CONFIG_CAN_PCI) += can_kvaser_pci.o
-common-obj-$(CONFIG_CAN_PCI) += can_pcm3680_pci.o
-common-obj-$(CONFIG_CAN_PCI) += can_mioe3680_pci.o
hw/net/can/meson.build new file +4 -0
new file mode 100644
index 0000000..c9cfeb7
@@ -0,0 +1,4 @@
+softmmu_ss.add(when: 'CONFIG_CAN_SJA1000', if_true: files('can_sja1000.c'))
+softmmu_ss.add(when: 'CONFIG_CAN_PCI', if_true: files('can_kvaser_pci.c'))
+softmmu_ss.add(when: 'CONFIG_CAN_PCI', if_true: files('can_pcm3680_pci.c'))
+softmmu_ss.add(when: 'CONFIG_CAN_PCI', if_true: files('can_mioe3680_pci.c'))
hw/net/meson.build new file +67 -0

67 lines not on this page · raw message

Signature · 1 line
1.8.3.1
#110 lore raw

PATCH 105/147 meson: convert hw/misc

In reply to Paolo Bonzini

From: Marc-André Lureau <[email protected]>

---
 hw/Makefile.objs            |  1 -
 hw/meson.build              |  1 +
 hw/misc/Makefile.objs       | 95 -------------------------------------------
 hw/misc/macio/Makefile.objs |  5 ---
 hw/misc/macio/meson.build   |  8 ++++
 hw/misc/meson.build         | 99 +++++++++++++++++++++++++++++++++++++++++++++
 6 files changed, 108 insertions(+), 101 deletions(-)
 delete mode 100644 hw/misc/Makefile.objs
 delete mode 100644 hw/misc/macio/Makefile.objs
 create mode 100644 hw/misc/macio/meson.build
 create mode 100644 hw/misc/meson.build
hw/Makefile.objs +0 -1
index d0d7816..ac8278e 100644
@@ -17,7 +17,6 @@ devices-dirs-y += intc/
 devices-dirs-$(CONFIG_IPACK) += ipack/
 devices-dirs-$(CONFIG_IPMI) += ipmi/
 devices-dirs-y += isa/
-devices-dirs-y += misc/
 endif
 
 common-obj-y += $(devices-dirs-y)
hw/meson.build +1 -0
index 1f7b2c4..6ca82b0 100644
@@ -1,5 +1,6 @@
 subdir('core')
 subdir('mem')
+subdir('misc')
 subdir('net')
 subdir('nubus')
 subdir('nvram')
hw/misc/Makefile.objs deleted +0 -95

95 lines not on this page · raw message

hw/misc/macio/Makefile.objs deleted +0 -5
deleted file mode 100644
index 07fdb32..0000000
@@ -1,5 +0,0 @@
-common-obj-y += macio.o
-common-obj-$(CONFIG_CUDA) += cuda.o
-common-obj-$(CONFIG_MAC_PMU) += pmu.o
-common-obj-$(CONFIG_MAC_DBDMA) += mac_dbdma.o
-common-obj-$(CONFIG_MACIO_GPIO) += gpio.o
hw/misc/macio/meson.build new file +8 -0
new file mode 100644
index 0000000..17282da
@@ -0,0 +1,8 @@
+macio_ss = ss.source_set()
+macio_ss.add(files('macio.c'))
+macio_ss.add(when: 'CONFIG_CUDA', if_true: files('cuda.c'))
+macio_ss.add(when: 'CONFIG_MACIO_GPIO', if_true: files('gpio.c'))
+macio_ss.add(when: 'CONFIG_MAC_DBDMA', if_true: files('mac_dbdma.c'))
+macio_ss.add(when: 'CONFIG_MAC_PMU', if_true: files('pmu.c'))
+
+softmmu_ss.add_all(when: 'CONFIG_MACIO', if_true: macio_ss)
hw/misc/meson.build new file +99 -0

99 lines not on this page · raw message

Signature · 1 line
1.8.3.1
#111 lore raw

PATCH 106/147 meson: convert hw/isa

In reply to Paolo Bonzini

From: Marc-André Lureau <[email protected]>

---
 hw/Makefile.objs     |  1 -
 hw/isa/Makefile.objs | 11 -----------
 hw/isa/meson.build   | 11 +++++++++++
 hw/meson.build       |  1 +
 4 files changed, 12 insertions(+), 12 deletions(-)
 delete mode 100644 hw/isa/Makefile.objs
 create mode 100644 hw/isa/meson.build
hw/Makefile.objs +0 -1
index ac8278e..a28e211 100644
@@ -16,7 +16,6 @@ devices-dirs-y += input/
 devices-dirs-y += intc/
 devices-dirs-$(CONFIG_IPACK) += ipack/
 devices-dirs-$(CONFIG_IPMI) += ipmi/
-devices-dirs-y += isa/
 endif
 
 common-obj-y += $(devices-dirs-y)
hw/isa/Makefile.objs deleted +0 -11
deleted file mode 100644
index 8e73960..0000000
@@ -1,11 +0,0 @@
-common-obj-$(CONFIG_ISA_BUS) += isa-bus.o
-common-obj-$(CONFIG_ISA_SUPERIO) += isa-superio.o
-common-obj-$(CONFIG_APM) += apm.o
-common-obj-$(CONFIG_I82378) += i82378.o
-common-obj-$(CONFIG_PC87312) += pc87312.o
-common-obj-$(CONFIG_PIIX3) += piix3.o
-common-obj-$(CONFIG_PIIX4) += piix4.o
-common-obj-$(CONFIG_VT82C686) += vt82c686.o
-common-obj-$(CONFIG_SMC37C669) += smc37c669-superio.o
-
-obj-$(CONFIG_LPC_ICH9) += lpc_ich9.o
hw/isa/meson.build new file +11 -0
new file mode 100644
index 0000000..8bf678c
@@ -0,0 +1,11 @@
+softmmu_ss.add(when: 'CONFIG_APM', if_true: files('apm.c'))
+softmmu_ss.add(when: 'CONFIG_I82378', if_true: files('i82378.c'))
+softmmu_ss.add(when: 'CONFIG_ISA_BUS', if_true: files('isa-bus.c'))
+softmmu_ss.add(when: 'CONFIG_ISA_SUPERIO', if_true: files('isa-superio.c'))
+softmmu_ss.add(when: 'CONFIG_PC87312', if_true: files('pc87312.c'))
+softmmu_ss.add(when: 'CONFIG_PIIX3', if_true: files('piix3.c'))
+softmmu_ss.add(when: 'CONFIG_PIIX4', if_true: files('piix4.c'))
+softmmu_ss.add(when: 'CONFIG_SMC37C669', if_true: files('smc37c669-superio.c'))
+softmmu_ss.add(when: 'CONFIG_VT82C686', if_true: files('vt82c686.c'))
+
+specific_ss.add(when: 'CONFIG_LPC_ICH9', if_true: files('lpc_ich9.c'))
hw/meson.build +1 -0
index 6ca82b0..8659854 100644
@@ -1,4 +1,5 @@
 subdir('core')
+subdir('isa')
 subdir('mem')
 subdir('misc')
 subdir('net')
Signature · 1 line
1.8.3.1
#112 lore raw

PATCH 107/147 meson: convert hw/ipmi

In reply to Paolo Bonzini

From: Marc-André Lureau <[email protected]>

---
 hw/Makefile.objs      |  1 -
 hw/ipmi/Makefile.objs |  8 --------
 hw/ipmi/meson.build   | 11 +++++++++++
 hw/meson.build        |  1 +
 4 files changed, 12 insertions(+), 9 deletions(-)
 delete mode 100644 hw/ipmi/Makefile.objs
 create mode 100644 hw/ipmi/meson.build
hw/Makefile.objs +0 -1
index a28e211..f136377 100644
@@ -15,7 +15,6 @@ devices-dirs-y += ide/
 devices-dirs-y += input/
 devices-dirs-y += intc/
 devices-dirs-$(CONFIG_IPACK) += ipack/
-devices-dirs-$(CONFIG_IPMI) += ipmi/
 endif
 
 common-obj-y += $(devices-dirs-y)
hw/ipmi/Makefile.objs deleted +0 -8
deleted file mode 100644
index 3cca10b..0000000
@@ -1,8 +0,0 @@
-common-obj-$(CONFIG_IPMI) += ipmi.o ipmi_kcs.o ipmi_bt.o
-common-obj-$(CONFIG_IPMI_LOCAL) += ipmi_bmc_sim.o
-common-obj-$(CONFIG_IPMI_EXTERN) += ipmi_bmc_extern.o
-common-obj-$(CONFIG_ISA_IPMI_KCS) += isa_ipmi_kcs.o
-common-obj-$(CONFIG_PCI_IPMI_KCS) += pci_ipmi_kcs.o
-common-obj-$(CONFIG_ISA_IPMI_BT) += isa_ipmi_bt.o
-common-obj-$(CONFIG_PCI_IPMI_BT) += pci_ipmi_bt.o
-common-obj-$(CONFIG_IPMI_SSIF) += smbus_ipmi.o
hw/ipmi/meson.build new file +11 -0
new file mode 100644
index 0000000..9622ea2
@@ -0,0 +1,11 @@
+ipmi_ss = ss.source_set()
+ipmi_ss.add(when: 'CONFIG_IPMI', if_true: files('ipmi.c', 'ipmi_kcs.c', 'ipmi_bt.c'))
+ipmi_ss.add(when: 'CONFIG_IPMI_LOCAL', if_true: files('ipmi_bmc_sim.c'))
+ipmi_ss.add(when: 'CONFIG_IPMI_EXTERN', if_true: files('ipmi_bmc_extern.c'))
+ipmi_ss.add(when: 'CONFIG_ISA_IPMI_KCS', if_true: files('isa_ipmi_kcs.c'))
+ipmi_ss.add(when: 'CONFIG_PCI_IPMI_KCS', if_true: files('pci_ipmi_kcs.c'))
+ipmi_ss.add(when: 'CONFIG_ISA_IPMI_BT', if_true: files('isa_ipmi_bt.c'))
+ipmi_ss.add(when: 'CONFIG_PCI_IPMI_BT', if_true: files('pci_ipmi_bt.c'))
+ipmi_ss.add(when: 'CONFIG_IPMI_SSIF', if_true: files('smbus_ipmi.c'))
+
+softmmu_ss.add_all(when: 'CONFIG_IPMI', if_true: ipmi_ss)
hw/meson.build +1 -0
index 8659854..9796f95 100644
@@ -1,4 +1,5 @@
 subdir('core')
+subdir('ipmi')
 subdir('isa')
 subdir('mem')
 subdir('misc')
Signature · 1 line
1.8.3.1
#113 lore raw

PATCH 108/147 meson: convert hw/ipack

In reply to Paolo Bonzini

From: Marc-André Lureau <[email protected]>

---
 hw/Makefile.objs       | 1 -
 hw/ipack/Makefile.objs | 2 --
 hw/ipack/meson.build   | 1 +
 hw/meson.build         | 1 +
 4 files changed, 2 insertions(+), 3 deletions(-)
 delete mode 100644 hw/ipack/Makefile.objs
 create mode 100644 hw/ipack/meson.build
hw/Makefile.objs +0 -1
index f136377..76d9305 100644
@@ -14,7 +14,6 @@ devices-dirs-$(CONFIG_I2C) += i2c/
 devices-dirs-y += ide/
 devices-dirs-y += input/
 devices-dirs-y += intc/
-devices-dirs-$(CONFIG_IPACK) += ipack/
 endif
 
 common-obj-y += $(devices-dirs-y)
hw/ipack/Makefile.objs deleted +0 -2
deleted file mode 100644
index 8b9bdcb..0000000
@@ -1,2 +0,0 @@
-common-obj-$(CONFIG_IPACK) += ipack.o
-common-obj-$(CONFIG_IPACK) += tpci200.o
hw/ipack/meson.build new file +1 -0
new file mode 100644
index 0000000..3f8138b
@@ -0,0 +1 @@
+softmmu_ss.add(when: 'CONFIG_IPACK', if_true: files('ipack.c', 'tpci200.c'))
hw/meson.build +1 -0
index 9796f95..ec4bb48 100644
@@ -1,4 +1,5 @@
 subdir('core')
+subdir('ipack')
 subdir('ipmi')
 subdir('isa')
 subdir('mem')
Signature · 1 line
1.8.3.1
#114 lore raw

PATCH 109/147 meson: convert hw/intc

In reply to Paolo Bonzini

From: Marc-André Lureau <[email protected]>

---
 hw/Makefile.objs      |  1 -
 hw/intc/Makefile.objs | 54 --------------------------------------------------
 hw/intc/meson.build   | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++
 hw/meson.build        |  1 +
 4 files changed, 56 insertions(+), 55 deletions(-)
 delete mode 100644 hw/intc/Makefile.objs
 create mode 100644 hw/intc/meson.build
hw/Makefile.objs +0 -1
index 76d9305..80b1041 100644
@@ -13,7 +13,6 @@ devices-dirs-$(CONFIG_HYPERV) += hyperv/
 devices-dirs-$(CONFIG_I2C) += i2c/
 devices-dirs-y += ide/
 devices-dirs-y += input/
-devices-dirs-y += intc/
 endif
 
 common-obj-y += $(devices-dirs-y)
hw/intc/Makefile.objs deleted +0 -54

54 lines not on this page · raw message

hw/intc/meson.build new file +55 -0

55 lines not on this page · raw message

hw/meson.build +1 -0
index ec4bb48..986e710 100644
@@ -1,4 +1,5 @@
 subdir('core')
+subdir('intc')
 subdir('ipack')
 subdir('ipmi')
 subdir('isa')
Signature · 1 line
1.8.3.1
#115 lore raw

PATCH 110/147 meson: convert hw/input

In reply to Paolo Bonzini

From: Marc-André Lureau <[email protected]>

---
 hw/Makefile.objs       |  1 -
 hw/input/Makefile.objs | 18 ------------------
 hw/input/meson.build   | 18 ++++++++++++++++++
 hw/meson.build         |  1 +
 4 files changed, 19 insertions(+), 19 deletions(-)
 delete mode 100644 hw/input/Makefile.objs
 create mode 100644 hw/input/meson.build
hw/Makefile.objs +0 -1
index 80b1041..3feccd8 100644
@@ -12,7 +12,6 @@ devices-dirs-y += gpio/
 devices-dirs-$(CONFIG_HYPERV) += hyperv/
 devices-dirs-$(CONFIG_I2C) += i2c/
 devices-dirs-y += ide/
-devices-dirs-y += input/
 endif
 
 common-obj-y += $(devices-dirs-y)
hw/input/Makefile.objs deleted +0 -18
deleted file mode 100644
index abc1ff0..0000000
@@ -1,18 +0,0 @@
-common-obj-$(CONFIG_ADB) += adb.o adb-mouse.o adb-kbd.o
-common-obj-y += hid.o
-common-obj-$(CONFIG_LM832X) += lm832x.o
-common-obj-$(CONFIG_PCKBD) += pckbd.o
-common-obj-$(CONFIG_PL050) += pl050.o
-common-obj-$(CONFIG_PS2) += ps2.o
-common-obj-$(CONFIG_STELLARIS_INPUT) += stellaris_input.o
-common-obj-$(CONFIG_TSC2005) += tsc2005.o
-
-common-obj-$(CONFIG_VIRTIO_INPUT) += virtio-input.o
-common-obj-$(CONFIG_VIRTIO_INPUT) += virtio-input-hid.o
-common-obj-$(CONFIG_VIRTIO_INPUT_HOST) += virtio-input-host.o
-common-obj-$(CONFIG_VHOST_USER_INPUT) += vhost-user-input.o
-
-common-obj-$(CONFIG_MILKYMIST) += milkymist-softusb.o
-common-obj-$(CONFIG_PXA2XX) += pxa2xx_keypad.o
-common-obj-$(CONFIG_TSC210X) += tsc210x.o
-common-obj-$(CONFIG_LASIPS2) += lasips2.o
hw/input/meson.build new file +18 -0
new file mode 100644
index 0000000..e7285b1
@@ -0,0 +1,18 @@
+softmmu_ss.add(files('hid.c'))
+softmmu_ss.add(when: 'CONFIG_ADB', if_true: files('adb.c', 'adb-mouse.c', 'adb-kbd.c'))
+softmmu_ss.add(when: 'CONFIG_LM832X', if_true: files('lm832x.c'))
+softmmu_ss.add(when: 'CONFIG_PCKBD', if_true: files('pckbd.c'))
+softmmu_ss.add(when: 'CONFIG_PL050', if_true: files('pl050.c'))
+softmmu_ss.add(when: 'CONFIG_PS2', if_true: files('ps2.c'))
+softmmu_ss.add(when: 'CONFIG_STELLARIS_INPUT', if_true: files('stellaris_input.c'))
+softmmu_ss.add(when: 'CONFIG_TSC2005', if_true: files('tsc2005.c'))
+
+softmmu_ss.add(when: 'CONFIG_VIRTIO_INPUT', if_true: files('virtio-input.c'))
+softmmu_ss.add(when: 'CONFIG_VIRTIO_INPUT', if_true: files('virtio-input-hid.c'))
+softmmu_ss.add(when: 'CONFIG_VIRTIO_INPUT_HOST', if_true: files('virtio-input-host.c'))
+softmmu_ss.add(when: 'CONFIG_VHOST_USER_INPUT', if_true: files('vhost-user-input.c'))
+
+softmmu_ss.add(when: 'CONFIG_MILKYMIST', if_true: files('milkymist-softusb.c'))
+softmmu_ss.add(when: 'CONFIG_PXA2XX', if_true: files('pxa2xx_keypad.c'))
+softmmu_ss.add(when: 'CONFIG_TSC210X', if_true: files('tsc210x.c'))
+softmmu_ss.add(when: 'CONFIG_LASIPS2', if_true: files('lasips2.c'))
hw/meson.build +1 -0
index 986e710..b15c8d0 100644
@@ -1,4 +1,5 @@
 subdir('core')
+subdir('input')
 subdir('intc')
 subdir('ipack')
 subdir('ipmi')
Signature · 1 line
1.8.3.1
#116 lore raw

PATCH 111/147 meson: convert hw/ide

In reply to Paolo Bonzini

From: Marc-André Lureau <[email protected]>

---
 hw/Makefile.objs     |  1 -
 hw/ide/Makefile.objs | 14 --------------
 hw/ide/meson.build   | 14 ++++++++++++++
 hw/meson.build       |  1 +
 4 files changed, 15 insertions(+), 15 deletions(-)
 delete mode 100644 hw/ide/Makefile.objs
 create mode 100644 hw/ide/meson.build
hw/Makefile.objs +0 -1
index 3feccd8..02c5c0d 100644
@@ -11,7 +11,6 @@ devices-dirs-y += dma/
 devices-dirs-y += gpio/
 devices-dirs-$(CONFIG_HYPERV) += hyperv/
 devices-dirs-$(CONFIG_I2C) += i2c/
-devices-dirs-y += ide/
 endif
 
 common-obj-y += $(devices-dirs-y)
hw/ide/Makefile.objs deleted +0 -14
deleted file mode 100644
index faf04e0..0000000
@@ -1,14 +0,0 @@
-common-obj-$(CONFIG_IDE_CORE) += core.o atapi.o
-common-obj-$(CONFIG_IDE_QDEV) += qdev.o
-common-obj-$(CONFIG_IDE_PCI) += pci.o
-common-obj-$(CONFIG_IDE_ISA) += isa.o ioport.o
-common-obj-$(CONFIG_IDE_PIIX) += piix.o ioport.o
-common-obj-$(CONFIG_IDE_CMD646) += cmd646.o
-common-obj-$(CONFIG_IDE_MACIO) += macio.o
-common-obj-$(CONFIG_IDE_MMIO) += mmio.o
-common-obj-$(CONFIG_IDE_VIA) += via.o
-common-obj-$(CONFIG_MICRODRIVE) += microdrive.o
-common-obj-$(CONFIG_AHCI) += ahci.o
-common-obj-$(CONFIG_AHCI_ICH9) += ich.o
-common-obj-$(CONFIG_ALLWINNER_A10) += ahci-allwinner.o
-common-obj-$(CONFIG_IDE_SII3112) += sii3112.o
hw/ide/meson.build new file +14 -0
new file mode 100644
index 0000000..ddcb3b2
@@ -0,0 +1,14 @@
+softmmu_ss.add(when: 'CONFIG_AHCI', if_true: files('ahci.c'))
+softmmu_ss.add(when: 'CONFIG_AHCI_ICH9', if_true: files('ich.c'))
+softmmu_ss.add(when: 'CONFIG_ALLWINNER_A10', if_true: files('ahci-allwinner.c'))
+softmmu_ss.add(when: 'CONFIG_IDE_CMD646', if_true: files('cmd646.c'))
+softmmu_ss.add(when: 'CONFIG_IDE_CORE', if_true: files('core.c', 'atapi.c'))
+softmmu_ss.add(when: 'CONFIG_IDE_ISA', if_true: files('isa.c', 'ioport.c'))
+softmmu_ss.add(when: 'CONFIG_IDE_MACIO', if_true: files('macio.c'))
+softmmu_ss.add(when: 'CONFIG_IDE_MMIO', if_true: files('mmio.c'))
+softmmu_ss.add(when: 'CONFIG_IDE_PCI', if_true: files('pci.c'))
+softmmu_ss.add(when: 'CONFIG_IDE_PIIX', if_true: files('piix.c', 'ioport.c'))
+softmmu_ss.add(when: 'CONFIG_IDE_QDEV', if_true: files('qdev.c'))
+softmmu_ss.add(when: 'CONFIG_IDE_SII3112', if_true: files('sii3112.c'))
+softmmu_ss.add(when: 'CONFIG_IDE_VIA', if_true: files('via.c'))
+softmmu_ss.add(when: 'CONFIG_MICRODRIVE', if_true: files('microdrive.c'))
hw/meson.build +1 -0
index b15c8d0..4d7c31c6 100644
@@ -1,4 +1,5 @@
 subdir('core')
+subdir('ide')
 subdir('input')
 subdir('intc')
 subdir('ipack')
Signature · 1 line
1.8.3.1
#117 lore raw

PATCH 112/147 meson: convert hw/i2c

In reply to Paolo Bonzini

From: Marc-André Lureau <[email protected]>

---
 hw/Makefile.objs     |  1 -
 hw/i2c/Makefile.objs | 14 --------------
 hw/i2c/meson.build   | 16 ++++++++++++++++
 hw/meson.build       |  1 +
 4 files changed, 17 insertions(+), 15 deletions(-)
 delete mode 100644 hw/i2c/Makefile.objs
 create mode 100644 hw/i2c/meson.build
hw/Makefile.objs +0 -1
index 02c5c0d..22eb804 100644
@@ -10,7 +10,6 @@ devices-dirs-y += display/
 devices-dirs-y += dma/
 devices-dirs-y += gpio/
 devices-dirs-$(CONFIG_HYPERV) += hyperv/
-devices-dirs-$(CONFIG_I2C) += i2c/
 endif
 
 common-obj-y += $(devices-dirs-y)
hw/i2c/Makefile.objs deleted +0 -14
deleted file mode 100644
index f2c61ea..0000000
@@ -1,14 +0,0 @@
-common-obj-$(CONFIG_I2C) += core.o
-common-obj-$(CONFIG_SMBUS) += smbus_slave.o smbus_master.o
-common-obj-$(CONFIG_SMBUS_EEPROM) += smbus_eeprom.o
-common-obj-$(CONFIG_VERSATILE_I2C) += versatile_i2c.o
-common-obj-$(CONFIG_ACPI_X86_ICH) += smbus_ich9.o
-common-obj-$(CONFIG_ACPI_SMBUS) += pm_smbus.o
-common-obj-$(CONFIG_BITBANG_I2C) += bitbang_i2c.o
-common-obj-$(CONFIG_EXYNOS4) += exynos4210_i2c.o
-common-obj-$(CONFIG_IMX_I2C) += imx_i2c.o
-common-obj-$(CONFIG_ASPEED_SOC) += aspeed_i2c.o
-common-obj-$(CONFIG_NRF51_SOC) += microbit_i2c.o
-common-obj-$(CONFIG_MPC_I2C) += mpc_i2c.o
-common-obj-$(CONFIG_OMAP) += omap_i2c.o
-common-obj-$(CONFIG_PPC4XX) += ppc4xx_i2c.o
hw/i2c/meson.build new file +16 -0
new file mode 100644
index 0000000..3a51153
@@ -0,0 +1,16 @@
+i2c_ss = ss.source_set()
+i2c_ss.add(when: 'CONFIG_I2C', if_true: files('core.c'))
+i2c_ss.add(when: 'CONFIG_SMBUS', if_true: files('smbus_slave.c', 'smbus_master.c'))
+i2c_ss.add(when: 'CONFIG_ACPI_SMBUS', if_true: files('pm_smbus.c'))
+i2c_ss.add(when: 'CONFIG_ACPI_X86_ICH', if_true: files('smbus_ich9.c'))
+i2c_ss.add(when: 'CONFIG_ASPEED_SOC', if_true: files('aspeed_i2c.c'))
+i2c_ss.add(when: 'CONFIG_BITBANG_I2C', if_true: files('bitbang_i2c.c'))
+i2c_ss.add(when: 'CONFIG_EXYNOS4', if_true: files('exynos4210_i2c.c'))
+i2c_ss.add(when: 'CONFIG_IMX_I2C', if_true: files('imx_i2c.c'))
+i2c_ss.add(when: 'CONFIG_MPC_I2C', if_true: files('mpc_i2c.c'))
+i2c_ss.add(when: 'CONFIG_NRF51_SOC', if_true: files('microbit_i2c.c'))
+i2c_ss.add(when: 'CONFIG_SMBUS_EEPROM', if_true: files('smbus_eeprom.c'))
+i2c_ss.add(when: 'CONFIG_VERSATILE_I2C', if_true: files('versatile_i2c.c'))
+i2c_ss.add(when: 'CONFIG_OMAP', if_true: files('omap_i2c.c'))
+i2c_ss.add(when: 'CONFIG_PPC4XX', if_true: files('ppc4xx_i2c.c'))
+softmmu_ss.add_all(when: 'CONFIG_I2C', if_true: i2c_ss)
hw/meson.build +1 -0
index 4d7c31c6..983edc1 100644
@@ -1,4 +1,5 @@
 subdir('core')
+subdir('i2c')
 subdir('ide')
 subdir('input')
 subdir('intc')
Signature · 1 line
1.8.3.1
#118 lore raw

PATCH 113/147 meson: convert hw/hyperv

In reply to Paolo Bonzini

From: Marc-André Lureau <[email protected]>

---
 hw/Makefile.objs        | 1 -
 hw/hyperv/Makefile.objs | 3 ---
 hw/hyperv/meson.build   | 3 +++
 hw/meson.build          | 1 +
 4 files changed, 4 insertions(+), 4 deletions(-)
 delete mode 100644 hw/hyperv/Makefile.objs
 create mode 100644 hw/hyperv/meson.build
hw/Makefile.objs +0 -1
index 22eb804..a2c2f6d 100644
@@ -9,7 +9,6 @@ devices-dirs-y += cpu/
 devices-dirs-y += display/
 devices-dirs-y += dma/
 devices-dirs-y += gpio/
-devices-dirs-$(CONFIG_HYPERV) += hyperv/
 endif
 
 common-obj-y += $(devices-dirs-y)
hw/hyperv/Makefile.objs deleted +0 -3
deleted file mode 100644
index 5b614e0..0000000
@@ -1,3 +0,0 @@
-obj-y += hyperv.o
-obj-$(CONFIG_HYPERV_TESTDEV) += hyperv_testdev.o
-obj-$(CONFIG_VMBUS) += vmbus.o
hw/hyperv/meson.build new file +3 -0
new file mode 100644
index 0000000..1367e29
@@ -0,0 +1,3 @@
+specific_ss.add(when: 'CONFIG_HYPERV', if_true: files('hyperv.c'))
+specific_ss.add(when: 'CONFIG_HYPERV_TESTDEV', if_true: files('hyperv_testdev.c'))
+specific_ss.add(when: 'CONFIG_VMBUS', if_true: files('vmbus.c'))
hw/meson.build +1 -0
index 983edc1..f9e5adf 100644
@@ -1,4 +1,5 @@
 subdir('core')
+subdir('hyperv')
 subdir('i2c')
 subdir('ide')
 subdir('input')
Signature · 1 line
1.8.3.1
#119 lore raw

PATCH 114/147 meson: convert hw/gpio

In reply to Paolo Bonzini

From: Marc-André Lureau <[email protected]>

---
 hw/Makefile.objs      |  1 -
 hw/gpio/Makefile.objs | 12 ------------
 hw/gpio/meson.build   | 12 ++++++++++++
 hw/meson.build        |  1 +
 4 files changed, 13 insertions(+), 13 deletions(-)
 delete mode 100644 hw/gpio/Makefile.objs
 create mode 100644 hw/gpio/meson.build
hw/Makefile.objs +0 -1
index a2c2f6d..c04dfe5 100644
@@ -8,7 +8,6 @@ devices-dirs-y += char/
 devices-dirs-y += cpu/
 devices-dirs-y += display/
 devices-dirs-y += dma/
-devices-dirs-y += gpio/
 endif
 
 common-obj-y += $(devices-dirs-y)
hw/gpio/Makefile.objs deleted +0 -12
deleted file mode 100644
index 3cfc261..0000000
@@ -1,12 +0,0 @@
-common-obj-$(CONFIG_MAX7310) += max7310.o
-common-obj-$(CONFIG_PL061) += pl061.o
-common-obj-$(CONFIG_PUV3) += puv3_gpio.o
-common-obj-$(CONFIG_ZAURUS) += zaurus.o
-common-obj-$(CONFIG_E500) += mpc8xxx.o
-common-obj-$(CONFIG_GPIO_KEY) += gpio_key.o
-
-common-obj-$(CONFIG_OMAP) += omap_gpio.o
-common-obj-$(CONFIG_IMX) += imx_gpio.o
-common-obj-$(CONFIG_RASPI) += bcm2835_gpio.o
-common-obj-$(CONFIG_NRF51_SOC) += nrf51_gpio.o
-common-obj-$(CONFIG_ASPEED_SOC) += aspeed_gpio.o
hw/gpio/meson.build new file +12 -0
new file mode 100644
index 0000000..6bcdfa6
@@ -0,0 +1,12 @@
+softmmu_ss.add(when: 'CONFIG_E500', if_true: files('mpc8xxx.c'))
+softmmu_ss.add(when: 'CONFIG_GPIO_KEY', if_true: files('gpio_key.c'))
+softmmu_ss.add(when: 'CONFIG_MAX7310', if_true: files('max7310.c'))
+softmmu_ss.add(when: 'CONFIG_PL061', if_true: files('pl061.c'))
+softmmu_ss.add(when: 'CONFIG_PUV3', if_true: files('puv3_gpio.c'))
+softmmu_ss.add(when: 'CONFIG_ZAURUS', if_true: files('zaurus.c'))
+
+softmmu_ss.add(when: 'CONFIG_IMX', if_true: files('imx_gpio.c'))
+softmmu_ss.add(when: 'CONFIG_NRF51_SOC', if_true: files('nrf51_gpio.c'))
+softmmu_ss.add(when: 'CONFIG_OMAP', if_true: files('omap_gpio.c'))
+softmmu_ss.add(when: 'CONFIG_RASPI', if_true: files('bcm2835_gpio.c'))
+softmmu_ss.add(when: 'CONFIG_ASPEED_SOC', if_true: files('aspeed_gpio.c'))
hw/meson.build +1 -0
index f9e5adf..52577c3 100644
@@ -1,4 +1,5 @@
 subdir('core')
+subdir('gpio')
 subdir('hyperv')
 subdir('i2c')
 subdir('ide')
Signature · 1 line
1.8.3.1
Reviewed-by on v1 114/147
#120 lore raw

Re: [PATCH 114/147] meson: convert hw/gpio

Quoted 4 lines · Paolo Bonzini

From: Marc-André Lureau <[email protected]>

Quoted 68 lines
---
 hw/Makefile.objs      |  1 -
 hw/gpio/Makefile.objs | 12 ------------
 hw/gpio/meson.build   | 12 ++++++++++++
 hw/meson.build        |  1 +
 4 files changed, 13 insertions(+), 13 deletions(-)
 delete mode 100644 hw/gpio/Makefile.objs
 create mode 100644 hw/gpio/meson.build
hw/Makefile.objs +0 -1
index a2c2f6d..c04dfe5 100644
@@ -8,7 +8,6 @@ devices-dirs-y += char/
 devices-dirs-y += cpu/
 devices-dirs-y += display/
 devices-dirs-y += dma/
-devices-dirs-y += gpio/
 endif
 
 common-obj-y += $(devices-dirs-y)
hw/gpio/Makefile.objs deleted +0 -12
deleted file mode 100644
index 3cfc261..0000000
@@ -1,12 +0,0 @@
-common-obj-$(CONFIG_MAX7310) += max7310.o
-common-obj-$(CONFIG_PL061) += pl061.o
-common-obj-$(CONFIG_PUV3) += puv3_gpio.o
-common-obj-$(CONFIG_ZAURUS) += zaurus.o
-common-obj-$(CONFIG_E500) += mpc8xxx.o
-common-obj-$(CONFIG_GPIO_KEY) += gpio_key.o
-
-common-obj-$(CONFIG_OMAP) += omap_gpio.o
-common-obj-$(CONFIG_IMX) += imx_gpio.o
-common-obj-$(CONFIG_RASPI) += bcm2835_gpio.o
-common-obj-$(CONFIG_NRF51_SOC) += nrf51_gpio.o
-common-obj-$(CONFIG_ASPEED_SOC) += aspeed_gpio.o
hw/gpio/meson.build new file +12 -0
new file mode 100644
index 0000000..6bcdfa6
@@ -0,0 +1,12 @@
+softmmu_ss.add(when: 'CONFIG_E500', if_true: files('mpc8xxx.c'))
+softmmu_ss.add(when: 'CONFIG_GPIO_KEY', if_true: files('gpio_key.c'))
+softmmu_ss.add(when: 'CONFIG_MAX7310', if_true: files('max7310.c'))
+softmmu_ss.add(when: 'CONFIG_PL061', if_true: files('pl061.c'))
+softmmu_ss.add(when: 'CONFIG_PUV3', if_true: files('puv3_gpio.c'))
+softmmu_ss.add(when: 'CONFIG_ZAURUS', if_true: files('zaurus.c'))
+
+softmmu_ss.add(when: 'CONFIG_IMX', if_true: files('imx_gpio.c'))
+softmmu_ss.add(when: 'CONFIG_NRF51_SOC', if_true: files('nrf51_gpio.c'))
+softmmu_ss.add(when: 'CONFIG_OMAP', if_true: files('omap_gpio.c'))
+softmmu_ss.add(when: 'CONFIG_RASPI', if_true: files('bcm2835_gpio.c'))
+softmmu_ss.add(when: 'CONFIG_ASPEED_SOC', if_true: files('aspeed_gpio.c'))
hw/meson.build +1 -0
index f9e5adf..52577c3 100644
@@ -1,4 +1,5 @@
 subdir('core')
+subdir('gpio')
 subdir('hyperv')
 subdir('i2c')
 subdir('ide')
#121 lore raw

PATCH 115/147 meson: convert hw/dma

In reply to Paolo Bonzini

From: Marc-André Lureau <[email protected]>

---
 hw/Makefile.objs     |  1 -
 hw/dma/Makefile.objs | 16 ----------------
 hw/dma/meson.build   | 15 +++++++++++++++
 hw/meson.build       |  1 +
 4 files changed, 16 insertions(+), 17 deletions(-)
 delete mode 100644 hw/dma/Makefile.objs
 create mode 100644 hw/dma/meson.build
hw/Makefile.objs +0 -1
index c04dfe5..26917a4 100644
@@ -7,7 +7,6 @@ devices-dirs-y += block/
 devices-dirs-y += char/
 devices-dirs-y += cpu/
 devices-dirs-y += display/
-devices-dirs-y += dma/
 endif
 
 common-obj-y += $(devices-dirs-y)
hw/dma/Makefile.objs deleted +0 -16
deleted file mode 100644
index f4b1cfe..0000000
@@ -1,16 +0,0 @@
-common-obj-$(CONFIG_PUV3) += puv3_dma.o
-common-obj-$(CONFIG_RC4030) += rc4030.o
-common-obj-$(CONFIG_PL080) += pl080.o
-common-obj-$(CONFIG_PL330) += pl330.o
-common-obj-$(CONFIG_I82374) += i82374.o
-common-obj-$(CONFIG_I8257) += i8257.o
-common-obj-$(CONFIG_XILINX_AXI) += xilinx_axidma.o
-common-obj-$(CONFIG_ZYNQ_DEVCFG) += xlnx-zynq-devcfg.o
-common-obj-$(CONFIG_ETRAXFS) += etraxfs_dma.o
-common-obj-$(CONFIG_STP2000) += sparc32_dma.o
-common-obj-$(CONFIG_XLNX_ZYNQMP_ARM) += xlnx_dpdma.o
-common-obj-$(CONFIG_XLNX_ZYNQMP_ARM) += xlnx-zdma.o
-
-common-obj-$(CONFIG_OMAP) += omap_dma.o soc_dma.o
-common-obj-$(CONFIG_PXA2XX) += pxa2xx_dma.o
-common-obj-$(CONFIG_RASPI) += bcm2835_dma.o
hw/dma/meson.build new file +15 -0
new file mode 100644
index 0000000..ff5bb37
@@ -0,0 +1,15 @@
+softmmu_ss.add(when: 'CONFIG_PUV3', if_true: files('puv3_dma.c'))
+softmmu_ss.add(when: 'CONFIG_RC4030', if_true: files('rc4030.c'))
+softmmu_ss.add(when: 'CONFIG_PL080', if_true: files('pl080.c'))
+softmmu_ss.add(when: 'CONFIG_PL330', if_true: files('pl330.c'))
+softmmu_ss.add(when: 'CONFIG_I82374', if_true: files('i82374.c'))
+softmmu_ss.add(when: 'CONFIG_I8257', if_true: files('i8257.c'))
+softmmu_ss.add(when: 'CONFIG_XILINX_AXI', if_true: files('xilinx_axidma.c'))
+softmmu_ss.add(when: 'CONFIG_ZYNQ_DEVCFG', if_true: files('xlnx-zynq-devcfg.c'))
+softmmu_ss.add(when: 'CONFIG_ETRAXFS', if_true: files('etraxfs_dma.c'))
+softmmu_ss.add(when: 'CONFIG_STP2000', if_true: files('sparc32_dma.c'))
+softmmu_ss.add(when: 'CONFIG_XLNX_ZYNQMP_ARM', if_true: files('xlnx_dpdma.c'))
+softmmu_ss.add(when: 'CONFIG_XLNX_ZYNQMP_ARM', if_true: files('xlnx-zdma.c'))
+softmmu_ss.add(when: 'CONFIG_OMAP', if_true: files('omap_dma.c', 'soc_dma.c'))
+softmmu_ss.add(when: 'CONFIG_PXA2XX', if_true: files('pxa2xx_dma.c'))
+softmmu_ss.add(when: 'CONFIG_RASPI', if_true: files('bcm2835_dma.c'))
hw/meson.build +1 -0
index 52577c3..96da0bb 100644
@@ -1,4 +1,5 @@
 subdir('core')
+subdir('dma')
 subdir('gpio')
 subdir('hyperv')
 subdir('i2c')
Signature · 1 line
1.8.3.1
#122 lore raw

PATCH 116/147 meson: convert hw/display

In reply to Paolo Bonzini

From: Marc-André Lureau <[email protected]>

---
 Makefile.target          |  1 +
 hw/Makefile.objs         |  1 -
 hw/display/Makefile.objs | 65 ------------------------------------
 hw/display/meson.build   | 87 ++++++++++++++++++++++++++++++++++++++++++++++++
 hw/meson.build           |  1 +
 5 files changed, 89 insertions(+), 66 deletions(-)
 delete mode 100644 hw/display/Makefile.objs
 create mode 100644 hw/display/meson.build
Makefile.target +1 -0
index 3d5a2af..3534ece 100644
@@ -169,6 +169,7 @@ LIBS := $(LIBS) $(BRLAPI_LIBS) $(SDL_LIBS) $(SPICE_LIBS) $(OPENGL_LIBS) $(SECCOM
 LIBS := $(LIBS) $(COREAUDIO_LIBS) $(DSOUND_LIBS)
 LIBS := $(LIBS) $(VDE_LIBS) $(SLIRP_LIBS)
 LIBS := $(LIBS) $(LIBUSB_LIBS) $(SMARTCARD_LIBS) $(USB_REDIR_LIBS)
+LIBS := $(LIBS) $(VIRGL_LIBS)
 
 # Hardware support
 ifeq ($(TARGET_NAME), sparc64)
hw/Makefile.objs +0 -1
index 26917a4..6fce6a1 100644
@@ -6,7 +6,6 @@ devices-dirs-y += audio/
 devices-dirs-y += block/
 devices-dirs-y += char/
 devices-dirs-y += cpu/
-devices-dirs-y += display/
 endif
 
 common-obj-y += $(devices-dirs-y)
hw/display/Makefile.objs deleted +0 -65

65 lines not on this page · raw message

hw/display/meson.build new file +87 -0

87 lines not on this page · raw message

hw/meson.build +1 -0
index 96da0bb..dacd26c 100644
@@ -1,4 +1,5 @@
 subdir('core')
+subdir('display')
 subdir('dma')
 subdir('gpio')
 subdir('hyperv')
Signature · 1 line
1.8.3.1
#123 lore raw

PATCH 117/147 meson: convert hw/cpu

In reply to Paolo Bonzini

From: Marc-André Lureau <[email protected]>

---
 hw/Makefile.objs     | 1 -
 hw/cpu/Makefile.objs | 5 -----
 hw/cpu/meson.build   | 6 ++++++
 hw/meson.build       | 1 +
 4 files changed, 7 insertions(+), 6 deletions(-)
 delete mode 100644 hw/cpu/Makefile.objs
 create mode 100644 hw/cpu/meson.build
hw/Makefile.objs +0 -1
index 6fce6a1..97ad302 100644
@@ -5,7 +5,6 @@ devices-dirs-y += adc/
 devices-dirs-y += audio/
 devices-dirs-y += block/
 devices-dirs-y += char/
-devices-dirs-y += cpu/
 endif
 
 common-obj-y += $(devices-dirs-y)
hw/cpu/Makefile.objs deleted +0 -5
deleted file mode 100644
index 8db9e8a..0000000
@@ -1,5 +0,0 @@
-obj-$(CONFIG_ARM11MPCORE) += arm11mpcore.o
-obj-$(CONFIG_REALVIEW) += realview_mpcore.o
-obj-$(CONFIG_A9MPCORE) += a9mpcore.o
-obj-$(CONFIG_A15MPCORE) += a15mpcore.o
-common-obj-y += core.o cluster.o
hw/cpu/meson.build new file +6 -0
new file mode 100644
index 0000000..9e52fee
@@ -0,0 +1,6 @@
+softmmu_ss.add(files('core.c', 'cluster.c'))
+
+specific_ss.add(when: 'CONFIG_ARM11MPCORE', if_true: files('arm11mpcore.c'))
+specific_ss.add(when: 'CONFIG_REALVIEW', if_true: files('realview_mpcore.c'))
+specific_ss.add(when: 'CONFIG_A9MPCORE', if_true: files('a9mpcore.c'))
+specific_ss.add(when: 'CONFIG_A15MPCORE', if_true: files('a15mpcore.c'))
hw/meson.build +1 -0
index dacd26c..103da48 100644
@@ -1,4 +1,5 @@
 subdir('core')
+subdir('cpu')
 subdir('display')
 subdir('dma')
 subdir('gpio')
Signature · 1 line
1.8.3.1
#124 lore raw

PATCH 118/147 meson: convert hw/char

In reply to Paolo Bonzini

From: Marc-André Lureau <[email protected]>

---
 hw/Makefile.objs      |  1 -
 hw/char/Makefile.objs | 39 ---------------------------------------
 hw/char/meson.build   | 38 ++++++++++++++++++++++++++++++++++++++
 hw/meson.build        |  1 +
 4 files changed, 39 insertions(+), 40 deletions(-)
 delete mode 100644 hw/char/Makefile.objs
 create mode 100644 hw/char/meson.build
hw/Makefile.objs +0 -1
index 97ad302..04cfb6c 100644
@@ -4,7 +4,6 @@ devices-dirs-y += acpi/
 devices-dirs-y += adc/
 devices-dirs-y += audio/
 devices-dirs-y += block/
-devices-dirs-y += char/
 endif
 
 common-obj-y += $(devices-dirs-y)
hw/char/Makefile.objs deleted +0 -39
deleted file mode 100644
index bf177ac..0000000
@@ -1,39 +0,0 @@
-common-obj-$(CONFIG_IPACK) += ipoctal232.o
-common-obj-$(CONFIG_ESCC) += escc.o
-common-obj-$(CONFIG_NRF51_SOC) += nrf51_uart.o
-common-obj-$(CONFIG_PARALLEL) += parallel.o
-common-obj-$(CONFIG_ISA_BUS) += parallel-isa.o
-common-obj-$(CONFIG_PL011) += pl011.o
-common-obj-$(CONFIG_SERIAL) += serial.o
-common-obj-$(CONFIG_SERIAL_ISA) += serial-isa.o
-common-obj-$(CONFIG_SERIAL_PCI) += serial-pci.o
-common-obj-$(CONFIG_SERIAL_PCI_MULTI) += serial-pci-multi.o
-common-obj-$(CONFIG_VIRTIO_SERIAL) += virtio-console.o
-common-obj-$(CONFIG_XILINX) += xilinx_uartlite.o
-common-obj-$(CONFIG_XEN) += xen_console.o
-common-obj-$(CONFIG_CADENCE) += cadence_uart.o
-common-obj-$(CONFIG_IBEX) += ibex_uart.o
-
-common-obj-$(CONFIG_EXYNOS4) += exynos4210_uart.o
-common-obj-$(CONFIG_COLDFIRE) += mcf_uart.o
-common-obj-$(CONFIG_OMAP) += omap_uart.o
-common-obj-$(CONFIG_SH4) += sh_serial.o
-common-obj-$(CONFIG_DIGIC) += digic-uart.o
-common-obj-$(CONFIG_STM32F2XX_USART) += stm32f2xx_usart.o
-common-obj-$(CONFIG_RASPI) += bcm2835_aux.o
-common-obj-$(CONFIG_RENESAS_SCI) += renesas_sci.o
-common-obj-$(CONFIG_AVR_USART) += avr_usart.o
-
-common-obj-$(CONFIG_CMSDK_APB_UART) += cmsdk-apb-uart.o
-common-obj-$(CONFIG_ETRAXFS) += etraxfs_ser.o
-common-obj-$(CONFIG_ISA_DEBUG) += debugcon.o
-common-obj-$(CONFIG_GRLIB) += grlib_apbuart.o
-common-obj-$(CONFIG_IMX) += imx_serial.o
-common-obj-$(CONFIG_LM32) += lm32_juart.o
-common-obj-$(CONFIG_LM32) += lm32_uart.o
-common-obj-$(CONFIG_MILKYMIST) += milkymist-uart.o
-common-obj-$(CONFIG_SCLPCONSOLE) += sclpconsole.o sclpconsole-lm.o
-
-obj-$(CONFIG_VIRTIO) += virtio-serial-bus.o
-obj-$(CONFIG_PSERIES) += spapr_vty.o
-obj-$(CONFIG_TERMINAL3270) += terminal3270.o
hw/char/meson.build new file +38 -0
new file mode 100644
index 0000000..e888215
@@ -0,0 +1,38 @@
+softmmu_ss.add(when: 'CONFIG_CADENCE', if_true: files('cadence_uart.c'))
+softmmu_ss.add(when: 'CONFIG_CMSDK_APB_UART', if_true: files('cmsdk-apb-uart.c'))
+softmmu_ss.add(when: 'CONFIG_ESCC', if_true: files('escc.c'))
+softmmu_ss.add(when: 'CONFIG_ETRAXFS', if_true: files('etraxfs_ser.c'))
+softmmu_ss.add(when: 'CONFIG_GRLIB', if_true: files('grlib_apbuart.c'))
+softmmu_ss.add(when: 'CONFIG_IBEX', if_true: files('ibex_uart.c'))
+softmmu_ss.add(when: 'CONFIG_IMX', if_true: files('imx_serial.c'))
+softmmu_ss.add(when: 'CONFIG_IPACK', if_true: files('ipoctal232.c'))
+softmmu_ss.add(when: 'CONFIG_ISA_BUS', if_true: files('parallel-isa.c'))
+softmmu_ss.add(when: 'CONFIG_ISA_DEBUG', if_true: files('debugcon.c'))
+softmmu_ss.add(when: 'CONFIG_LM32', if_true: files('lm32_juart.c'))
+softmmu_ss.add(when: 'CONFIG_LM32', if_true: files('lm32_uart.c'))
+softmmu_ss.add(when: 'CONFIG_MILKYMIST', if_true: files('milkymist-uart.c'))
+softmmu_ss.add(when: 'CONFIG_NRF51_SOC', if_true: files('nrf51_uart.c'))
+softmmu_ss.add(when: 'CONFIG_PARALLEL', if_true: files('parallel.c'))
+softmmu_ss.add(when: 'CONFIG_PL011', if_true: files('pl011.c'))
+softmmu_ss.add(when: 'CONFIG_SCLPCONSOLE', if_true: files('sclpconsole.c', 'sclpconsole-lm.c'))
+softmmu_ss.add(when: 'CONFIG_SERIAL', if_true: files('serial.c'))
+softmmu_ss.add(when: 'CONFIG_SERIAL_ISA', if_true: files('serial-isa.c'))
+softmmu_ss.add(when: 'CONFIG_SERIAL_PCI', if_true: files('serial-pci.c'))
+softmmu_ss.add(when: 'CONFIG_SERIAL_PCI_MULTI', if_true: files('serial-pci-multi.c'))
+softmmu_ss.add(when: 'CONFIG_VIRTIO_SERIAL', if_true: files('virtio-console.c'))
+softmmu_ss.add(when: 'CONFIG_XEN', if_true: files('xen_console.c'))
+softmmu_ss.add(when: 'CONFIG_XILINX', if_true: files('xilinx_uartlite.c'))
+
+softmmu_ss.add(when: 'CONFIG_AVR_USART', if_true: files('avr_usart.c'))
+softmmu_ss.add(when: 'CONFIG_COLDFIRE', if_true: files('mcf_uart.c'))
+softmmu_ss.add(when: 'CONFIG_DIGIC', if_true: files('digic-uart.c'))
+softmmu_ss.add(when: 'CONFIG_EXYNOS4', if_true: files('exynos4210_uart.c'))
+softmmu_ss.add(when: 'CONFIG_OMAP', if_true: files('omap_uart.c'))
+softmmu_ss.add(when: 'CONFIG_RASPI', if_true: files('bcm2835_aux.c'))
+softmmu_ss.add(when: 'CONFIG_RENESAS_SCI', if_true: files('renesas_sci.c'))
+softmmu_ss.add(when: 'CONFIG_SH4', if_true: files('sh_serial.c'))
+softmmu_ss.add(when: 'CONFIG_STM32F2XX_USART', if_true: files('stm32f2xx_usart.c'))
+
+specific_ss.add(when: 'CONFIG_TERMINAL3270', if_true: files('terminal3270.c'))
+specific_ss.add(when: 'CONFIG_VIRTIO', if_true: files('virtio-serial-bus.c'))
+specific_ss.add(when: 'CONFIG_PSERIES', if_true: files('spapr_vty.c'))
hw/meson.build +1 -0
index 103da48..dd0c77e 100644
@@ -1,3 +1,4 @@
+subdir('char')
 subdir('core')
 subdir('cpu')
 subdir('display')
Signature · 1 line
1.8.3.1
#125 lore raw

PATCH 119/147 meson: convert hw/block

In reply to Paolo Bonzini

From: Marc-André Lureau <[email protected]>

---
 hw/Makefile.objs                 |  1 -
 hw/block/Makefile.objs           | 18 ------------------
 hw/block/dataplane/Makefile.objs |  2 --
 hw/block/dataplane/meson.build   |  2 ++
 hw/block/meson.build             | 21 +++++++++++++++++++++
 hw/meson.build                   |  1 +
 6 files changed, 24 insertions(+), 21 deletions(-)
 delete mode 100644 hw/block/Makefile.objs
 delete mode 100644 hw/block/dataplane/Makefile.objs
 create mode 100644 hw/block/dataplane/meson.build
 create mode 100644 hw/block/meson.build
hw/Makefile.objs +0 -1
index 04cfb6c..9068859 100644
@@ -3,7 +3,6 @@ devices-dirs-$(call lor,$(CONFIG_VIRTIO_9P),$(call land,$(CONFIG_VIRTFS),$(CONFI
 devices-dirs-y += acpi/
 devices-dirs-y += adc/
 devices-dirs-y += audio/
-devices-dirs-y += block/
 endif
 
 common-obj-y += $(devices-dirs-y)
hw/block/Makefile.objs deleted +0 -18
deleted file mode 100644
index 8855c22..0000000
@@ -1,18 +0,0 @@
-common-obj-y += block.o cdrom.o hd-geometry.o
-common-obj-$(CONFIG_FDC) += fdc.o
-common-obj-$(CONFIG_SSI_M25P80) += m25p80.o
-common-obj-$(CONFIG_NAND) += nand.o
-common-obj-$(CONFIG_PFLASH_CFI01) += pflash_cfi01.o
-common-obj-$(CONFIG_PFLASH_CFI02) += pflash_cfi02.o
-common-obj-$(CONFIG_XEN) += xen-block.o
-common-obj-$(CONFIG_ECC) += ecc.o
-common-obj-$(CONFIG_ONENAND) += onenand.o
-common-obj-$(CONFIG_SWIM) += swim.o
-
-common-obj-$(CONFIG_SH4) += tc58128.o
-
-obj-$(CONFIG_VIRTIO_BLK) += virtio-blk.o
-obj-$(CONFIG_VHOST_USER_BLK) += vhost-user-blk.o
-common-obj-$(CONFIG_NVME_PCI) += nvme.o
-
-obj-y += dataplane/
hw/block/dataplane/Makefile.objs deleted +0 -2
deleted file mode 100644
index 0c52702..0000000
@@ -1,2 +0,0 @@
-obj-$(CONFIG_VIRTIO_BLK) += virtio-blk.o
-obj-$(CONFIG_XEN) += xen-block.o
hw/block/dataplane/meson.build new file +2 -0
new file mode 100644
index 0000000..12c6a26
@@ -0,0 +1,2 @@
+specific_ss.add(when: 'CONFIG_VIRTIO_BLK', if_true: files('virtio-blk.c'))
+specific_ss.add(when: 'CONFIG_XEN', if_true: files('xen-block.c'))
hw/block/meson.build new file +21 -0
new file mode 100644
index 0000000..78cad8f
@@ -0,0 +1,21 @@
+softmmu_ss.add(files(
+  'block.c',
+  'cdrom.c',
+  'hd-geometry.c'
+))
+softmmu_ss.add(when: 'CONFIG_ECC', if_true: files('ecc.c'))
+softmmu_ss.add(when: 'CONFIG_FDC', if_true: files('fdc.c'))
+softmmu_ss.add(when: 'CONFIG_NAND', if_true: files('nand.c'))
+softmmu_ss.add(when: 'CONFIG_ONENAND', if_true: files('onenand.c'))
+softmmu_ss.add(when: 'CONFIG_PFLASH_CFI01', if_true: files('pflash_cfi01.c'))
+softmmu_ss.add(when: 'CONFIG_PFLASH_CFI02', if_true: files('pflash_cfi02.c'))
+softmmu_ss.add(when: 'CONFIG_SSI_M25P80', if_true: files('m25p80.c'))
+softmmu_ss.add(when: 'CONFIG_SWIM', if_true: files('swim.c'))
+softmmu_ss.add(when: 'CONFIG_XEN', if_true: files('xen-block.c'))
+softmmu_ss.add(when: 'CONFIG_SH4', if_true: files('tc58128.c'))
+softmmu_ss.add(when: 'CONFIG_NVME_PCI', if_true: files('nvme.c'))
+
+specific_ss.add(when: 'CONFIG_VIRTIO_BLK', if_true: files('virtio-blk.c'))
+specific_ss.add(when: 'CONFIG_VHOST_USER_BLK', if_true: files('vhost-user-blk.c'))
+
+subdir('dataplane')
hw/meson.build +1 -0
index dd0c77e..f968aa8 100644
@@ -1,3 +1,4 @@
+subdir('block')
 subdir('char')
 subdir('core')
 subdir('cpu')
Signature · 1 line
1.8.3.1
#126 lore raw

PATCH 120/147 meson: convert hw/audio

In reply to Paolo Bonzini

From: Marc-André Lureau <[email protected]>

---
 hw/Makefile.objs       |  1 -
 hw/audio/Makefile.objs | 18 ------------------
 hw/audio/meson.build   | 14 ++++++++++++++
 hw/meson.build         |  1 +
 4 files changed, 15 insertions(+), 19 deletions(-)
 delete mode 100644 hw/audio/Makefile.objs
 create mode 100644 hw/audio/meson.build
hw/Makefile.objs +0 -1
index 9068859..c0cbc0f 100644
@@ -2,7 +2,6 @@ ifeq ($(CONFIG_SOFTMMU), y)
 devices-dirs-$(call lor,$(CONFIG_VIRTIO_9P),$(call land,$(CONFIG_VIRTFS),$(CONFIG_XEN))) += 9pfs/
 devices-dirs-y += acpi/
 devices-dirs-y += adc/
-devices-dirs-y += audio/
 endif
 
 common-obj-y += $(devices-dirs-y)
hw/audio/Makefile.objs deleted +0 -18
deleted file mode 100644
index 63db383..0000000
@@ -1,18 +0,0 @@
-# Sound
-common-obj-$(CONFIG_SB16) += sb16.o
-common-obj-$(CONFIG_ES1370) += es1370.o
-common-obj-$(CONFIG_AC97) += ac97.o
-common-obj-$(CONFIG_ADLIB) += fmopl.o adlib.o
-common-obj-$(CONFIG_GUS) += gus.o gusemu_hal.o gusemu_mixer.o
-common-obj-$(CONFIG_CS4231A) += cs4231a.o
-common-obj-$(CONFIG_HDA) += intel-hda.o hda-codec.o
-
-common-obj-$(CONFIG_PCSPK) += pcspk.o
-common-obj-$(CONFIG_WM8750) += wm8750.o
-common-obj-$(CONFIG_PL041) += pl041.o lm4549.o
-
-common-obj-$(CONFIG_CS4231) += cs4231.o
-common-obj-$(CONFIG_MARVELL_88W8618) += marvell_88w8618.o
-common-obj-$(CONFIG_MILKYMIST) += milkymist-ac97.o
-
-common-obj-y += soundhw.o
hw/audio/meson.build new file +14 -0
new file mode 100644
index 0000000..549e9a0
@@ -0,0 +1,14 @@
+softmmu_ss.add(files('soundhw.c'))
+softmmu_ss.add(when: 'CONFIG_AC97', if_true: files('ac97.c'))
+softmmu_ss.add(when: 'CONFIG_ADLIB', if_true: files('fmopl.c', 'adlib.c'))
+softmmu_ss.add(when: 'CONFIG_CS4231', if_true: files('cs4231.c'))
+softmmu_ss.add(when: 'CONFIG_CS4231A', if_true: files('cs4231a.c'))
+softmmu_ss.add(when: 'CONFIG_ES1370', if_true: files('es1370.c'))
+softmmu_ss.add(when: 'CONFIG_GUS', if_true: files('gus.c', 'gusemu_hal.c', 'gusemu_mixer.c'))
+softmmu_ss.add(when: 'CONFIG_HDA', if_true: files('intel-hda.c', 'hda-codec.c'))
+softmmu_ss.add(when: 'CONFIG_MARVELL_88W8618', if_true: files('marvell_88w8618.c'))
+softmmu_ss.add(when: 'CONFIG_MILKYMIST', if_true: files('milkymist-ac97.c'))
+softmmu_ss.add(when: 'CONFIG_PCSPK', if_true: files('pcspk.c'))
+softmmu_ss.add(when: 'CONFIG_PL041', if_true: files('pl041.c', 'lm4549.c'))
+softmmu_ss.add(when: 'CONFIG_SB16', if_true: files('sb16.c'))
+softmmu_ss.add(when: 'CONFIG_WM8750', if_true: files('wm8750.c'))
hw/meson.build +1 -0
index f968aa8..624335b 100644
@@ -1,3 +1,4 @@
+subdir('audio')
 subdir('block')
 subdir('char')
 subdir('core')
Signature · 1 line
1.8.3.1
#127 lore raw

PATCH 121/147 meson: convert hw/adc

In reply to Paolo Bonzini

From: Marc-André Lureau <[email protected]>

---
 hw/Makefile.objs     | 1 -
 hw/adc/Makefile.objs | 1 -
 hw/adc/meson.build   | 1 +
 hw/meson.build       | 1 +
 4 files changed, 2 insertions(+), 2 deletions(-)
 delete mode 100644 hw/adc/Makefile.objs
 create mode 100644 hw/adc/meson.build
hw/Makefile.objs +0 -1
index c0cbc0f..4bdb674 100644
@@ -1,7 +1,6 @@
 ifeq ($(CONFIG_SOFTMMU), y)
 devices-dirs-$(call lor,$(CONFIG_VIRTIO_9P),$(call land,$(CONFIG_VIRTFS),$(CONFIG_XEN))) += 9pfs/
 devices-dirs-y += acpi/
-devices-dirs-y += adc/
 endif
 
 common-obj-y += $(devices-dirs-y)
hw/adc/Makefile.objs deleted +0 -1
deleted file mode 100644
index 2b9dc36..0000000
@@ -1 +0,0 @@
-common-obj-$(CONFIG_STM32F2XX_ADC) += stm32f2xx_adc.o
hw/adc/meson.build new file +1 -0
new file mode 100644
index 0000000..0d62ae9
@@ -0,0 +1 @@
+softmmu_ss.add(when: 'CONFIG_STM32F2XX_ADC', if_true: files('stm32f2xx_adc.c'))
hw/meson.build +1 -0
index 624335b..ffa3f06 100644
@@ -1,3 +1,4 @@
+subdir('adc')
 subdir('audio')
 subdir('block')
 subdir('char')
Signature · 1 line
1.8.3.1
#128 lore raw

PATCH 122/147 meson: convert hw/acpi

In reply to Paolo Bonzini

From: Marc-André Lureau <[email protected]>

---
 hw/Makefile.objs      |  1 -
 hw/acpi/Makefile.objs | 26 --------------------------
 hw/acpi/meson.build   | 25 +++++++++++++++++++++++++
 hw/meson.build        |  1 +
 4 files changed, 26 insertions(+), 27 deletions(-)
 delete mode 100644 hw/acpi/Makefile.objs
 create mode 100644 hw/acpi/meson.build
hw/Makefile.objs +0 -1
index 4bdb674..ebae00a 100644
@@ -1,6 +1,5 @@
 ifeq ($(CONFIG_SOFTMMU), y)
 devices-dirs-$(call lor,$(CONFIG_VIRTIO_9P),$(call land,$(CONFIG_VIRTFS),$(CONFIG_XEN))) += 9pfs/
-devices-dirs-y += acpi/
 endif
 
 common-obj-y += $(devices-dirs-y)
hw/acpi/Makefile.objs deleted +0 -26
deleted file mode 100644
index 72886c7..0000000
@@ -1,26 +0,0 @@
-ifeq ($(CONFIG_ACPI),y)
-common-obj-$(CONFIG_ACPI_X86) += core.o piix4.o pcihp.o
-common-obj-$(CONFIG_ACPI_X86_ICH) += ich9.o tco.o
-common-obj-$(CONFIG_ACPI_CPU_HOTPLUG) += cpu_hotplug.o
-common-obj-$(CONFIG_ACPI_MEMORY_HOTPLUG) += memory_hotplug.o
-common-obj-$(CONFIG_ACPI_CPU_HOTPLUG) += cpu.o
-common-obj-$(CONFIG_ACPI_NVDIMM) += nvdimm.o
-common-obj-$(CONFIG_ACPI_VMGENID) += vmgenid.o
-common-obj-$(CONFIG_ACPI_HW_REDUCED) += generic_event_device.o
-common-obj-$(CONFIG_ACPI_HMAT) += hmat.o
-common-obj-$(CONFIG_ACPI_APEI) += ghes.o
-common-obj-$(call lnot,$(CONFIG_ACPI_X86)) += acpi-stub.o
-common-obj-$(call lnot,$(CONFIG_PC)) += acpi-x86-stub.o
-
-common-obj-y += acpi_interface.o
-common-obj-y += bios-linker-loader.o
-common-obj-y += aml-build.o utils.o
-common-obj-$(CONFIG_ACPI_PCI) += pci.o
-common-obj-$(CONFIG_TPM) += tpm.o
-
-common-obj-$(CONFIG_IPMI) += ipmi.o
-common-obj-$(call lnot,$(CONFIG_IPMI)) += ipmi-stub.o
-else
-common-obj-y += acpi-stub.o aml-build-stub.o
-endif
-common-obj-$(CONFIG_ALL) += acpi-stub.o aml-build-stub.o acpi-x86-stub.o ipmi-stub.o
hw/acpi/meson.build new file +25 -0
new file mode 100644
index 0000000..dd69577
@@ -0,0 +1,25 @@
+acpi_ss = ss.source_set()
+acpi_ss.add(files(
+  'acpi_interface.c',
+  'aml-build.c',
+  'bios-linker-loader.c',
+  'utils.c',
+))
+acpi_ss.add(when: 'CONFIG_ACPI_CPU_HOTPLUG', if_true: files('cpu.c'))
+acpi_ss.add(when: 'CONFIG_ACPI_CPU_HOTPLUG', if_true: files('cpu_hotplug.c'))
+acpi_ss.add(when: 'CONFIG_ACPI_MEMORY_HOTPLUG', if_true: files('memory_hotplug.c'))
+acpi_ss.add(when: 'CONFIG_ACPI_NVDIMM', if_true: files('nvdimm.c'))
+acpi_ss.add(when: 'CONFIG_ACPI_PCI', if_true: files('pci.c'))
+acpi_ss.add(when: 'CONFIG_ACPI_VMGENID', if_true: files('vmgenid.c'))
+acpi_ss.add(when: 'CONFIG_ACPI_HW_REDUCED', if_true: files('generic_event_device.c'))
+acpi_ss.add(when: 'CONFIG_ACPI_HMAT', if_true: files('hmat.c'))
+acpi_ss.add(when: 'CONFIG_ACPI_APEI', if_true: files('ghes.c'))
+acpi_ss.add(when: 'CONFIG_ACPI_X86', if_true: files('core.c', 'piix4.c', 'pcihp.c'), if_false: files('acpi-stub.c'))
+acpi_ss.add(when: 'CONFIG_ACPI_X86_ICH', if_true: files('ich9.c', 'tco.c'))
+acpi_ss.add(when: 'CONFIG_IPMI', if_true: files('ipmi.c'), if_false: files('ipmi-stub.c'))
+acpi_ss.add(when: 'CONFIG_PC', if_false: files('acpi-x86-stub.c'))
+acpi_ss.add(when: 'CONFIG_TPM', if_true: files('tpm.c'))
+softmmu_ss.add(when: 'CONFIG_ACPI', if_false: files('acpi-stub.c', 'aml-build-stub.c'))
+softmmu_ss.add_all(when: 'CONFIG_ACPI', if_true: acpi_ss)
+softmmu_ss.add(when: 'CONFIG_ALL', if_true: files('acpi-stub.c', 'aml-build-stub.c',
+                                                  'acpi-x86-stub.c', 'ipmi-stub.c'))
hw/meson.build +1 -0
index ffa3f06..55ca2b2 100644
@@ -1,3 +1,4 @@
+subdir('acpi')
 subdir('adc')
 subdir('audio')
 subdir('block')
Signature · 1 line
1.8.3.1
#129 lore raw

PATCH 123/147 meson: convert hw/9pfs, cleanup

In reply to Paolo Bonzini

From: Marc-André Lureau <[email protected]>

hw/Makefile.objs is gone so there is more code that can be removed.

---
 Makefile              |  4 ----
 Makefile.objs         |  8 --------
 Makefile.target       | 15 ---------------
 hw/9pfs/Kconfig       |  4 ++++
 hw/9pfs/Makefile.objs |  9 ---------
 hw/9pfs/meson.build   | 20 ++++++++++++++++++++
 hw/Makefile.objs      |  8 --------
 hw/meson.build        |  1 +
 8 files changed, 25 insertions(+), 44 deletions(-)
 delete mode 100644 hw/9pfs/Makefile.objs
 create mode 100644 hw/9pfs/meson.build
 delete mode 100644 hw/Makefile.objs
Makefile +0 -4
index 64d644d..5e8f281 100644
@@ -162,10 +162,6 @@ ifneq ($(wildcard config-host.mak),)
 include $(SRC_PATH)/Makefile.objs
 endif
 
-dummy := $(call unnest-vars,, \
-                common-obj-y \
-                common-obj-m)
-
 include $(SRC_PATH)/tests/Makefile.include
 
 all: $(DOCS) $(if $(BUILD_DOCS),sphinxdocs) recurse-all modules
Makefile.objs +0 -8
index c332323..c9720a9 100644
@@ -61,18 +61,10 @@ common-obj-$(if $(CONFIG_RBD),m) += block-rbd$(DSOSUF)
 common-obj-$(if $(CONFIG_LZFSE),m) += block-dmg-lzfse$(DSOSUF)
 common-obj-$(if $(and $(CONFIG_BZIP2),$(CONFIG_DMG)),m) += block-dmg-bz2$(DSOSUF)
 
-common-obj-y += hw/
-common-obj-m += hw/
-
 common-obj-y += libqmp.fa
 
 endif # CONFIG_SOFTMMU
 
-#######################################################################
-# Target-independent parts used in system and user emulation
-
-common-obj-y += hw/
-
 ######################################################################
 # Resource file for Windows executables
 version-obj-$(CONFIG_WIN32) += $(BUILD_DIR)/version.o
Makefile.target +0 -15
index 3534ece..c95e0de 100644
@@ -156,7 +156,6 @@ endif #CONFIG_BSD_USER
 ifdef CONFIG_SOFTMMU
 obj-y += softmmu/
 obj-y += gdbstub.o
-obj-y += hw/
 LIBS := $(libs_softmmu) $(LIBS)
 
 # Temporary until emulators are linked by Meson
@@ -185,20 +184,6 @@ endif # CONFIG_SOFTMMU
 dummy := $(call unnest-vars,,obj-y)
 all-obj-y := $(obj-y)
 
-#
-# common-obj-m has some crap here, probably as side effect from
-# unnest-vars recursing into target directories to fill obj-y and not
-# properly handling the -m case.
-#
-# Clear common-obj-m as workaround.  Fixes suspious dependency errors
-# when building devices as modules.  A bit hackish, but should be ok
-# as long as we do not have any target-specific modules.
-#
-# The meson-based build system currently in development doesn't need
-# unnest-vars and will obsolete this workaround.
-#
-common-obj-m :=
-
 include $(SRC_PATH)/Makefile.objs
 dummy := $(call fix-paths,../,, \
               authz-obj-y \
hw/9pfs/Kconfig +4 -0
index 3ae5749..d3ebd73 100644
@@ -2,8 +2,12 @@ config FSDEV_9P
     bool
     depends on VIRTFS
 
+config 9PFS
+    bool
+
 config VIRTIO_9P
     bool
     default y
     depends on VIRTFS && VIRTIO
     select FSDEV_9P
+    select 9PFS
hw/9pfs/Makefile.objs deleted +0 -9
deleted file mode 100644
index 70ded6f..0000000
@@ -1,9 +0,0 @@
-common-obj-y  = 9p.o 9p-util.o
-common-obj-y += 9p-local.o 9p-xattr.o
-common-obj-y += 9p-xattr-user.o 9p-posix-acl.o
-common-obj-y += coth.o cofs.o codir.o cofile.o
-common-obj-y += coxattr.o 9p-synth.o
-common-obj-y += 9p-proxy.o
-
-common-obj-$(CONFIG_XEN) += xen-9p-backend.o
-obj-$(CONFIG_VIRTIO_9P) += virtio-9p-device.o
hw/9pfs/meson.build new file +20 -0
new file mode 100644
index 0000000..cc09426
@@ -0,0 +1,20 @@
+fs_ss = ss.source_set()
+fs_ss.add(files(
+  '9p-local.c',
+  '9p-posix-acl.c',
+  '9p-proxy.c',
+  '9p-synth.c',
+  '9p-util.c',
+  '9p-xattr-user.c',
+  '9p-xattr.c',
+  '9p.c',
+  'codir.c',
+  'cofile.c',
+  'cofs.c',
+  'coth.c',
+  'coxattr.c',
+))
+fs_ss.add(when: 'CONFIG_XEN', if_true: files('xen-9p-backend.c'))
+softmmu_ss.add_all(when: 'CONFIG_9PFS', if_true: fs_ss)
+
+specific_ss.add(when: 'CONFIG_VIRTIO_9P', if_true: files('virtio-9p-device.c'))
hw/Makefile.objs deleted +0 -8
deleted file mode 100644
index ebae00a..0000000
@@ -1,8 +0,0 @@
-ifeq ($(CONFIG_SOFTMMU), y)
-devices-dirs-$(call lor,$(CONFIG_VIRTIO_9P),$(call land,$(CONFIG_VIRTFS),$(CONFIG_XEN))) += 9pfs/
-endif
-
-common-obj-y += $(devices-dirs-y)
-common-obj-m += display/
-common-obj-m += usb/
-obj-y += $(devices-dirs-y)
hw/meson.build +1 -0
index 55ca2b2..ba8763c 100644
@@ -1,3 +1,4 @@
+subdir('9pfs')
 subdir('acpi')
 subdir('adc')
 subdir('audio')
Signature · 1 line
1.8.3.1
#130 lore raw

PATCH 124/147 meson: convert hw/arch*

In reply to Paolo Bonzini

From: Marc-André Lureau <[email protected]>

---
 Makefile.target             |  7 ----
 hw/alpha/Makefile.objs      |  1 -
 hw/alpha/meson.build        |  8 +++++
 hw/arm/Makefile.objs        | 56 -------------------------------
 hw/arm/meson.build          | 59 +++++++++++++++++++++++++++++++++
 hw/avr/Makefile.objs        |  3 --
 hw/avr/meson.build          |  6 ++++
 hw/cris/Makefile.objs       |  2 --
 hw/cris/meson.build         |  5 +++
 hw/hppa/Makefile.objs       |  1 -
 hw/hppa/meson.build         |  4 +++
 hw/i386/Makefile.objs       | 20 ------------
 hw/i386/kvm/Makefile.objs   |  5 ---
 hw/i386/kvm/meson.build     |  8 +++++
 hw/i386/meson.build         | 32 ++++++++++++++++++
 hw/i386/xen/Makefile.objs   |  1 -
 hw/i386/xen/meson.build     |  7 ++++
 hw/lm32/Makefile.objs       |  3 --
 hw/lm32/meson.build         |  6 ++++
 hw/m68k/Makefile.objs       |  4 ---
 hw/m68k/meson.build         |  7 ++++
 hw/meson.build              | 25 ++++++++++++++
 hw/microblaze/Makefile.objs |  4 ---
 hw/microblaze/meson.build   |  7 ++++
 hw/mips/Makefile.objs       |  8 -----
 hw/mips/meson.build         | 11 +++++++
 hw/moxie/Makefile.objs      |  2 --
 hw/moxie/meson.build        |  4 +++
 hw/nios2/Makefile.objs      |  3 --
 hw/nios2/meson.build        |  6 ++++
 hw/openrisc/Makefile.objs   |  2 --
 hw/openrisc/meson.build     |  5 +++
 hw/ppc/Makefile.objs        | 35 --------------------
 hw/ppc/meson.build          | 80 +++++++++++++++++++++++++++++++++++++++++++++
 hw/riscv/Makefile.objs      | 16 ---------
 hw/riscv/meson.build        | 19 +++++++++++
 hw/rx/Makefile.objs         |  2 --
 hw/rx/meson.build           |  5 +++
 hw/s390x/Makefile.objs      | 37 ---------------------
 hw/s390x/meson.build        | 46 ++++++++++++++++++++++++++
 hw/sh4/Makefile.objs        |  4 ---
 hw/sh4/meson.build          | 10 ++++++
 hw/sparc/Makefile.objs      |  3 --
 hw/sparc/meson.build        |  6 ++++
 hw/sparc64/Makefile.objs    |  4 ---
 hw/sparc64/meson.build      |  6 ++++
 hw/tricore/Makefile.objs    |  1 -
 hw/tricore/meson.build      |  4 +++
 hw/unicore32/Makefile.objs  |  4 ---
 hw/unicore32/meson.build    |  5 +++
 hw/xenpv/Makefile.objs      |  2 --
 hw/xenpv/meson.build        |  3 ++
 hw/xtensa/Makefile.objs     |  6 ----
 hw/xtensa/meson.build       | 11 +++++++
 meson.build                 |  4 +++
 55 files changed, 399 insertions(+), 236 deletions(-)
 delete mode 100644 hw/alpha/Makefile.objs
 create mode 100644 hw/alpha/meson.build
 delete mode 100644 hw/arm/Makefile.objs
 create mode 100644 hw/arm/meson.build
 delete mode 100644 hw/avr/Makefile.objs
 create mode 100644 hw/avr/meson.build
 delete mode 100644 hw/cris/Makefile.objs
 create mode 100644 hw/cris/meson.build
 delete mode 100644 hw/hppa/Makefile.objs
 create mode 100644 hw/hppa/meson.build
 delete mode 100644 hw/i386/Makefile.objs
 delete mode 100644 hw/i386/kvm/Makefile.objs
 create mode 100644 hw/i386/kvm/meson.build
 create mode 100644 hw/i386/meson.build
 delete mode 100644 hw/i386/xen/Makefile.objs
 create mode 100644 hw/i386/xen/meson.build
 delete mode 100644 hw/lm32/Makefile.objs
 create mode 100644 hw/lm32/meson.build
 delete mode 100644 hw/m68k/Makefile.objs
 create mode 100644 hw/m68k/meson.build
 delete mode 100644 hw/microblaze/Makefile.objs
 create mode 100644 hw/microblaze/meson.build
 delete mode 100644 hw/mips/Makefile.objs
 create mode 100644 hw/mips/meson.build
 delete mode 100644 hw/moxie/Makefile.objs
 create mode 100644 hw/moxie/meson.build
 delete mode 100644 hw/nios2/Makefile.objs
 create mode 100644 hw/nios2/meson.build
 delete mode 100644 hw/openrisc/Makefile.objs
 create mode 100644 hw/openrisc/meson.build
 delete mode 100644 hw/ppc/Makefile.objs
 create mode 100644 hw/ppc/meson.build
 delete mode 100644 hw/riscv/Makefile.objs
 create mode 100644 hw/riscv/meson.build
 delete mode 100644 hw/rx/Makefile.objs
 create mode 100644 hw/rx/meson.build
 delete mode 100644 hw/s390x/Makefile.objs
 create mode 100644 hw/s390x/meson.build
 delete mode 100644 hw/sh4/Makefile.objs
 create mode 100644 hw/sh4/meson.build
 delete mode 100644 hw/sparc/Makefile.objs
 create mode 100644 hw/sparc/meson.build
 delete mode 100644 hw/sparc64/Makefile.objs
 create mode 100644 hw/sparc64/meson.build
 delete mode 100644 hw/tricore/Makefile.objs
 create mode 100644 hw/tricore/meson.build
 delete mode 100644 hw/unicore32/Makefile.objs
 create mode 100644 hw/unicore32/meson.build
 delete mode 100644 hw/xenpv/Makefile.objs
 create mode 100644 hw/xenpv/meson.build
 delete mode 100644 hw/xtensa/Makefile.objs
 create mode 100644 hw/xtensa/meson.build
Makefile.target +0 -7
index c95e0de..28cefba 100644
@@ -170,13 +170,6 @@ LIBS := $(LIBS) $(VDE_LIBS) $(SLIRP_LIBS)
 LIBS := $(LIBS) $(LIBUSB_LIBS) $(SMARTCARD_LIBS) $(USB_REDIR_LIBS)
 LIBS := $(LIBS) $(VIRGL_LIBS)
 
-# Hardware support
-ifeq ($(TARGET_NAME), sparc64)
-obj-y += hw/sparc64/
-else
-obj-y += hw/$(TARGET_BASE_ARCH)/
-endif
-
 generated-files-y += hmp-commands.h hmp-commands-info.h
 
 endif # CONFIG_SOFTMMU
hw/alpha/Makefile.objs deleted +0 -1
deleted file mode 100644
index 62fdf3e..0000000
@@ -1 +0,0 @@
-obj-$(CONFIG_DP264) += dp264.o pci.o typhoon.o
hw/alpha/meson.build new file +8 -0
new file mode 100644
index 0000000..81ca215
@@ -0,0 +1,8 @@
+alpha_ss = ss.source_set()
+alpha_ss.add(when: 'CONFIG_DP264', if_true: files(
+  'dp264.c',
+  'pci.c',
+  'typhoon.c',
+))
+
+hw_arch += {'alpha': alpha_ss}
hw/arm/Makefile.objs deleted +0 -56

56 lines not on this page · raw message

hw/arm/meson.build new file +59 -0

59 lines not on this page · raw message

hw/avr/Makefile.objs deleted +0 -3
deleted file mode 100644
index 4dca064..0000000
@@ -1,3 +0,0 @@
-obj-y += boot.o
-obj-$(CONFIG_AVR_ATMEGA_MCU) += atmega.o
-obj-$(CONFIG_ARDUINO) += arduino.o
hw/avr/meson.build new file +6 -0
new file mode 100644
index 0000000..46d53fb
@@ -0,0 +1,6 @@
+avr_ss = ss.source_set()
+avr_ss.add(files('boot.c'))
+avr_ss.add(when: 'CONFIG_AVR_ATMEGA_MCU', if_true: files('atmega.c'))
+avr_ss.add(when: 'CONFIG_ARDUINO', if_true: files('arduino.c'))
+
+hw_arch += {'avr': avr_ss}
hw/cris/Makefile.objs deleted +0 -2
deleted file mode 100644
index a4a27b3..0000000
@@ -1,2 +0,0 @@
-obj-y += boot.o
-obj-$(CONFIG_AXIS) += axis_dev88.o
hw/cris/meson.build new file +5 -0
new file mode 100644
index 0000000..dc808a4
@@ -0,0 +1,5 @@
+cris_ss = ss.source_set()
+cris_ss.add(files('boot.c'))
+cris_ss.add(when: 'CONFIG_AXIS', if_true: files('axis_dev88.c'))
+
+hw_arch += {'cris': cris_ss}
hw/hppa/Makefile.objs deleted +0 -1
deleted file mode 100644
index eac3467..0000000
@@ -1 +0,0 @@
-obj-$(CONFIG_DINO) += pci.o machine.o dino.o lasi.o
hw/hppa/meson.build new file +4 -0
new file mode 100644
index 0000000..1deae83
@@ -0,0 +1,4 @@
+hppa_ss = ss.source_set()
+hppa_ss.add(when: 'CONFIG_DINO', if_true: files('pci.c', 'machine.c', 'dino.c', 'lasi.c'))
+
+hw_arch += {'hppa': hppa_ss}
hw/i386/Makefile.objs deleted +0 -20
deleted file mode 100644
index 6abc745..0000000
@@ -1,20 +0,0 @@
-obj-$(CONFIG_KVM) += kvm/
-obj-y += e820_memory_layout.o multiboot.o
-obj-y += x86.o
-obj-$(CONFIG_PC) += pc.o pc_sysfw.o
-obj-$(CONFIG_I440FX) += pc_piix.o
-obj-$(CONFIG_Q35) += pc_q35.o
-obj-$(CONFIG_MICROVM) += microvm.o
-obj-y += fw_cfg.o
-obj-$(CONFIG_X86_IOMMU) += x86-iommu.o
-obj-$(call lnot,$(CONFIG_X86_IOMMU)) += x86-iommu-stub.o
-obj-$(CONFIG_VTD) += intel_iommu.o
-obj-$(CONFIG_AMD_IOMMU) += amd_iommu.o
-obj-$(CONFIG_XEN) += ../xenpv/ xen/
-obj-$(CONFIG_VMPORT) += vmport.o
-obj-$(CONFIG_VMMOUSE) += vmmouse.o
-obj-$(CONFIG_PC) += port92.o
-
-obj-y += kvmvapic.o
-obj-$(CONFIG_ACPI) += acpi-common.o
-obj-$(CONFIG_PC) += acpi-build.o
hw/i386/kvm/Makefile.objs deleted +0 -5
deleted file mode 100644
index 0c8d5f2..0000000
@@ -1,5 +0,0 @@
-obj-y += clock.o
-obj-$(CONFIG_APIC) += apic.o
-obj-$(CONFIG_IOAPIC) += ioapic.o
-obj-$(CONFIG_I8254) += i8254.o
-obj-$(CONFIG_I8259) += i8259.o
hw/i386/kvm/meson.build new file +8 -0
new file mode 100644
index 0000000..95467f1
@@ -0,0 +1,8 @@
+i386_kvm_ss = ss.source_set()
+i386_kvm_ss.add(files('clock.c'))
+i386_kvm_ss.add(when: 'CONFIG_APIC', if_true: files('apic.c'))
+i386_kvm_ss.add(when: 'CONFIG_I8254', if_true: files('i8254.c'))
+i386_kvm_ss.add(when: 'CONFIG_I8259', if_true: files('i8259.c'))
+i386_kvm_ss.add(when: 'CONFIG_IOAPIC', if_true: files('ioapic.c'))
+
+i386_ss.add_all(when: 'CONFIG_KVM', if_true: i386_kvm_ss)
hw/i386/meson.build new file +32 -0
new file mode 100644
index 0000000..63918fb
@@ -0,0 +1,32 @@
+i386_ss = ss.source_set()
+i386_ss.add(files(
+  'fw_cfg.c',
+  'kvmvapic.c',
+  'e820_memory_layout.c',
+  'multiboot.c',
+  'x86.c',
+))
+
+i386_ss.add(when: 'CONFIG_X86_IOMMU', if_true: files('x86-iommu.c'),
+                                      if_false: files('x86-iommu-stub.c'))
+i386_ss.add(when: 'CONFIG_AMD_IOMMU', if_true: files('amd_iommu.c'))
+i386_ss.add(when: 'CONFIG_I440FX', if_true: files('pc_piix.c'))
+i386_ss.add(when: 'CONFIG_MICROVM', if_true: files('microvm.c'))
+i386_ss.add(when: 'CONFIG_Q35', if_true: files('pc_q35.c'))
+i386_ss.add(when: 'CONFIG_VMMOUSE', if_true: files('vmmouse.c'))
+i386_ss.add(when: 'CONFIG_VMPORT', if_true: files('vmport.c'))
+i386_ss.add(when: 'CONFIG_VTD', if_true: files('intel_iommu.c'))
+
+i386_ss.add(when: 'CONFIG_ACPI', if_true: files('acpi-common.c'))
+i386_ss.add(when: 'CONFIG_PC', if_true: files(
+  'pc.c',
+  'pc_sysfw.c',
+  'acpi-build.c',
+  'port92.c'))
+
+subdir('kvm')
+subdir('xen')
+
+i386_ss.add_all(xenpv_ss)
+
+hw_arch += {'i386': i386_ss}
hw/i386/xen/Makefile.objs deleted +0 -1
deleted file mode 100644
index be9d10c..0000000
@@ -1 +0,0 @@
-obj-y += xen_platform.o xen_apic.o xen_pvdevice.o xen-hvm.o xen-mapcache.o
hw/i386/xen/meson.build new file +7 -0
new file mode 100644
index 0000000..be84130
@@ -0,0 +1,7 @@
+i386_ss.add(when: 'CONFIG_XEN', if_true: files(
+  'xen-hvm.c',
+  'xen-mapcache.c',
+  'xen_apic.c',
+  'xen_platform.c',
+  'xen_pvdevice.c',
+))
hw/lm32/Makefile.objs deleted +0 -3
deleted file mode 100644
index c394186..0000000
@@ -1,3 +0,0 @@
-# LM32 boards
-obj-$(CONFIG_LM32) += lm32_boards.o
-obj-$(CONFIG_MILKYMIST) += milkymist.o
hw/lm32/meson.build new file +6 -0
new file mode 100644
index 0000000..8caf0a7
@@ -0,0 +1,6 @@
+lm32_ss = ss.source_set()
+# LM32 boards
+lm32_ss.add(when: 'CONFIG_LM32', if_true: files('lm32_boards.c'))
+lm32_ss.add(when: 'CONFIG_MILKYMIST', if_true: files('milkymist.c'))
+
+hw_arch += {'lm32': lm32_ss}
hw/m68k/Makefile.objs deleted +0 -4
deleted file mode 100644
index b2c9e5a..0000000
@@ -1,4 +0,0 @@
-obj-$(CONFIG_AN5206) += an5206.o mcf5206.o
-obj-$(CONFIG_MCF5208) += mcf5208.o mcf_intc.o
-obj-$(CONFIG_NEXTCUBE) += next-kbd.o next-cube.o
-obj-$(CONFIG_Q800) += q800.o
hw/m68k/meson.build new file +7 -0
new file mode 100644
index 0000000..ca0044c6
@@ -0,0 +1,7 @@
+m68k_ss = ss.source_set()
+m68k_ss.add(when: 'CONFIG_AN5206', if_true: files('an5206.c', 'mcf5206.c'))
+m68k_ss.add(when: 'CONFIG_MCF5208', if_true: files('mcf5208.c', 'mcf_intc.c'))
+m68k_ss.add(when: 'CONFIG_NEXTCUBE', if_true: files('next-kbd.c', 'next-cube.c'))
+m68k_ss.add(when: 'CONFIG_Q800', if_true: files('q800.c'))
+
+hw_arch += {'m68k': m68k_ss}
hw/meson.build +25 -0
index ba8763c..010de72 100644
@@ -40,3 +40,28 @@ subdir('vfio')
 subdir('virtio')
 subdir('watchdog')
 subdir('xen')
+subdir('xenpv')
+
+subdir('alpha')
+subdir('arm')
+subdir('avr')
+subdir('cris')
+subdir('hppa')
+subdir('i386')
+subdir('lm32')
+subdir('m68k')
+subdir('microblaze')
+subdir('mips')
+subdir('moxie')
+subdir('nios2')
+subdir('openrisc')
+subdir('ppc')
+subdir('riscv')
+subdir('rx')
+subdir('s390x')
+subdir('sh4')
+subdir('sparc')
+subdir('sparc64')
+subdir('tricore')
+subdir('unicore32')
+subdir('xtensa')
hw/microblaze/Makefile.objs deleted +0 -4
deleted file mode 100644
index 8595a62..0000000
@@ -1,4 +0,0 @@
-obj-$(CONFIG_PETALOGIX_S3ADSP1800) += petalogix_s3adsp1800_mmu.o
-obj-$(CONFIG_PETALOGIX_ML605) += petalogix_ml605_mmu.o
-obj-$(CONFIG_XLNX_ZYNQMP_PMU) += xlnx-zynqmp-pmu.o
-obj-y += boot.o
hw/microblaze/meson.build new file +7 -0
new file mode 100644
index 0000000..bb9e4eb
@@ -0,0 +1,7 @@
+microblaze_ss = ss.source_set()
+microblaze_ss.add(files('boot.c'))
+microblaze_ss.add(when: 'CONFIG_PETALOGIX_S3ADSP1800', if_true: files('petalogix_s3adsp1800_mmu.c'))
+microblaze_ss.add(when: 'CONFIG_PETALOGIX_ML605', if_true: files('petalogix_ml605_mmu.c'))
+microblaze_ss.add(when: 'CONFIG_XLNX_ZYNQMP_PMU', if_true: files('xlnx-zynqmp-pmu.c'))
+
+hw_arch += {'microblaze': microblaze_ss}
hw/mips/Makefile.objs deleted +0 -8
deleted file mode 100644
index 739e2b7..0000000
@@ -1,8 +0,0 @@
-obj-y += addr.o mips_int.o
-obj-$(CONFIG_R4K) += r4k.o
-obj-$(CONFIG_MALTA) += gt64xxx_pci.o malta.o
-obj-$(CONFIG_MIPSSIM) += mipssim.o
-obj-$(CONFIG_JAZZ) += jazz.o
-obj-$(CONFIG_FULOONG) += fuloong2e.o
-obj-$(CONFIG_MIPS_CPS) += cps.o
-obj-$(CONFIG_MIPS_BOSTON) += boston.o
hw/mips/meson.build new file +11 -0
new file mode 100644
index 0000000..6ac9dc4
@@ -0,0 +1,11 @@
+mips_ss = ss.source_set()
+mips_ss.add(files('addr.c', 'mips_int.c'))
+mips_ss.add(when: 'CONFIG_FULOONG', if_true: files('fuloong2e.c'))
+mips_ss.add(when: 'CONFIG_JAZZ', if_true: files('jazz.c'))
+mips_ss.add(when: 'CONFIG_MALTA', if_true: files('gt64xxx_pci.c', 'malta.c'))
+mips_ss.add(when: 'CONFIG_MIPSSIM', if_true: files('mipssim.c'))
+mips_ss.add(when: 'CONFIG_MIPS_BOSTON', if_true: files('boston.c'))
+mips_ss.add(when: 'CONFIG_MIPS_CPS', if_true: files('cps.c'))
+mips_ss.add(when: 'CONFIG_R4K', if_true: files('r4k.c'))
+
+hw_arch += {'mips': mips_ss}
hw/moxie/Makefile.objs deleted +0 -2
deleted file mode 100644
index ddbf300..0000000
@@ -1,2 +0,0 @@
-# moxie boards
-obj-$(CONFIG_MOXIESIM) += moxiesim.o
hw/moxie/meson.build new file +4 -0
new file mode 100644
index 0000000..05a7c2e
@@ -0,0 +1,4 @@
+moxie_ss = ss.source_set()
+moxie_ss.add(when: 'CONFIG_MOXIESIM', if_true: files('moxiesim.c'))
+
+hw_arch += {'moxie': moxie_ss}
hw/nios2/Makefile.objs deleted +0 -3
deleted file mode 100644
index 3e01798..0000000
@@ -1,3 +0,0 @@
-obj-y = boot.o cpu_pic.o
-obj-$(CONFIG_NIOS2_10M50) += 10m50_devboard.o
-obj-$(CONFIG_NIOS2_GENERIC_NOMMU) += generic_nommu.o
hw/nios2/meson.build new file +6 -0
new file mode 100644
index 0000000..dd66ebb
@@ -0,0 +1,6 @@
+nios2_ss = ss.source_set()
+nios2_ss.add(files('boot.c', 'cpu_pic.c'))
+nios2_ss.add(when: 'CONFIG_NIOS2_10M50', if_true: files('10m50_devboard.c'))
+nios2_ss.add(when: 'CONFIG_NIOS2_GENERIC_NOMMU', if_true: files('generic_nommu.c'))
+
+hw_arch += {'nios2': nios2_ss}
hw/openrisc/Makefile.objs deleted +0 -2
deleted file mode 100644
index aa04de7..0000000
@@ -1,2 +0,0 @@
-obj-y = pic_cpu.o cputimer.o
-obj-$(CONFIG_OR1K_SIM) += openrisc_sim.o
hw/openrisc/meson.build new file +5 -0
new file mode 100644
index 0000000..57c4255
@@ -0,0 +1,5 @@
+openrisc_ss = ss.source_set()
+openrisc_ss.add(files('pic_cpu.c', 'cputimer.c'))
+openrisc_ss.add(when: 'CONFIG_OR1K_SIM', if_true: files('openrisc_sim.c'))
+
+hw_arch += {'openrisc': openrisc_ss}
hw/ppc/Makefile.objs deleted +0 -35
deleted file mode 100644
index c3d3cc5..0000000
@@ -1,35 +0,0 @@
-# shared objects
-obj-y += ppc.o ppc_booke.o
-obj-$(CONFIG_FDT_PPC) += fdt.o
-obj-$(CONFIG_FW_CFG_PPC) += fw_cfg.o
-# IBM pSeries (sPAPR)
-obj-$(CONFIG_PSERIES) += spapr.o spapr_caps.o spapr_vio.o spapr_events.o
-obj-$(CONFIG_PSERIES) += spapr_hcall.o spapr_iommu.o spapr_rtas.o
-obj-$(CONFIG_PSERIES) += spapr_pci.o spapr_rtc.o spapr_drc.o
-obj-$(CONFIG_PSERIES) += spapr_cpu_core.o spapr_ovec.o spapr_irq.o
-obj-$(CONFIG_PSERIES) += spapr_tpm_proxy.o spapr_nvdimm.o
-obj-$(CONFIG_SPAPR_RNG) +=  spapr_rng.o
-obj-$(call land,$(CONFIG_PSERIES),$(CONFIG_LINUX)) += spapr_pci_vfio.o spapr_pci_nvlink2.o
-# IBM PowerNV
-obj-$(CONFIG_POWERNV) += pnv.o pnv_xscom.o pnv_core.o pnv_lpc.o pnv_psi.o pnv_occ.o pnv_bmc.o
-obj-$(CONFIG_POWERNV) += pnv_homer.o pnv_pnor.o
-
-obj-$(CONFIG_PSERIES) += spapr_rtas_ddw.o
-# PowerPC 4xx boards
-obj-$(CONFIG_PPC405) += ppc405_boards.o ppc405_uc.o
-obj-$(CONFIG_PPC440) += ppc440_bamboo.o ppc440_pcix.o ppc440_uc.o
-obj-$(CONFIG_PPC4XX) += ppc4xx_pci.o ppc4xx_devs.o
-obj-$(CONFIG_SAM460EX) += sam460ex.o
-# PReP
-obj-$(CONFIG_PREP) += prep.o
-obj-$(CONFIG_PREP) += prep_systemio.o
-obj-${CONFIG_RS6000_MC} += rs6000_mc.o
-# OldWorld PowerMac
-obj-$(CONFIG_MAC_OLDWORLD) += mac_oldworld.o
-# NewWorld PowerMac
-obj-$(CONFIG_MAC_NEWWORLD) += mac_newworld.o
-# e500
-obj-$(CONFIG_E500) += e500.o mpc8544ds.o e500plat.o
-obj-$(CONFIG_E500) += mpc8544_guts.o ppce500_spin.o
-# PowerPC 440 Xilinx ML507 reference board.
-obj-$(CONFIG_VIRTEX) += virtex_ml507.o
hw/ppc/meson.build new file +80 -0

80 lines not on this page · raw message

hw/riscv/Makefile.objs deleted +0 -16
deleted file mode 100644
index 57cc708..0000000
@@ -1,16 +0,0 @@
-obj-y += boot.o
-obj-$(CONFIG_SPIKE) += riscv_htif.o
-obj-$(CONFIG_HART) += riscv_hart.o
-obj-$(CONFIG_OPENTITAN) += opentitan.o
-obj-$(CONFIG_SIFIVE_E) += sifive_e.o
-obj-$(CONFIG_SIFIVE_E) += sifive_e_prci.o
-obj-$(CONFIG_SIFIVE) += sifive_clint.o
-obj-$(CONFIG_SIFIVE) += sifive_gpio.o
-obj-$(CONFIG_SIFIVE) += sifive_plic.o
-obj-$(CONFIG_SIFIVE) += sifive_test.o
-obj-$(CONFIG_SIFIVE_U) += sifive_u.o
-obj-$(CONFIG_SIFIVE_U) += sifive_u_otp.o
-obj-$(CONFIG_SIFIVE_U) += sifive_u_prci.o
-obj-$(CONFIG_SIFIVE) += sifive_uart.o
-obj-$(CONFIG_SPIKE) += spike.o
-obj-$(CONFIG_RISCV_VIRT) += virt.o
hw/riscv/meson.build new file +19 -0
new file mode 100644
index 0000000..2de8e5a
@@ -0,0 +1,19 @@
+riscv_ss = ss.source_set()
+riscv_ss.add(files('boot.c'))
+riscv_ss.add(when: 'CONFIG_HART', if_true: files('riscv_hart.c'))
+riscv_ss.add(when: 'CONFIG_OPENTITAN', if_true: files('opentitan.c'))
+riscv_ss.add(when: 'CONFIG_RISCV_VIRT', if_true: files('virt.c'))
+riscv_ss.add(when: 'CONFIG_SIFIVE', if_true: files('sifive_clint.c'))
+riscv_ss.add(when: 'CONFIG_SIFIVE', if_true: files('sifive_gpio.c'))
+riscv_ss.add(when: 'CONFIG_SIFIVE', if_true: files('sifive_plic.c'))
+riscv_ss.add(when: 'CONFIG_SIFIVE', if_true: files('sifive_test.c'))
+riscv_ss.add(when: 'CONFIG_SIFIVE', if_true: files('sifive_uart.c'))
+riscv_ss.add(when: 'CONFIG_SIFIVE_E', if_true: files('sifive_e.c'))
+riscv_ss.add(when: 'CONFIG_SIFIVE_E', if_true: files('sifive_e_prci.c'))
+riscv_ss.add(when: 'CONFIG_SIFIVE_U', if_true: files('sifive_u.c'))
+riscv_ss.add(when: 'CONFIG_SIFIVE_U', if_true: files('sifive_u_otp.c'))
+riscv_ss.add(when: 'CONFIG_SIFIVE_U', if_true: files('sifive_u_prci.c'))
+riscv_ss.add(when: 'CONFIG_SPIKE', if_true: files('riscv_htif.c'))
+riscv_ss.add(when: 'CONFIG_SPIKE', if_true: files('spike.c'))
+
+hw_arch += {'riscv': riscv_ss}
hw/rx/Makefile.objs deleted +0 -2
deleted file mode 100644
index 4ef6b9e..0000000
@@ -1,2 +0,0 @@
-obj-$(CONFIG_RX62N_MCU) += rx62n.o
-obj-$(CONFIG_RX_GDBSIM) += rx-gdbsim.o
hw/rx/meson.build new file +5 -0
new file mode 100644
index 0000000..d223512
@@ -0,0 +1,5 @@
+rx_ss = ss.source_set()
+rx_ss.add(when: 'CONFIG_RX_GDBSIM', if_true: files('rx-gdbsim.c'))
+rx_ss.add(when: 'CONFIG_RX62N_MCU', if_true: files('rx62n.c'))
+
+hw_arch += {'rx': rx_ss}
hw/s390x/Makefile.objs deleted +0 -37
deleted file mode 100644
index a46a1c7..0000000
@@ -1,37 +0,0 @@
-obj-y += s390-virtio-hcall.o
-obj-y += sclp.o
-obj-y += event-facility.o
-obj-y += sclpquiesce.o
-obj-y += sclpcpu.o
-obj-y += ipl.o
-obj-y += css.o
-obj-$(CONFIG_S390_CCW_VIRTIO) += s390-virtio-ccw.o
-obj-$(CONFIG_TERMINAL3270) += 3270-ccw.o
-ifeq ($(CONFIG_VIRTIO_CCW),y)
-obj-y += virtio-ccw.o
-obj-$(CONFIG_VIRTIO_SERIAL) += virtio-ccw-serial.o
-obj-$(CONFIG_VIRTIO_BALLOON) += virtio-ccw-balloon.o
-obj-$(CONFIG_VIRTIO_SCSI) += virtio-ccw-scsi.o
-obj-$(CONFIG_VIRTIO_RNG) += virtio-ccw-rng.o
-obj-$(CONFIG_VIRTIO_CRYPTO) += virtio-ccw-crypto.o
-obj-$(CONFIG_VIRTIO_GPU) += virtio-ccw-gpu.o
-obj-$(CONFIG_VIRTIO_INPUT) += virtio-ccw-input.o
-obj-$(CONFIG_VIRTIO_NET) += virtio-ccw-net.o
-obj-$(CONFIG_VIRTIO_BLK) += virtio-ccw-blk.o
-obj-$(call land,$(CONFIG_VIRTIO_9P),$(CONFIG_VIRTFS)) += virtio-ccw-9p.o
-obj-$(CONFIG_VHOST_VSOCK) += vhost-vsock-ccw.o
-endif
-obj-y += css-bridge.o
-obj-y += ccw-device.o
-obj-y += s390-pci-bus.o s390-pci-inst.o
-obj-y += s390-skeys.o
-obj-y += s390-stattrib.o
-obj-y += tod.o
-obj-y += tod-qemu.o
-obj-$(CONFIG_KVM) += tod-kvm.o
-obj-$(CONFIG_KVM) += s390-skeys-kvm.o
-obj-$(CONFIG_KVM) += s390-stattrib-kvm.o
-obj-$(CONFIG_KVM) += pv.o
-obj-y += s390-ccw.o
-obj-y += ap-device.o
-obj-y += ap-bridge.o
hw/s390x/meson.build new file +46 -0

46 lines not on this page · raw message

hw/sh4/Makefile.objs deleted +0 -4
deleted file mode 100644
index 2a707f9..0000000
@@ -1,4 +0,0 @@
-obj-y += sh7750.o sh7750_regnames.o
-obj-y += sh_pci.o
-obj-$(CONFIG_R2D) +=  r2d.o
-obj-$(CONFIG_SHIX) += shix.o
hw/sh4/meson.build new file +10 -0
new file mode 100644
index 0000000..303c0f4
@@ -0,0 +1,10 @@
+sh4_ss = ss.source_set()
+sh4_ss.add(files(
+  'sh7750.c',
+  'sh7750_regnames.c',
+  'sh_pci.c'
+))
+sh4_ss.add(when: 'CONFIG_R2D', if_true: files('r2d.c'))
+sh4_ss.add(when: 'CONFIG_SHIX', if_true: files('shix.c'))
+
+hw_arch += {'sh4': sh4_ss}
hw/sparc/Makefile.objs deleted +0 -3
deleted file mode 100644
index d57e33f..0000000
@@ -1,3 +0,0 @@
-obj-$(CONFIG_SUN4M) += sun4m_iommu.o
-obj-$(CONFIG_SUN4M) += sun4m.o
-obj-$(CONFIG_LEON3) += leon3.o
hw/sparc/meson.build new file +6 -0
new file mode 100644
index 0000000..19c442c
@@ -0,0 +1,6 @@
+sparc_ss = ss.source_set()
+sparc_ss.add(when: 'CONFIG_LEON3', if_true: files('leon3.c'))
+sparc_ss.add(when: 'CONFIG_SUN4M', if_true: files('sun4m.c'))
+sparc_ss.add(when: 'CONFIG_SUN4M', if_true: files('sun4m_iommu.c'))
+
+hw_arch += {'sparc': sparc_ss}
hw/sparc64/Makefile.objs deleted +0 -4
deleted file mode 100644
index af0525c..0000000
@@ -1,4 +0,0 @@
-obj-y += sparc64.o
-obj-$(CONFIG_SUN4U) += sun4u_iommu.o
-obj-$(CONFIG_SUN4U) += sun4u.o
-obj-$(CONFIG_NIAGARA) += niagara.o
hw/sparc64/meson.build new file +6 -0
new file mode 100644
index 0000000..58b5504
@@ -0,0 +1,6 @@
+sparc64_ss = ss.source_set()
+sparc64_ss.add(files('sparc64.c'))
+sparc64_ss.add(when: 'CONFIG_NIAGARA', if_true: files('niagara.c'))
+sparc64_ss.add(when: 'CONFIG_SUN4U', if_true: files('sun4u.c', 'sun4u_iommu.c'))
+
+hw_arch += {'sparc64': sparc64_ss}
hw/tricore/Makefile.objs deleted +0 -1
deleted file mode 100644
index 5501f6c..0000000
@@ -1 +0,0 @@
-obj-$(CONFIG_TRICORE) += tricore_testboard.o
hw/tricore/meson.build new file +4 -0
new file mode 100644
index 0000000..579aa13
@@ -0,0 +1,4 @@
+tricore_ss = ss.source_set()
+tricore_ss.add(when: 'CONFIG_TRICORE', if_true: files('tricore_testboard.c'))
+
+hw_arch += {'tricore': tricore_ss}
hw/unicore32/Makefile.objs deleted +0 -4
deleted file mode 100644
index e0fd628..0000000
@@ -1,4 +0,0 @@
-# For UniCore32 machines and boards
-
-# PKUnity-v3 SoC and board information
-obj-${CONFIG_PUV3} += puv3.o
hw/unicore32/meson.build new file +5 -0
new file mode 100644
index 0000000..fc26d6b
@@ -0,0 +1,5 @@
+unicore32_ss = ss.source_set()
+# PKUnity-v3 SoC and board information
+unicore32_ss.add(when: 'CONFIG_PUV3', if_true: files('puv3.c'))
+
+hw_arch += {'unicore32': unicore32_ss}
hw/xenpv/Makefile.objs deleted +0 -2
deleted file mode 100644
index 8bfa458..0000000
@@ -1,2 +0,0 @@
-# Xen PV machine support
-obj-$(CONFIG_XEN) += xen_machine_pv.o
hw/xenpv/meson.build new file +3 -0
new file mode 100644
index 0000000..40f911a
@@ -0,0 +1,3 @@
+xenpv_ss = ss.source_set()
+
+xenpv_ss.add(when: 'CONFIG_XEN', if_true: files('xen_machine_pv.c'))
hw/xtensa/Makefile.objs deleted +0 -6
deleted file mode 100644
index 2b40e1b..0000000
@@ -1,6 +0,0 @@
-obj-y += mx_pic.o
-obj-y += pic_cpu.o
-obj-y += xtensa_memory.o
-obj-$(CONFIG_XTENSA_SIM) += sim.o
-obj-$(CONFIG_XTENSA_VIRT) += virt.o
-obj-$(CONFIG_XTENSA_XTFPGA) += xtfpga.o
hw/xtensa/meson.build new file +11 -0
new file mode 100644
index 0000000..1d5835d
@@ -0,0 +1,11 @@
+xtensa_ss = ss.source_set()
+xtensa_ss.add(files(
+  'mx_pic.c',
+  'pic_cpu.c',
+  'xtensa_memory.c',
+))
+xtensa_ss.add(when: 'CONFIG_XTENSA_SIM', if_true: files('sim.c'))
+xtensa_ss.add(when: 'CONFIG_XTENSA_VIRT', if_true: files('virt.c'))
+xtensa_ss.add(when: 'CONFIG_XTENSA_XTFPGA', if_true: files('xtfpga.c'))
+
+hw_arch += {'xtensa': xtensa_ss}
meson.build +4 -0
index 696d743..e4b77dd 100644
@@ -775,6 +775,10 @@ foreach target : target_dirs
   if target.endswith('-softmmu')
     qemu_target_name = 'qemu-system-' + target_name
     target_type='system'
+    hw_dir = target_name == 'sparc64' ? 'sparc64' : arch
+    hw = hw_arch[hw_dir].apply(config_target, strict: false)
+    arch_srcs += hw.sources()
+
     arch_srcs += config_devices_h[target]
   else
     target_type='user'
Signature · 1 line
1.8.3.1